There are tons of different approaches to this, all leading to the same end state. Here, I will overview a few of the possibilities, and discuss, in particular, what I did to enable this.
The options seem to be:
All of these can be accomplished without disrupting your Mac OS X install, if you’re careful. That’s almost a different topic, I guess. But if you’re doing this for the first time, you’ll probably end up re-installing Mac OSX. So just expect that.
Option 1 (rEFIt) is the easiest, and is widely documented. Novice or intermediate Linux users (anyone not at home on the command line) might prefer this route. Ubuntu has documented the install method at the UEFI page.
Option 2 is what I chose, because it’s cooler, and removes one step from the computer’s boot sequence. Also, it is an appealing option if you don’t like the look of rEFIt, find it kludgy, or have some other complaint about it.
Option 3 is the 1337est, by far, but the least documented on the Internet. Some of the only solid documentation I have found so far on the topic includes:
I will probably try this later, and document the method in a separate post.
Anyway, we’re talking about Option 2, in this post. So back to that.
Alright, let’s describe the inputs and outputs of this process.
Input: An Apple MacBook Air 5,2 (mid-2012) running Mac OS X Mountain Lion
Output: The same system, dual booting Mac OS X Mountain Lion and Ubuntu 12.10 amd64 (NOT +mac) from grub-efi, loaded from the Apple bootloader.
There are a couple ways to obtain the Macintosh installer dmg:
NOTE: I do not recommend option 2, as it is almost definitely illegal, and against Apple terms of service.
You should prepare one of your USB sticks as a bootable Mountain Lion install drive. Nate’s documented method works perfectly: How to create a bootable OS X Mountain Lion (10.8) USB drive from/with Linux.
One small note: when I went through it, the .img file I obtained was about four times larger than when he did it, and so had a different MD5 sum. But it still worked absolutely great. I think perhaps his .img was only one of the partitions?
You should also prepare another USB stick with the 12.10 amd64 image.
The usb-creator-gtk that comes with Ubuntu works great for this. From your reference Linux computer, download the 12.10 desktop iso, and follow the Ubuntu instructions on preparing USB install media with usb-creator-gtk.
You’ll briefly install eEFIt to make your life simpler. You’ll remove it later.
If you don’t have Mac OS X Mountain Lion installed at all (at this point), then install it, using the USB drive mentioned above. Try to use about ~50% of the disk, and leave space for Ubuntu. Keep it as “free” sapce. Okay. So now you have Mac OS X.
Alternately, if you already had Mountain Lion installed, then use the Disk Utility to resize the main partition. Create some empty space, where we will (eventaully) install Linux.
Note: you can also accomplish this stuff with
gdisk on Linux.
Once you have that all squared away, install rEFIt. See their webpage for up-to-date instructions on How-to install rEFIt. Easy.
At this point, you have a Mac OSX system with rEFIt installed.
So, plug in your Ubuntu install drive, reboot, and start a normal install. As you’re going through it, don’t modify any of the Apple partitions in any way.
Once the install completes, you have a dual boot system using rEFIt. Cool.
Basically, follow this existing guide to a T. Just replace literally all occurrences of “Debian” or “debian” with “Ubuntu” and “ubuntu”. Also be careful about partition indexes.
Another note I will stress: you’re still not modifying the Apple partitions. The second EFI partition you create (there, sda5) is separate from, and in addition to, the Apple partition.
After you do that, you have to actually uninstall rEFIt, which is easy. Boot up OSX, and run:
sudo rm -r /efi
Note: that particular efi directory, at the root of the Mountain Lion install, is just rEFIt stuff; nothing else.
So, you should be pretty much done, now.
I had to do a bit of cleanup though:
The first two are pretty routine tasks for a Linux dude.
To get your icons in order, do as glandium.org suggests for the Linux install:
png2icns /boot/efi/.VolumeIcon.icns /path/to/some/128x128/png/file.png
For the Mountain Lion install, boot into Mac OSX.
.VolumeIcon.icns at the root of your OSX install. For me it was
/Volumes/Mountain\ Lion/, I think.
Then run this from Mac OS X, to enable a custom icon for the volume:
SetFile -a C /Volumes/Mountain\ Lion/ # Or whereever the volume is actually mounted.
There you have it — how I got to the boot screen pictured at top.
Join me next time for a blog on “Booting Linux as a UEFI Boot Stub on an Apple Macintosh.”
© 2017 nosemaj.org