Intro
-----------------------
I have been keeping up with this thread since late 2011. Since I got my Mac Pro, I have wanted an EFI boot. I am a Systems Administrator and unfortunately, there are some things you cannot test inside a virtual machine. I have reached a point where the number of operating systems has surpassed the ability of MBR/BIOS boot methods. Therefore, I have been looking for a workaround for my problem.
It appears that this thread is all over the map. This is an effort to get the most practical issue out of the way, installation. There is a lot of theory and programming being thrown around at the beginning of the thread. We really need to split this off in it's own section. People like me are definitely interested in this aspect of the discussion. However, some just want to attempt an EFI install. That is ok as well.
This is my work spanning 21 straight days of labor + a couple weeks of intermittant attempts at getting things working the way I want them to. I cannot guarantee this will work for you. Good luck. Most of this info is freely available on the thread. However, I do not believe someone has used my method.
Prerequisites
-----------------------
1. WinPE 4.0 CD. I have atached the files to the following link:
http://dl.dropbox.com/u/4308827/WinPE4.zip
Please make sure you are able to boot this off of USB. The awesome thing about the method I used is that it cuts back on coasters. EFI is great in that you can boot off of FAT32 formatted partitions. `
2. EFI shell binary that you can drop on your EFI partition (I used rEFIt's).
3. An OS X install disk so you can be sure you can bless the EFI shell binary.
4. Slipstreamed Windows 7 install.wim that will be called from the Windows 8 installer. This is important. WinPE just allows us to boot into the environment that we need to get SOME graphical output. I tested the Win7 installer using this method and it still will not allow you to select EFI, even when you are clearly booted into it and have graphical output. The installer expects it to be called from winload.efi. If this does not happen, it will report the Drive is of type GPT error. A Windows 7 install.wim slipstreamed into Windows 8 ISO is the only way to get past this.
5. A USB drive that is large enough to just hold the contents of your ISO (I used no physical media. I installed from my Nokia N9)
6. Patience and commitment. This isn't easy, especially the 2nd part of the install where you don't see anything. You have to be able to test different drivers.
7. This isn't necesasry, but maybe a USB device that indicates it is connected will be helpful. I have a Logitech microphone with a green LED.
8. Please feel free to modify this method for your purposes. I require a dual boot System for programming in Xcode. Therefore, I will be covering a dual boot situation with OS X and Windows 7.
9. Make sure that you slipstream drivers that come directly from the Apple CD or from the boot camp distrubution itself. I did not have much success slipstreaming current nvidia drivers EVEN after expanding them and slipstreaming the drivers. I have tested this and you WILL be able to update drivers AFTER you have a Windows desktop.
Step 1 - OS X install
-----------------------------------------------
1. First make sure that WinPE live CD performs a proper EFI boot. I made a UEFI WinPE 4.0 boot disk that is located here:
Basically all you need to do is format a USB drive with fat32 and drop the files onto that disk. When you hold down Option,The EFI boot from USB icon should appear on the screen. If this step does not work, there is no reason to continue, as my method is dependent on this Live CD to work.
2. Install OS X with 2 partitions (1 being the amount of space you want allocated for OS X, and the other free space). OS X will lie to you and say it only creates 2 partitions, when it fact, it creates the proper EFI layout.
3. Finish installing OS X until you get to your desktop.
4. Mount EFI partition manually:
# mkdir /Volumes/EFI
# mount /dev/disk0s1 /Volumes/EFI
5. Extract the contents of the following file to /Volumes/Efi:
http://dl.dropbox.com/u/4308827/Grub.zip
This needs to be in here because we want EFI shell to kick everything off.
6. Bless the bootx64.efi file like so:
bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/EFI/BOOT/BOOTIX64.efi
7. Reboot. Make sure your machine kicks off EFI shell. To boot OS X manually do the following:
fs1:\usr\standalone\i386\boot.efi
Step 2 - Finding your registers
-----------------------------------------------
I only have a single GPU machine. Therefore, you will need to tweak this method to fit your hardware. Here is how you find out the proper registers if this is your first time in the shell. The end goal of this is to get the proper mm commands to set the PCI registers on the correct hardware. Trial and error is the only way I could figure out the proper hardware. Here is my quickest way to find out this info.
EFI shell:
I. Run the following command:
> pci -i -b
II. Look for hardware that says VGA controller.
III. Once you find the the line that says VGA controller, notate the BUS, DEV, FUNC column. These numbers are what you will need to run the mm command. I have illustrated this in the following picture:
http://i.imgur.com/f2dkR.jpg
IV. Trial and error phase. You will need to run the pci -i -b command using the same column of numbers for ever PCI bridge device. Luckily this shouldn't take too long. You are searching for the bus number that was notated by your VGA controller. I have illustrated the section that you are looking for in the next picture:
http://i.imgur.com/n50e5.jpg
V. Notate the bridge number. Now you will modify the PCI registers:
BB = bus
DD = device
FF = function
> mm BBDDFF3E 8 -PCI (Enable VGA on the PCI bridge)
> mm BBDDFF04 7 -PCI (Enable bus master)
And we're done. You will want to script this in startup.nsh later on. Here is how mine looks like:
bash-3.2# cat /Volumes/EFI/startup.nsh
mode 240 63
echo Setting PCI registers
mm 0003003E 1 ;PCI :8
mm 05000004 1 ;PCI :7
Let's move onto the Windows install
Step 3 - Installing Windows through WinPE
-----------------------------------------------------------
1. Shutdown the machine. Let's get a clean boot going.
2. Hold down option. Plug in the USB drive. We want to see that the USB is still a valid EFI boot medium.
3. Select EFI boot. You should see the stupid Microsft Fish. Beta != betta.
4. This environment will not load ANY installers. This is key though. It will provide a preinstallation environment. We can use this to run .exes.
5. Wait for wpeinit.exe to finish.
6. Plug in your USB drive with the contents of your ISOs.
7. Load up Diskpart to check what letter the USB drive was assigned:
>diskpart
DISKPART> LIST VOLUME
DISKPART> EXIT
>E:\ (or letter that was assigned to your USB drive)
E:\
8. cd /path/to/modified_win8_install
9. setup.exe
10. Enter the Serial for your version of Windows 7 at the prompt
11. You should be able to create an install in the free space section of the drive. The installer will create an MSR before your
newly created Partition. However, this is ok. Format the new partition just to give the installer one less hop to choke on.
12. Wait for install to finish.
13. once the install is finished, be sure to let the EFI shell load. Once it has, remove all USB drives. and type the reset command.
14. Your machine will reboot back into EFI shell. Check if the MS bootloader installed correctly:
fs0:\
ls EFI\
If you do not see Microsoft here, something possibly went wrong.
15. either run startup.nsh or ensure your registers are set correctly.
16. boot Windows:
fs0:\EFI\Microsoft\Boot\bootmgfw.efi
17. Hit caps lock and monitor if it comes back up. You need to try and determine if the install is going properly. most people get stuck here. I highly suggest plugging in a USB device with an LED so you can see USB reinitalize and determine what step the installer is in. If your machine reboots, keep loading bootmgfw.efi and start windows normally until eventually you are sitting for a long period of time. You may want to check if your caps lock key works. I leave both the caps lack key and the device with the LED on until install is complete. You may also want to hit enter on the keyboard to see if you can initiate a reboot. If you do, keep booting into windows. Do not stop.
18. The machine will reboot. Repeat the process of booting windows. Eventually your video will come up with the Setting up your machine for first user screen.
19. Once you see this screen, you know video is working. Nothing else needs to be done. Reboot normally.
Note: You may get a message stating that windows failed to boot normally. That's fine. Keep rebooting.
20. Test dual booting between OS X and Windows
21. Enjoy and have a beer or anything to regain your sanity.