Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Restore default bootloader without harming partitions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Restore default bootloader without harming partitions
Authored by: Reaper Man on Nov 20, '09 09:19:12AM

Here are some technical details to understand what this hint is talking about.

First, a bootloader was not restored. Mac OS X has no boot loader in the traditional sense. What you are referring to is the boot code in the Master Boot Record of disk.

The first sector of the GUID Partition Table (GPT) disk contains is a Master Boot Record (MBR). Traditionally, the MBR contained a bootloader that would start the system running. Mac OS X does not normally use this bootloader.

Mac OS X normally uses EFI. The EFI bootloader location is stored in various NVRAM variables that indicate what file to load in order to boot the computer. EFI is much more advanced than older boot systems in that it includes the ability to mount and read file systems.

However, the Macintosh also supports Boot Camp. In order to support Boot Camp the Macintosh will boot from the MBR as described above. The boot settings in NVRAM can be set so that the Macintosh will boot using the MBR instead of the normal EFI settings. This is what makes Boot Camp work. (This is an Mac extension that is not a part of EFI.)

The Ubuntu installer changed the bootloader in the MBR and also set the system NVRAM variable to boot from the MBR. This made it so that your main disk would not show up.

Resizing the partition causes Disk Utility to erase the MBR bootloader and return the system to using EFI.

I would have to guess that opening the Startup Disk Preference Pane would have allowed you to switch back to OS X, although the Ubuntu loader still would have been present. You would see that in the Startup Disk Preference Pane as a selection to boot into Windows. :-)

Just some fun technical knowledge to explain what is really happening.



[ Reply to This | # ]
Restore default bootloader without harming partitions
Authored by: cyberdork33 on Nov 20, '09 11:05:16AM

Yep, also rEFIt is not a bootloader, but rather an EFI executable that allows more control over the default Mac EFI functions (and some other useful EFI tools).



[ Reply to This | # ]
Restore default bootloader without harming partitions
Authored by: Typhoon14 on Nov 20, '09 12:17:45PM

Good explanation. This also goes to show why you in general need to be very careful with anything non-Apple that modifies partitions or boot loaders. The way Apple deals with the MBR is actually rather non-standard. Typically, the MBR is not used at all with EFI, a small amount of data being written there only to let non-EFI systems know that the drive is not blank. Apple actually does write a proper Master Boot Record for the purposes of allowing systems that do not support EFI (Windows XP, and all 32-bit versions of Windows Vista/7) to boot natively. So you have a system with both a Master Boot Record, as well as EFI boot info written to NVRAM. Windows and Linux based disk utilities don't expect this setup and results may be different than you would expect.



[ Reply to This | # ]
Restore default bootloader without harming partitions
Authored by: tofergregg on Nov 21, '09 11:01:11AM

Thanks for the interesting information. I did indeed try to reset the startup disk from System Preferences, but it didn't work. Perhaps it was because I had booted from an external drive.



[ Reply to This | # ]
Restore default bootloader without harming partitions
Authored by: huggybearikf on Nov 22, '09 07:14:14PM

So is there someway to manually erase the MBR bootloader and/or return the system to using EFI through a command console of some sort before entering the OS or through the terminal using the OS X boot disc? I am having the same problem as the OP, but I cannot see the primary partition in the disk utility using the boot disc, and I can't use the trick the OP used.



[ Reply to This | # ]
Restore default bootloader without harming partitions
Authored by: Jorgubb on Jun 04, '10 09:42:22PM

Thank you man! You sved my life!!!



[ Reply to This | # ]
Restore default bootloader without harming partitions
Authored by: blacklaser on Aug 30, '11 02:22:59PM

Hello, being very new to this thread, I want to point out the big trouble I have . After installing BOOTCAMP on the 5 gb partition and running everything as described, I cannot boot the Mac or the WIndows . I presume it starting straight in Windows with a black screen and the message with DISK ERROR , PRESS ANY KEY TO RESTART comes up, the chime is there also. If pressing any key nothing happens . Tried a number of times to restart while holding OPTION KEY. Only them I got a light grey screen with a padlock and a box where I supposed to introduce a password . Tried that to insert my usual Mac admin password, is not working . I have inserted as well the original disk OS 10.5 to run the disk utility, it doesn't respond to C or any other command . I have tried T target mode, it doesn't take a target mode or maybe I am doing something wrong . Please help . Thanks guys .



[ Reply to This | # ]