====== Linux notes ====== get linux boxes to show hostname on windows network [[http://www.terminally-incoherent.com/blog/2007/10/03/access-linux-workstation-by-hostname-on-a-windows-network/|http://www.terminally-incoherent.com/blog/2007/10/03/access-linux-workstation-by-hostname-on-a-windows-network/]] Once it is installed and running, edit /etc/samba/smb.conf and put following lines in somewhere in Global Settings section: workgroup = your_workgtoup netbios name = your_hostname [[:linux:lubuntu|lubuntu notes (laptop)]] [[:linux:backuppc|Backuppc]] [[linux:videorecord|linux video recording notes]] [[linux:chromeos|installing chromeos]] ===== Memory ===== I was wondering why there was not an even amount of ram reported on linux. Graphics is on the motherboard so it uses some memory. Ran this: dmesg | grep "Memory" [ 0.000000] Memory: 16069952K/16453324K available (8427K kernel code, 1285K rwdata, 3956K rodata, 1480K init, 1292K bss, 383372K reserved, 0K cma-reserved) [ 0.871218] [drm] Memory usable by graphics device = 2048M cat /proc/meminfo free -g dmidecode --type memory [[http://unix.stackexchange.com/questions/158892/using-only-3-3gb-but-i-have-8gb-ram-even-on-ubuntu-14-04-64bit|ram memory diags]] ===== Links ===== [[http://mike.teczno.com/notes/disposable-virtualbox-lxc-environments.html|about virtualbox]] ===== DD ===== dd command for two discs with different size partitions # dd if=/dev/sda of=/tmp/mbrsda.bak bs=512 count=1 Now to restore the image to any sdb: # dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1 Next, backup entries of the extended partitions: # sfdisk -d /dev/sda > /tmp/backup-sda.sfdisk ==== 512 vs 446 Bytes ==== Use 446 bytes to overwrite or restore your /dev/XYZ MBR boot code only with the contents of $mbr.backup.file. Use 512 bytes to overwrite or restore your /dev/XYZ the full MBR (which contains both boot code and the drive's partition table) with the contents of $mbr.backup.file. sfdisk Command The sfdisk command act as a partition table manipulator for Linux. You can use this tool to list partitions too: # sfdisk -l /dev/sda # sfdisk -lu /dev/sda # sfdisk -ls /dev/sda Sample outputs: 71669760 Disk /dev/sda: 8922 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 * 0+ 104- 105- 838656 83 Linux /dev/sda2 104+ 235- 131- 1048576 82 Linux swap / Solaris /dev/sda3 235+ 8922- 8688- 69781504 83 Linux /dev/sda4 0 - 0 0 0 Empty Where, -l : List the partitions of a device. -s : List the size of a partition. -u or -uS or -uB or -uC or -uM : Accept or report in units of sectors (blocks, cylinders, megabytes, respecpively). The default is cylinders, at least when the geometry is known. ==== view docs Apache ==== added these lines to apache directive for /usr/share/doc AddEncoding gzip gz ForceType text/plain Header set Content-Encoding: gzip ==== remote ==== From the X11 app, open the terminal, and then access the remote host with: ssh -XC user@host Then, when logged, simply run the command for the desired app, ex: firefox, nautilus, thunderbird, whatever... You can even launch only the system (Ubuntu, Xubuntu, Mint, etc..) Main Menu, and interact with the remote system from there, without the need of a full graphical front-end. On a remote Linux Mint env, i simply run: mintmenu& If you really need it, you can even start the remote graphical environment locally at your Mac's X11, simply running: ubuntu-session xubuntu-session etc... (depends of your remote environment) Better than any VNC, even better than an X11VNC connection! Secured and compressed connection FTW. ===== repository on hard drive ===== mount drive - has repository from DVD set I bought in January 2017 deb [arch=amd64] file:///mnt/arch/repo/linuxmint serena main upstream import deb [arch=amd64] file:///mnt/arch/repo/ubuntu xenial main restricted universe multiverse deb [arch=amd64] file:///mnt/arch/repo/ubuntu xenial-updates main restricted universe multiverse deb [arch=amd64] file:///mnt/arch/repo/ubuntu xenial-security main restricted universe multiverse # deb file:///mnt/repo/repo/linuxmint serena main upstream import # deb file:///mnt/repo/repo/ubuntu xenial main restricted universe multiverse # deb file:///mnt/repo/repo/ubuntu xenial-updates main restricted universe multiverse # deb file:///mnt/repo/repo/ubuntu xenial-security main restricted universe multiverse ===== new drive ===== 11-29-17 Bought new M.2 drive for trackfile machine - making some notes here about setting linux up on ti https://ubuntuforums.org/showthread.php?t=2377910 from: [[https://www.dell.com/support/article/us/en/19/sln299303/loading-ubuntu-on-systems-using-pcie-m2-drives?lang=en|Dell article]] Modify the boot option to add "nvme_load=YES" and remove "quiet splash [[https://askubuntu.com/questions/696999/unable-to-install-grub-in-dev-nvme| grub nvme]] https://ubuntuforums.org/showthread.php?t=2325056 ===== new partitioning ===== [[http://www.madhur.co.in/blog/2016/10/16/learning-moving-mbr-gpt-uefi.html|moving to gpt (for /dev/sdd on trackfile)]] [[https://unix.stackexchange.com/questions/96977/grub-wont-install| another grub install article ]] [[http://blog.getreu.net/projects/legacy-to-uefi-boot/#_boot_a_live_system|debian efi]] # Either this way…​ mount /dev/sdd1 /mnt/boot mount /dev/sdd3 /mnt/boot/efi for i in /dev/ /dev/pts /proc /sys ; do mount -B $i /mnt/$i ; done #or this way, both commands do the same…​ mount /dev/sdd1 /mnt/boot mount /dev/sdd3 /mnt/boot/efi mount --bind /sys /mnt/sys mount --bind /proc /mnt/proc mount --bind /dev /mnt/dev mount --bind /dev/pts /mnt/dev/pts #Internet access #For internet access inside chroot: cp /etc/resolv.conf /mnt/etc/resolv.conf [[https://old.nixaid.com/creating-uefi-bootable-usb-flash-drive-with-several-linux-distributions/|prolly can do this in fedora]] http://www.rodsbooks.com/refind/index.html [[http://blog.getreu.net/projects/legacy-to-uefi-boot/#_boot_a_live_system]] 2-14-18 saving debian install to fsarchiver savefs /mnt/backup/trackfile/sdd/deb_part/sdd2.fsa /dev/sdd2 portable usb backup drive sdd2 original size was 58.59 GB - used 16.17 ===== grub ===== * /dev/sdd1 debian partition * /dev/sdd2 swap * /dev/sdd3 efi boot * /dev/sdd4 home partition fedora * /dev/sdd5 fedora partition * On fedora: [[https://docs.fedoraproject.org/f27/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader.html|fedora 27 docs grub ]] grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg https://docs.fedoraproject.org/f27/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader.html GRUB_DEFAULT=saved GRUB_SAVEDEFAULT=true GRUB_THEME=/boot/grub/themes/breeze/theme.txt GRUB_BACKGROUND= ===== Grub troubles ===== **5-4-18** Trying to set up efi boot on both nvme drive and /dev/sdd sdd will be experimental distros. **5-4-18** getting error on nvme drive after installing ubuntu 18.04 on sdd drive MODSIGN: Couldn't get UEFI db list https://ubuntuforums.org/showthread.php?t=2380700 read spamless at the bottom may be able to reinstall grub on nvme and get it to stop?? https://ubuntuforums.org/showthread.php?t=2384409 https://askubuntu.com/questions/913716/dual-boot-on-seperate-drives-best-configuration its just a bug and should wait for a fix?? https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1743908 try reloading grub on nvme drive from [[https://www.gnu.org/software/grub/manual/grub/html_node/Installing-GRUB-using-grub_002dinstall.html| grub manual]] This install doesn’t conflict with standard install as long as they are in separate directories. Note that grub-install is actually just a shell script and the real task is done by other tools such as grub-mkimage. Therefore, you may run those commands directly to install GRUB, without using grub-install. Don’t do that, however, unless you are very familiar with the internals of GRUB. Installing a boot loader on a running OS may be extremely dangerous. On EFI systems for fixed disk install you have to mount EFI System Partition. If you mount it at /boot/efi then you don’t need any special arguments: # grub-install Otherwise you need to specify where your EFI System partition is mounted: # grub-install --efi-directory=/mnt/efi http://paste.ubuntu.com/p/cHfSbtDRKS/ mate hosed grub http://paste.ubuntu.com/p/CxQVRmBf3p/ 5-9-18 http://paste.ubuntu.com/p/8bqKSbxsjh/ http://paste.ubuntu.com/p/kHVk8SZ94m/ You can now reboot your computer. Please do not forget to make your BIOS boot on nvme0n1p1/EFI/ubuntu/grubx64.efi file! https://help.ubuntu.com/community/Boot-Repair https://patchwork.ozlabs.org/patch/611829/ [[https://ubuntuforums.org/showthread.php?t=2147295| efi boot stuff]] ==== bios versions ==== 5-11-18 Bios keeps hanging and I am reloading it via a usb thumb drive and the button on the back I am going to try a different bios next time. Notes about bios versions. These are on flatboy as well in case I can't get to them because trackfile hangs at the splash screen. Using 2704 now but 2304 has been renamed so should get picked up next time. 5-11-18 Version 2704 2016/08/105.6 MBytes Z97-WS Formal BIOS 2704 release. 1.Improve system stability. Version 2403 2015/07/275.6 MBytes Z97-WS Formal BIOS 2403 release. Support Broadwell CPU Implement 5th-Generation Intel Core Processors code *Full support of the new CPU requires VGA driver version 10.18.14.4206 or later *Before using the 5th Gen Intel Core processors, we suggest that you use USB BIOS Flashback or download ”BIOS updater for 5th Gen Intel Core Processors”to update the BIOS. 1. Improve compatibility with some smart card reader. (Support card reader KCR-318.) 2. Improve compatibility to some DIMMs. Version 2304 2015/03/115.57 MBytes Z97-WS Formal BIOS 2304 release 1. Fix compatibility for Genius 87 Gaming Keyboard. 2. Update ME file version to 9.1.25.1005. 3. Support NVMe Version 2013 2014/12/255.49 MBytes Z97-WS Formal BIOS 2013 release 1.Update RC version to RC 2.00 2.Support Asmedia SATA Express EFI driver 3.Add exFAT support. rename bios file to: Z97-WS Z97WS.CAP https://www.asus.com/US/support/faq/1013998/ https://www.asus.com/US/support/faq/1013998/ ===== fedora robotics ===== Notes for later from live iso https://fedoraproject.org/wiki/Robotics ===== youtube downloader ===== [[https://lubuntuhowto.blogspot.co.id/2017/11/how-to-install-youtube-dl-on-lubuntu-1710.html| youtube downloader]] ===== dpkg lock ===== look for it: sudo lsof /var/lib/dpkg/lock kill it: kill -9 (get from lsof output [[https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure|package manager troubleshooting]]