Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

removing GRUB from sda

*** Report for internal hard disk ***



Current GPT partition table:

# Start LBA End LBA Type

1 40 409639 EFI System (FAT)

2 409640 468079487 Mac OS X HFS+

3 468342784 488396799 Basic Data



Current MBR partition table:

# A Start LBA End LBA Type

1 1 409639 ee EFI Protective

2 * 409640 468079487 af Mac OS X HFS+

3 468342784 488396799 83 Linux



MBR contents:

Boot Code: GRUB



Partition at LBA 40:

Boot Code: None (Non-system disk message)

File System: FAT32

Listed in GPT as partition 1, type EFI System (FAT)



Partition at LBA 409640:

Boot Code: None

File System: HFS Extended (HFS+)

Listed in GPT as partition 2, type Mac OS X HFS+

Listed in MBR as partition 2, type af Mac OS X HFS+, active



Partition at LBA 468342784:

Boot Code: GRUB

File System: ext4

Listed in GPT as partition 3, type Basic Data

Listed in MBR as partition 3, type 83 Linux




Ok, so I had partitioned last night and installed Ubuntu, ran into some problems with the EFI firmware, but eventually learned how to flash and fix it. Now, I had first thought it was an issue with the installation, so I tried reinstalling, but on the second time i installed GRUB to sda, not sda3. Now I have the entire EFI issue resolved, yet on rEFIt I get the extra options ("Boot EFI\ubuntu\grubx64.efi from EFI" and the old "Boot Linux from HD" which had been when I tried to reinstall Ubuntu with GRUB in the wrong spot) in addition to the "Boot from OS X" and "Boot Linux from HD" (which is my fresh new installation). Since the unwanted GRUB is on sda, not sda3, how can I access it and remove it?


Thanks.

iPhone 3GS, iOS 4, MacBook Pro 15"

Posted on Jun 9, 2011 2:35 PM

Reply
17 replies

Oct 29, 2011 11:46 AM in response to ds store

Thank you for your quick answer, i did run this command line from a terminal windows a few minutes ago (with disk0) and it worked for one of the entries : "Boot Linux from HD" that was in the corrupted MBR if i understood well.


but i still have the entry for the Grub i installed by mistake on the EFI partition : "Boot EFI\ubuntu\grubx64.efi from EFI".


If i find a solution for this one, i'll post it here. 😉

Oct 29, 2011 1:19 PM in response to DesuMotoko

I finally resolved the problem in two steps.


Step 1 : remove "Boot Linux from HD"

you have to run the following command from a terminal window:

fdisk -u /dev/disk0


As ds store said, the suffix number might change depending on the configuration, apparently for a Macbook pro 5,4 with one disk, 0 seems to be the good guess



Step 2 : remove "Boot EFI\ubuntu\grubx64.efi from EFI"

This one is a bit more tricky, surely there is another way but this one is simple and not so risky

1- burn a GParted Live CD iso

2- boot on the GParted live CD (press alt on boot and wait for the CD boot option to appear) and choose the first boot entry

3- during the boot process accept every option with its default value

4- in GParted select the EFI partition and somewhere in the menus select the "flags" entry and uncheck "boot"

5- exit GParted Live CD and boot in Mac OS

6- a new volume has appeared "/volumes/efi"

in the finder go to "/volumes/efi/EFI" and delete the "ubuntu" folder

7- repeat steps 2/3 and step 4 but check "boot" instead of unchecking it

8- exit GParted live CD and reboot

9- enjoy 🙂



hope this will help someone in the future as i spend some time on it!

Dec 22, 2012 7:33 PM in response to DesuMotoko

I made the same mistake and installed grub2 to /sda (instead of /sda4, for example) using the Ubuntu installer. Much simpler (and far less risky, IMO) than all the above – so long as you are willing to remove all your partitions except your original OSX partition, and you have a mac that supports Boot Camp – is:


1) using gparted (on Ubuntu Live CD) remove all other partitions (/sda3, /sda4, etc. – keeping /sda1 = EFI and /sda2 = Macintosh HD)

2) now, if you hold down the option key when booting, you should have the option to boot from OSX or Windows (just as if you had used boot camp)

3) use the Boot Camp Assistant (on your original install discs or can be downloaded from apple, depending on your operating system) to remove Windows.


Tada!


This was only tested using OSX 10.6.8 (snow leopeard) but I presume should work for any mac that supports boot camp.


Also, using rEFIt (google it) I found much more straightforward than manipulating the EFI directly. Just make sure you install grub (bootloader) on /sda4

Aug 10, 2013 4:46 PM in response to DesuMotoko

Hi,


I just did a similar thing. I was building a portable hard drive for recovering systems. OSX was installed and happy, so I added Ubuntu. Although I selected the portable as the drive to install everything on, it installed GRUB on the portable, but told that macbook that it should use GRUB from the portable! So without the portable, I couldn't boot at all (holding down option still worked).


I "kinda" followed mikelikesbikes advice and just changed the startup volume. (Didn't want to delete and re-install bootcamp or the recovery).


And presto, it booted straight into OSX like it should have.


Going to stick to dedicated recovery CDs for windows/linux boxes now.


ps. I don't use refit or any other bootmanager, so am quite happy from left over rubbish to hang around. (As long as I can't see it 🙂

Aug 31, 2013 1:54 PM in response to BigLuiz

Fab! Many thanks, BigLuiz!


Have been test-driving a couple of versions of Linux Mint alongside OS-X. Decided to try something else so deleted the partitions through Gparted and was then left with the Boot EFI\LinuxMint\grubx64.efi from EFI when booting through Refit. (Yup, I'm someone else who does these silly things late at night!)


MacBook Pro 7,1 / OS-X 10.6



Dec 29, 2013 1:47 PM in response to BigLuiz

Thank BigLuiz - this worked for me too!


My problem was less severe: I just got the GRUB shell when booting, typing "exit" would continue the boot. But, that's annoying. Following BigLuiz' directions fixed it. I haven't tried re-writing the MBR using fdisk -u, and since I try very hard not to break my Mac (it being what I use for work), I'll probably just let alone since I don't intend to dual boot on it (I was just installing Ubuntu from a USB drive to another USB drive).

removing GRUB from sda

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.