Questions about EFI booting

Ok, bare with me:

I am using a 2007 macbook. I had been running a triple-boot using the refit bootloader, and it was working just fine. I purchased a bigger hard drive for it - a 750gb seagate momentus - and am in the process of re-installing everything on it. Refit didn't work when I installed it and upon doing some research via google, it appears that there is an issue with refit not working with newer/bigger hard drives. I came across one person who said that when he had this problem, he installed refit on the hidden EFI partition instead of the OS X partition, and that it worked then. Now, this made little sense to me, 'cause whether it's the EFI partition or the OS X partition, it's the same physical disk, and if refit has a problem with these bigger hard drives, then I don't see why installing it on a different partition should make a difference, unless the difference has to do with the EFI partition being FAT32 instead of HFS+. Regardless, I wanted to give it a shot, but I need to understand more about the EFI boot process first, because I want to avoid getting into a situation where the machine won't boot at all.

According to what I read, in order to install refit on the EFI partition, I would have to not only bless it, but I'd have to use this -setboot parameter, which as I understand it, tells the firmware to use the refit(or whatever bootloader) files on the EFI partition to boot the machine. I have also read the OS X uses the EFI partition when it performs firmware updates, and that it might get rid of the refit folder should such a firmware update take place. And so the fear is, the refit folder on the EFI partition is blessed, it somehow disappears because of a firmware update, and the next time I try to boot, I get a grey screen because it can't find the refit folder and it won't be able to boot from anywhere else. So, my questions are:

1. Is it possible that I could get into a situation where because the machine can't find any bootloader, I can't boot at all, not from any partition on the hd, not from os x dvd, not from usb, not from anywhere? Is that a possibility?

2. If it is a possibility, then wouldn't the only solutions be to either find a way to bless the OS X default bootloader on the machine, or to find a way to copy the refit folder back to the EFI partition?

3. Also, if #1 is a possibility, then how does the macbook boot in the first place when the hard drive is completely blank and there's no bootloader file to point to? I don't really understand EFI as much as I want to.

I basically just want to know if installing refit on the EFI partition would in any way open my macbook up to getting bricked. I normally wouldn't even want to use the EFI partition at all, but I want to use refit, and apparently there's an issue with it and bigger hard drives, and someone said it would work if installed on the EFI partition.

Ok, I realize that's a lot of information, I'm sorry for not being more concise, but any assistance is appreciated.

Mac OS X (10.6.6)

Posted on Feb 6, 2011 11:49 PM

Reply
3 replies

Feb 9, 2011 12:26 AM in response to Jon R

Jon,

It's entirely possible that installing rEFIt on the EFI partition may work, as the EFI partition is created using the first physical sectors on the disk, and therefore rEFIt does not need to address the later sectors, fragmented around the disk.

By blessing the partition, you're doing the GUID equivalent as marking the partition as bootable on a MBR disk. You are correct in saying that OS X occasionally updates the EFI partition, and yes, it is possible that the rEFIt folder might disappear. However, should this happen, you can always hold the Option key at startup to bring up the default boot menu.

To answer your questions:

1) No, assuming the only thing to touch the EFI partition is an Apple firmware update, then you'll always have access to a workable bootloader, definitely enough to reinstall rEFIt.

2) This is a non-issue, as stated above.

3) If the hard disk is completely blank, you'll get the disk icon with the question mark, which is simply saying that EFI can't find a bootable partition.

It's unlikely that you'll be able to brick your MacBook purely by using rEFIt, the only chance of that occurring would be if you installed a dodgy EFI update, corrupting the EFI firmware physically stored on flash on the logic board.

I hope this helps you!

Brendan

Feb 10, 2011 9:36 AM in response to Jon R

I bought the same type of hard drive as you did, and ran into a similar problem.
I did manage to successfully install rEFIt on the hidden 200MB EFI partition though.
The instructions I followed were from this website: http://www.felipe-alfaro.org/blog/2006/09/19/installing-refit-on-the-hidden-efi- system-partition/

I will re-copy the instructions here along with my notes in case the website does not work anymore.

==========

1. From the Terminal or command-line prompt, run the following commands:

$ sudo mkdir /efi

This will create the mount point for the EFI system partition.
Note: The Terminal on Mac OS X does not need the $ sign when I tried it.

2. Next, type the following:

$ sudo mount -t msdos /dev/disk0s1 /efi

This command will mount the EFI system partition (usually hidden from Mac OS X) into /efi. The EFI system partition is basically a 200MB FAT32 partition which is, by default empty.
Note: It may have an Apple folder with the firmware code/bootloader in it, but don't delete this. I just left it alone, as I think it is the default bootloader.

NOTE: Please, take into consideration that EFI system partition is usually the first partition on the built-in hard disk, which is usually /dev/disk0s1, although it could be different on your system.

3. Type the following now:

open /efi

This will open the /efi folder in Finder.

4. Now, download rEFIt and copy the contents of the efi folder into /efi.

In the end, you should have the following subdirectories on your machine:

/EFI/Apple
/EFI/efi/refit
/EFI/efi/tools

Note: The first time I did this, I got confused and thought there had to be 2 efi folders on the drive. Then when I tried the next step, it didn't work because I didn't know how directories were set up on Mac OS X. The first /EFI is actually the name of the hidden EFI drive, so in reality there should only be 1 efi folder on your drive when you look at it from the Finder's point of view.

5. Now, we will bless the EFI system partition:

sudo bless --mount /efi --setBoot --file /efi/efi/refit/refit.efi --labelfile /efi/efi/refit/refit.vollabel

Note: This should now make rEFIt as your default bootloader. If for any reason it stops working, you may have to rebless it again starting from step 1.

==========

Now to answer your remaining questions:

1. Your MacBook will always be able to boot from the OS X DVD regardless of what happens. Unless that is you severely scratch the DVD or break it somehow, there should be nothing to fear.

2. If at any time you need to rebless the default Macintosh HD partition, like somehow you want to stop using rEFIt, then all you need to do is start the computer from the OS X DVD and set that partition as the default Startup Disk.

3. I don't exactly understand the boot process either but somehow I got it to work.

4. Your MacBook is not going to get bricked. I recommend burning the rEFIt ISO to a CD so you can use it to boot as well. It has a feature on there that can be used to fix a mismatched GUID / MBR record, which I had to use once because I used gParted Live to resize my Mac and Windows Boot Camp partition. Always keep a backup of any important data you don't want to lose, however!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Questions about EFI booting

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