Install Ubuntu linux on macbook

20160306     jean@huens.be

Macbook Pro running OSX 10.11 "el capitan"

20180215   jean@huens.be

Ubuntu 18.04 + High Sierra

First disk copy with super-duper.

Switch disk.

Installed ubuntu 18.04 with usb.

Problem with additional displays

With ubuntu 16.04 additional displays connected through the displayport adapter to VGA or HTML could be activated in setting.

This does not work in 18.04.

Ubuntu 16.04.3 + Os-X High Sierra

Last installation was done with Ubuntu 16.04.3 LTS, the OS-X version was high sierra.



See http://www.howtogeek.com/187410/how-to-install-and-dual-boot-linux-on-a-mac/

Problem with disk
 

Some time after the installation. the macbook hardware broke down. But I had spare macbook pro and swapped the disk.

Os-X high sierra did boot without problems.

Unbuntu 16.04 did boot without problems, except that the wireless interfaces did not work any more.
I did follow the instructions on https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers.

Install rEFInd

 Since macos uses SIP check http://www.rodsbooks.com/refind/sip.html#disable_in_osxi

This is what I did follow to install rEFInd. Remarks:


See http://www.rodsbooks.com/refind/installing.html

I did install rEFInd on macos but El capitan forced installation in recovery mode. (boot Comman+R)

Remember the location /Volumes/macos/users/jean/Downloads/

reboot


Install Ubuntu 16.04

20160526


The Installation was triggered by a problem with ubuntu 14,04.

  1. Create USB stick usable on Macbook Pro:
    This was done on a Imac running OS X "El Capitan"
    The ISO was downloaded from  Ubuntu.
    bash-3.2# ls -l
    total 3649736
    ...
    -rw-r--r-- 1 root staff 43 May 27 20:22 typescript
    -rw-r--r--@ 1 jean staff 1485881344 May 27 20:15 ubuntu-16.04-desktop-amd64.iso
    bash-3.2# hdiutil convert -format UDRW -o ubuntu-16.04-desktop-amd64.img ubuntu-16.04-desktop-amd64.iso
    Reading Driver Descriptor Map (DDM : 0)…
    Reading Ubuntu 16.04 LTS amd64 (Apple_ISO : 1)…
    Reading Apple (Apple_partition_map : 2)…
    Reading Ubuntu 16.04 LTS amd64 (Apple_ISO : 3)…
    ......................................................................................................................................................
    Reading EFI (Apple_HFS : 4)…
    ......................................................................................................................................................
    Reading Ubuntu 16.04 LTS amd64 (Apple_ISO : 5)…
    ......................................................................................................................................................
    Elapsed Time: 38.898s
    Speed: 36.4Mbytes/sec
    Savings: 0.0%
    created: /Users/jean/Downloads/ubuntu-16.04-desktop-amd64.img.dmg
    bash-3.2# ls -l
    total 6551848
    ...
    -rw-r--r-- 1 root staff 2738 May 27 20:25 typescript
    -rw-r--r-- 1 root staff 1485881344 May 27 20:25 ubuntu-16.04-desktop-amd64.img.dmg
    -rw-r--r--@ 1 jean staff 1485881344 May 27 20:15 ubuntu-16.04-desktop-amd64.iso
    bash-3.2# diskutil list
    /dev/disk0 (internal, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *1.0 TB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_HFS Macintosh HD 999.3 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    /dev/disk1 (external, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *31.0 GB disk1
    1: EFI EFI 209.7 MB disk1s1
    2: Apple_HFS UBUNTU16-04 30.7 GB disk1s2
    The USB stick is device /dev/[r]disk1
    bash-3.2# diskutil unmountdisk /dev/disk1
    Unmount of all volumes on disk1 was successful
    bash-3.2# dd if=ubuntu-16.04-desktop-amd64.img.dmg of=/dev/rdisk1 bs=1m
    1417+1 records in
    1417+1 records out
    1485881344 bytes transferred in 180.989510 secs (8209765 bytes/sec)
    bash-3.2# diskutil list
    /dev/disk0 (internal, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *1.0 TB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_HFS Macintosh HD 999.3 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    /dev/disk1 (external, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: Apple_partition_scheme *31.0 GB disk1
    1: Apple_partition_map 4.1 KB disk1s1
    2: Apple_HFS 2.4 MB disk1s2
    bash-3.2# diskutil eject /dev/disk1
    Disk /dev/disk1 ejected
    bash-3.2# exit
  2. Insert Usb in Macbook and boot while option-key. You will get a screen showing a number of bootable EFI images. You have to experiment to find the one corresponding to the USB stick. If you find it it will boot and you will get into a menu where you can select try Ubuntu without installation.
  3. Ubuntu did start up and there is  a "install ubuntu" icon. This ia what I did use.
  4. Select "something else" and you will get a disk-partition manager, I did select to erase and reuse the Ext4 partition for ubuntu 14.04
  5. The installation works without problem.
  6. Previous steps and following steps are based on the information in http://computechtips.com/960/install-linuxmint-macbook  . This Url suggests Mint needs a number of steps before rebooting. I did follow them, but doubt they are necessary.
  7. (not needed) apt-get install efibootmgr
  8. (not needed since already OK) efibootmgr -o 0,80
  9. (done does not harm and eases booting) add at end in /etc/grub.d/40_custom
    menuentry "OS X El Capitan" { exit }

  10. (not needed) chmod -x /etc/grub.d/30_os-prober
  11. update-grub
  12. shutdown and reboot
The machine does start into a working ubuntu 16.04.

To boot macos interrupt the Grub screen by pushing ESC and choose OS X El capitan or end the grub-bash shell with exit().
You will get the rEfiboot screen ans the OS-X logo starts OS X El Capitan.

Wireless on Macbook Pro

The wireless on macbook pro is a Broadcom device, and it needs apropriate firmware:

Problems 

It is not clear to me if grub is EFI capable and can e.g. boot OS-X without rEfiboot.

Moreover I get 4 Icons with rEfiboot:
  1. ubuntu icon 1 : starts grub...64 ....
  2. ubuntu icon 2 : starts fwupx64.efi 
  3. OS X : starts OS X el Capitan
  4. ubuntu icon 3 : starts ubuntu 16.04
If

Install Ubuntu14.04

See http://www.rodsbooks.com/ubuntu-efi/

Steps I did to get IT working

Hold dowm   "Command" and R to reboot in recovery mode:

To enable SIP on macos Boot in recovery mode
Hold down "command"  and R to reboot in recovery mode

Failure in ubuntu 14.04 upgrade

Do not know when this problem first did show up.

Problem "apt-get dist-upgrade" fails. A number of packages are in weird state  (lsb-release, and 2 python3 packages).
The most usefull message is python related " failed to load module os ".
The internet (python stuff) seems to find this a simple problem (missing link during transition from python 2 to puthon 3).

Could not solve this, whitout python experience, and decided to install ubuntu 16.04.