iMac replace GRUB2 with rEFIt

0

1

I have a dual-boot of Mac OS X Lion and Ubuntu 12.10. When I installed Ubuntu, it came with GRUB2 as a boot manager, but I can't really use it since I have a bluetooth keyboard that is not supported by GRUB2 - So i get stuck at the default system (Ubuntu) all the time.

However, I have managed to boot into my mac system (which i am in now) and now I want to remove GRUB2 and install rEFIt instead, because rEFIt supports my bluetooth input devices. I have the rEFIt installer ready, but I want to remove GRUB2 first. How could this be done? Thanks!

arielschon12

Posted 2013-04-13T13:37:44.937

Reputation: 103

Answers

0

Don't remove GRUB 2; rEFIt can't boot Linux without the help of GRUB 2 or some other Linux-specific boot loader -- or at least, doing so is awkward and requires advanced skills.

You could, however, install rEFInd, which is an updated version of rEFIt. (rEFIt hasn't been updated in three years.) It's possible for rEFInd to boot a Linux kernel directly, although you'll need to install a suitable EFI filesystem driver and create a configuration file to do so. The procedure would be:

  1. Install rEFInd under OS X by running the install.sh script, as described on the rEFInd Web page. Pass the --alldrivers option to install.sh to install its filesystem drivers. (You can subsequently remove the ones you're not using if you like; they're stored in /EFI/refind/drivers_x64 or /EFI/refind/drivers_ia32.)
  2. Reboot. rEFInd should produce a menu with an option to boot Linux via GRUB 2, and probably one or more other options that boot Linux directly (via vmlinuz-* files). Use the GRUB option; the vmlinuz-* options won't work yet.
  3. In Linux, run the mkrlconf.sh script that comes with rEFInd.
  4. Reboot and test the Linux boot options -- the ones that launch vmlinuz-* files.
  5. If you can boot Linux via the vmlinuz-* files, boot to OS X and edit the /EFI/refind/refind.conf file. Locate the commented-out scanfor line. Uncomment it and ensure the hdbios option is not enabled. This will remove the GRUB entry from rEFInd.
  6. Optionally, in either OS X or Linux, launch gdisk on your hard disk. (There's an Ubuntu package for gdisk, or you can download and install the OS X version.) Type x to enter the experts' menu, type n to create a new protective MBR, and then type w to save your changes. This will erase any hybrid MBR that might have existed on the disk, making it safer.

This procedure doesn't actually remove GRUB from your system, but it renders its presence irrelevant. Removing GRUB is possible, but there is effort and risk involved, so IMHO it's not worth doing.

Rod Smith

Posted 2013-04-13T13:37:44.937

Reputation: 18 427