Install as dual-boot on Macbook

Keep notes of steps taken by the old fashioned way on paper…last done at BSC initial meeting…

OSX cmds:

$ diskutil list

Process details

/dev/sda3 ext3 /boot 256MB (128 MB wasn't enough for the upgrade to Xenial Xerus)
/dev/sda4 swap       512MB
/dev/sda5 ext3 /     10GB

Create bootable Ubuntu USB disk on Macbook

askubuntu.com/questions/86/how-do-i-create-an-ubuntu-live-usb-using-a-mac

$ cd ~/Downloads
$ hdiutil convert -format UDRW ubuntu-16.04.1-desktop-amd64.iso -o ubuntu-16.04.1-desktop-amd64.img
$ diskutil list
$ mv ubuntu-16.04.1-desktop-amd64.img.dmg ubuntu-16.04.1-desktop-amd64.img
$ diskutil unmountDisk /dev/disk1
$ sudo dd if=./ubuntu-16.04.1-desktop-amd64.img of=/dev/disk1 bs=1m
  dd: /dev/disk1: end of device
  65+0 records in
  64+1 records out
  67112960 bytes transferred

Copy bootable Ubuntu image onto disk

$ diskutil list
/dev/disk0
 #:                       TYPE NAME                    SIZE       IDENTIFIER
 0:      GUID_partition_scheme                        *160.0 GB   disk0
 1:                        EFI                         209.7 MB   disk0s1
 2:                  Apple_HFS Fireweed                139.5 GB   disk0s2
 3:       Microsoft Basic Data                         133.2 MB   disk0s3
 4:       Microsoft Basic Data                         18.0 GB    disk0s4

$ sudo dd if=./ubuntu-16.04.1-desktop-amd64.img of=/dev/disk0s4 bs=1m
  1443+1 records in
  1443+1 records out
  1513308160 bytes transferred in 239.184227 secs (6326956 bytes/sec)

u0 - Ubuntu overview

Built on Debain 'hence apt and dpkg'

Pkg list

$ apt –installed list

$ apt search xdotool

$ dpkg -l

packages.ubuntu.com/trusty/i386/vim/filelist

$ cd /etc/alternatives ; ls -l `which vim`
  lrwxrwxrwx 1 root root 21 May 18 14:43 /usr/bin/vim -> /etc/alternatives/vim
$ ls -l vim
  lrwxrwxrwx 1 root root 18 May 18 14:43 vim -> /usr/bin/vim.basic

/etc/alternatives/README

u1 - Keyboard mapping

$ sudo apt-get install keyboard-configuration

$ sudo dpkg-reconfigure keyboard-configuration
  -> MacBook / MacBookPro (Intl)
  -> AltGrp = R Alt
  -> defaults

u2 - Get Macbook wireless working:

$ sudo apt-get update
$ sudo apt-get install firmware-b43-installer
Reboot

u3 - Additional packages via Ubuntu Software Centre

u4 - 16.04 (Xenial Xerus) Ubuntu software

(en.wikipedia.org/wiki/GNOME_Software)

u5 - Additional packages via apt

u6 - Clearing '/boot' for Software Update

Software Updater complained about '/boot' not having enough free space

$ uname -r
  4.4.0-53-generic
$ dpkg --list|grep linux-image
$ sudo apt-get purge linux-image-4.4.0-47-generic
  The link /vmlinuz.old is a damaged link
  Removing symbolic link vmlinuz.old
   you may need to re-run your boot loader[grub]
  The link /initrd.img.old is a damaged link
  Removing symbolic link initrd.img.old
   you may need to re-run your boot loader[grub]
$ sudo update-grub

u7 - OS shift

(26/4/17)

$ cat plain.txt | openssl rsautl -encrypt -pubin -inkey ~/.ssh/id_rsa.pub.pem > cipher.txt
$ cat cipher.txt | openssl rsautl -decrypt -inkey ~/.ssh/id_rsa

u8 - Software Updater complaining about untrusted packages

(13/5/17)

$ sudo apt-get clean
$ sudo mv /var/lib/apt/lists /var/lib/apt/lists.bak
$ sudo mkdir -p /var/lib/apt/lists/partial
$ sudo apt-get clean
$ sudo apt-get update

W: GPG error: https://repo.skype.com/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1F3045A5DF7587C3
...
gpg: key DF7587C3: public key "Skype Linux Client Repository <se-um@microsoft.com>" imported

$ sudo apt-get update
...
Reading package lists... Done

Now Updater works