Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up Ubuntu Precise on the new 2012 edition of the Apple MBA(5,2) following the excellent guide over here. Now I want to uninstall rEFIt, in order to avoid going over the boot options twice. The boot options are displayed via rEFIt and GRUB in that order. However to do so, I must be able to boot into Mac OS X via grub. At the moment this is not happening. I read somewhere that this requires chainloading. Could someone direct me to get this right?

Thanks in advance!

share|improve this question
up vote 3 down vote accepted

Something like the following GRUB 2 configuration might work:

menuentry "OS X" {
    insmod hfsplus
    set root='(hd0,gpt3)'
    chainloader /System/Library/CoreServices/boot.efi
}

Note that you may need to change the partition number from "gpt3" to something else, such as "gpt2" or "gpt4". You want to identify the partition on which OS X is installed and use its partition number. To use this example, copy it to your /etc/grub.d/40_custom file in Linux and then type sudo grub-mkconfig -o /boot/grub/grub.cfg. I make no promises that this will work, though; I've not tested it.

Another option is to replace rEFIt with rEFInd and forego GRUB 2 in favor of a Linux 3.3.0 or later kernel with EFI stub loader support. Unfortunately, Ubuntu 12.04 shipped with a 3.2.0 kernel, so you'll need to replace your kernel (or wait for Ubuntu 12.10) to do this. The rEFInd documentation details how to do it (see the "Options for Booting Linux" page).

share|improve this answer
    
This worked perfectly for me, thanks very much. – user62664 Feb 11 '13 at 8:24
1  
If you are installing ubuntu on an Apple macbook air do visit Rod Smith's page for all the details. Thanks a lot for all your help with efi. – orthodoc Apr 11 '13 at 17:42

Edit your grub.cfg.

menuentry 'Mac OS X (on /dev/sda3)' --class osx --class darwin --class os $menuentry_id_option 'osprober-xnu-64-6834a4ed4dccef17'  {
insmod part_msdos
insmod hfsplus
set root='hd0,msdos3'
    multiboot /boot
}

Works fine in Ubuntu 14.04 and Mac OS X 10.9.4.

share|improve this answer

I have a macbook Pro 8.2, Late 2011 on which I have installed OSX and Linux Mint.

This are the steps I did:

  1. In OSX I repartitioned my 500gb hard drive in half. For some reason I cannot boot with a USB unless I edit the startup screen with nomodeset but then I get the warning that I am in a safe mode type and no video drivers were loaded.

  2. So booting from a CD, holding down the option key when the mac chimes, I had three options, OSX, Windows, EFI. I tab over and selected the Windows option.

  3. After Ubuntu boots and you click to install to hard drive, when the option comes up either install to hard drive or something else, choose something else.

  4. Then make three partitions: Swap, /(root), and Home, then click to install.

    You will get a warning that you need to make a boot partition or it might have trouble booting, ignore this and continue.

  5. After install and a reboot it will automatically boot into OSX, which I let it boot into just to make sure I still had OSX, but all you have to do is hold the option key down when you hear the chime and you then have two options OSX, Windows. choose Windows and it will boot to Linux.

I have not tried this with Ubuntu although I did with Fedora and Debian and both of them did not work very well with OSX.

share|improve this answer
1  
Welcome to Ask Ubuntu! I recommend editing this answer to be more structured. It's quite difficult to discern the individual instructions from this wall of text. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) – David Foerster Jan 7 at 12:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.