Installing Ubuntu 14.04 based distribution on a Mac (or any EFI based computer) has become very straightforward. If you read my previous guide on getting Ubuntu installed on Mac mini guide and thought it was long and too many things to configure, relax because you only have to run few commands with the latest Ubuntu 14.04 / Linux mint 17 distributions.
Firstly, remember that you can either split your Mac partitions using DiskUtil and have a separate partitions for your Linux or you can wipe the whole disk and have just Linux on your Mac. If you choose to go with the first, then make a partition on your Mac, of at least 10GB for Linux. And remember how much disk space you allocated for this partition as in the Ubuntu/Mint setup, you will have to point to this specific partition.
Make a bootable USB of Ubuntu 14.04 or Mint 17 (Qiana), you can easily do this by following these instructions (on your Mac).
1. Download the ISO from either Ubuntu or Linux Mint website (make sure you get the 64bit version).
2. Make sure the ISO file copied into your home directory of your Mac with the name linux.iso
3. Then run “hdiutil convert -format UDRW -o ~/linux.img ~/linux.iso” without quotes. This will take a minute or two.
4. If the output file is called “linux.img.dmg” then rename it to “linux.img”
5. Plug your USB of at least 2GB, some old USBs won’t boot so if this guide doesn’t work for your try it with a different USB.
6. Run “diskutil list” without quotes and check the output, should look like the following example. You should be able to distinguish your USB device from your hard drive because of the size, type name (it says usb_disk).
7. Now we gotta unmount the USB disk using this command before writing the image file we created in Step 3. Run “diskutil unmountDisk /dev/diskN“, where N is the USB device number from the above list. As per the above example it would be 2 so command would be “diskutil unmountDisk /dev/disk2″, make sure you get yours right!
8. Making the bootable USB is easy, run “sudo dd if=~/linux.img of=/dev/rdiskN bs=1m”, again N is the USB device number as per Step 6.
This step will take a while, have a coffee and come back.
9. Then you gotta eject the USB, don’t just pull it out. run “diskutil eject /dev/diskN“, again N is the USB device number you used in the above steps. Wait 5secs and then pull the USB out.
10. Reboot your Mac. Keep press “Option / alt” button when you hear the boot sound.
11. You should end up with a password screen where you need to enter your Admin password.
12. You will end up in the bootloader screen of the Mac, now plug in your bootable USB. And press Enter.
13. Continue as per normal Ubuntu / Linux mint installation except the partitions section where you should have a partition for EFI boot partition. So if you choose to have both Mac and Linux you can just split the partition you created in the first steps of this guide to two, for an example one “swap” (of at least 1 to 8GB, or whatever suits you) partition and one “/” (root) partition. And leave the boot loader installation device as as it is (bottom dropdown in partition management section).
If you choose to wipe the whole Mac, I recommend you should chose “Erase disk and install Linux Mint” / “Ubuntu” in the partition management section and leave LVM un-ticked.
14. After finishing the installation process it will ask to reboot, but DONT! get a terminal and run the following commands to make sure that GRUB is the preferred bootloader on your Mac (this overrides your Macs original bootloader sequence but your can revert it back when you want to so don’t panic).
You should also make sure the USB is still plugged into your Mac.
run “sudo apt-get install efibootmgr”
then
“sudo efibootmgr“, this will list something like the below example output
Mint is at address “Boot0000”
Ubuntu is at address “Boot0010”
Mac OS is at address “Boot0080”
above are the EFI identifiers of my mac, yours will look similar what you need to do now is alter the boot sequence.
I ran the following command, which changed my Mac boot sequence to boot Mint first then Ubuntu (which is just a phantom EFI identifier I assume), lastly the Mac’s original.
“sudo efibootmgr -o 0, 10, 80”
then just to confirm that above command altered the sequence run “sudo efibootmgr” again and confirm the new order.
15. Reboot using the menu in Mint/Ubuntu. Unplug the USB.
16. You should come back to Mint/Ubuntu, then you gotta fix your wireless networking if required. Make sure the USB is pugged back in then press the “Super” (Command key or Windows key) key and type “Driver manager“, press enter. You should end up in a screen like below.
Choose the Airport Extreme driver and apply.
Enjoy!
OPTIONAL:
Low colour depth in the second monitor
If you have a dual monitor setup, they you will notice that sometimes one of the monitors display less colours than the other one. I read somewhere that this issue happens in EFI based machines with Intel HD xxxx video cards, but I am not exactly sure the reason behind it.
The permanent fix for this would be to alter a configuration register for the Intel HD video card. The way I prefer for this is through the /etc/profile file.
1
|
sudo gedit /etc/profile |
Add the following line
1
|
intel_reg_write 0x70008 0xC4002000 |
Save the file and exit. In the next boot colours will be normal on both monitors.