Try at your own risk.
If you happen to be one of several people that somehow end up with two different icons in rEFIt that boot GRUB for Ubuntu, then this will show you how to remove one of them.
Background
The issue is that the Ubuntu installer by default installs GRUB to the MBR of the Hard Drive. This is OK for most PCs as this will make it easiest to dual-boot with Windows. On Macs, however, We usually use rEFIt or Hold the Option Key at startup to select which partition to boot from, and having GRUB in the MBR means that you have to use both rEFIt and GRUB to get to windows (for a triple-boot), so most guides tend to install GRUB to the Ubuntu partition and that is OK, but with the advent of a
installer bug. The MBR becomes corrupted and many users unknowingly reinstall GRUB to the Ubuntu partition after it has already been installed to the MBR, and thus you get two instances of GRUB to boot.
WARNING: The following commands can easily wipe out your entire hard drive if you are not very careful (make a typo). Please make sure you have everything backed up before proceeding.
Now, the Good Stuff
Before you do any of the following, make a backup of the entire MBR:
Code:
sudo dd if=/dev/sda of=/home/username/mbr_backup bs=512 count=1
Now complete the appropriate step below to clear the portion of the MBR you need.
In order to Clear out the MBR except the partition table (Literally, write zeros over the current MBR contents):
Code:
sudo dd if=/dev/zero of=/dev/sda bs=446 count=1
To clear the complete MBR, including the partition table (On a Mac, the partition table can be recovered by syncing your partition tables with rEFIt):
Code:
sudo dd if=/dev/zero of=/dev/sda bs=512 count=1
If you have issues after clearing a portion of the MBR. These commands show you how to restore it.
To restore only the Bootsector (not including the partition table):
Code:
sudo dd if=/home/username/mbr_backup of=/dev/sda bs=446 count=1
To restore the entire MBR:
Code:
sudo dd if=/home/username/mbr_backup of=/dev/sda bs=512 count=1
Bookmarks