insideTheAsylum

A Safe Haven From the World

Dual-booting Windows 8 and Mountain Lion natively using EFI

with 16 comments

efiosxwin

This is NOT about installing Windows 8 on a Mac, this is about using Apple’s EFI to boot Windows.

(If you don’t know what an EFI is, see Wikipedia)

Okay, so here’s what’s going on:

Apple has used EFI to boot OSX for years, but Windows has not supported this method of booting.

With Windows 8, Microsoft claims that you can boot with EFI so long as the drive you’re booting on has an efi partition and uses a GUID partition table.

Here’s the kicker, for years now, OSX has been using a Hybrid MBR partition table… that is they are using a GUID partition table with a matching MBR partition table embedded into it. This means that older versions of Windows can see the partition information from the older MBR system and will work properly using a legacy bootloader. But if you have an EFI installer for Windows, it will not let you install (or even BSOD!) if you try to use it as it sees the MBR and ignores the GUID.

A lot of posts online cite that Apple’s EFI implementation is based on EFI v1.1 and that Windows supports only EFI v2 and newer. This is NOT the case. It doesn’t work because the Windows installer sees the MBR in the hybrid partition table and decides that you are NOT using a GUID partition table even though you are.

Luckily, there is a way around this to get a fully native EFI-booted Windows 8 installation! But beware, this path (while awesome) is paved with daggers, so be prepared to pull your hair out in frustration.

Warning: These steps require you tocompletely erase your hard drive! Make sure you have all the materials and have backed up all of your data before proceeding.

Materials:

  • A recent MacBook Pro (this will probably work on other Macs, but I don’t have any to test with) I’ve tested this on the 1st-gen Retina 15″ and a 13″ 2nd-gen i5 model.
  • A disk drive capable of reading DVDs (you’ll need an external drive for MacBook Retinas or MacBook Airs)
  • A Mountain Lion Install Disk or Netboot Installer
  • A CD/USB drive with the “Windows Support” files from Bootcamp
  • A Windows 8 Pro Install DVD

Procedure:

  1. Put the Windows 8 Disk in the disk drive
  2. Option-boot the computer and choose to boot off the “Windows” disk (Do not choose “EFI Boot” but make sure that it does show up, you’ll need to use it later)
  3. Once the installer gets to the setup screen, hit shift+f10. This will bring up a command prompt
  4. Type the following commands (this assumes that you only have one hard drive):
    1. diskpart (this puts you into the windows partitioning shell)
      1. clean (this erases your entire hard drive by removing all partition information)
      2. convert gpt (this converts your hard drive from an MBR partition table to a GUID partition table)
      3. create partition efi size=200 (this creates the efi partition where the bootloader will live)
      4. create partition msr size=32 (this creates a “MicroSoft Reserved” partition… because microsoft)
      5. create partition primary (this uses the rest of your free space to create a usable partition)
      6. exit (this exits the windows partitioning shell)
    2. wpeutil reboot (this tells the computer to reboot)
  5. Option-boot the computer when it reboots, but this time choose “EFI Boot” instead of “Windows”
    1. Remember to press the any key to boot into the installer!
  6. Choose to use a Custom Install and install Windows 8 to “Partition 3″ (The only primary partition)
    1. Make sure you leave the install disk in the drive through the whole install or you could get a BSOD
  7. Install the Windows Support software from your CD/USB drive to gain full functionality of your computer
    1. Congratulations! You now have a natively-EFI-booting Windows 8 Install! Now, on to dual-booting OSX…
  8. Open “Disk Management” in Windows.
    1. Find your “C Drive” partition and resize it by right-clicking on it and choosing “shrink volume”
      1. Shrink it by the size you’d like your OSX installation to be. ie. if you want to give OSX 100GB, use 102400MB
    2. Right-click on the now empty area at the end of the drive and make a new “Simple volume” Don’t format it.
  9. Reboot the computer into your OSX install disk/Netboot
  10. Open Disk Utility
    1. Choose “disk0s4″ as this will be the 4th partition on disk 0
    2. On the “Erase” tab choose “Mac OS Extended (Journaled)” since this is what OSX likes to use.
    3. Give it a label that you like (Apple defaults to “Macintosh HD”)
    4. Hit Erase
    5. Exit Disk Utility
  11. Install OSX on your new partition.
  12. Congratulations! You are now dual-booting OSX and Windows in a 100% EFI environment! Happy computing :)

Note 1: If you get a BSOD during install, make sure that you have NOT removed the Windows 8 install DVD from the disk drive… during install, removing the DVD at any time will produce a BSOD even though the OS no longer needs the disk to install.

Note 2: Windows now shows up in option-boot as “EFI Boot” instead of “Windows”

Note 3: Because we created the partition that OSX uses in windows, it no longer shows up in “My Computer” in Windows… Here’s how to fix that:

  1. Open “Disk Management”
    1. Right-click on the partition that you created for OSX (it should be labeled as an HFS partition)
    2. Choose “Change Drive Letter and Paths”
      1. Choose “Add”
        1. Assign it to a drive letter of your liking… I used “E”
        2. Hit OK
      2. Hit OK again
  2. You now have read-only access to your Mac Partition!

Update 1: I’ve been informed that for some models the sound does not work in Windows when booted via EFI. It appears to affect models that use the Cirrus audio controller. I’ve gotten ahold of a test unit and will see if there’s a workaround.

Written by David

January 18th, 2013 at 12:51 pm

Posted in EFI,OSX,Windows

Tagged with , , , , ,

16 Responses to 'Dual-booting Windows 8 and Mountain Lion natively using EFI'

Subscribe to comments with RSS or TrackBack to 'Dual-booting Windows 8 and Mountain Lion natively using EFI'.

  1. You don’t have to erase anything if you’re already dual booting Mountain Lion and Windows 7. Just use the Windows 8 DVD to update Windows 7.

    Andrew Pennebaker

    18 Jan 13 at 5:01 pm

  2. Unfortunately, that uses the legacy bootloader NOT EFI

    David

    18 Jan 13 at 5:05 pm

  3. Doesn’t quite work on and early 2011 15″ MBP, partioning goes fine, boots the installer via DVD efi but gives a ‘cannot update boot configuration’ at the end of the file copy process. Ouch!

    Deefa

    31 Jan 13 at 8:47 am

  4. Does using native EFI booting allow to see and use both graphics cards (Intel & NVidia) under Windows (unlike Boot Camp)? How do you switch between them?

    Tim

    21 Mar 13 at 4:57 pm

  5. My current test unit only has the Intel graphics, so I don’t know if it allows the user to see both cards. Since booting under EFI gives windows the same access to the hardware as OSX I would imagine that it is possible. However, it would probably be up to NVidia to make sure that the graphics driver can switch between discrete and integrated.

    David

    23 Mar 13 at 3:38 pm

  6. Deefa, Please send me your model identifier (Macbook X,Y). I’ll try to get ahold of that model for further testing.

    David

    23 Mar 13 at 3:42 pm

  7. FWIW, as long as software can use the integrated graphics’ feature (specifically, Intel Quick Sync Video), I don’t mind and/or care if both cards are enabled at the same time.

    Also, I should clarify that I am using a late 2011 MacBook Pro (Intel HD 3000, AMD Radeon HD 6570M) – I only mentioned NVidia as I assumed your hardware was the 15″ w/Retina model.

    BTW, I had the same error as Deefa, though perhaps not due to the same cause (attempting to EFI install on an external drive connected via Thunderbolt).

    I never tried an EFI install on the internal and went straight to Boot Camp because I didn’t care to image and then restore my OS X install, but I guess the Thunderbolt drive maybe wasn’t the issue after all.

    Tim

    24 Mar 13 at 5:01 pm

  8. On another subject, is there any reason EFI Boot from the Windows 8 install disc can’t be used to call diskpart, avoiding one reboot?

    Tim

    24 Mar 13 at 5:04 pm

  9. Yes, the reason for the initial boot being from a non-efi boot medium is because the hybrid mbr that Apple is using will cause the efi-booted install disk to crash before it gets to a usable point. By using the non-efi boot to format the drive as GPT you alleviate that problem.
    As for the Retina, I’ve had to return the device to Apple several times for screen-related problems (image retention… it’s really bad) since I wrote this post. So it is not currently set up like this (just haven’t had the time)

    David

    25 Mar 13 at 1:10 am

  10. Would the above proceduce work with Windows 7 64 bit, as well?

    Adrian

    26 Mar 13 at 12:09 pm

  11. Hi, just installed on a Macbook Pro 5,2 (Unibody 17″ early 2009)

    Everything works with latest bootcamp drivers in Win 8, except I can for the life of me figure out how to install the NVIDIA drivers.

    GPU’s are geforce 9400m & 9600m GT

    But drivers from website won’t install as i assume the base number for these chips are different.

    Don’t suppose you have any idea?

    d00ski

    28 Mar 13 at 1:08 pm

  12. Adrian – It may well work with Windows 7 64-bit. My attempts to make it work a few years ago did not work, but that was using a different procedure than the one I created for Windows 8. As of now this procedure is untested with Windows 7 64-bit

    David

    28 Mar 13 at 5:15 pm

  13. d00ski – I’m assuming you tried this driver: http://www.geforce.com/drivers/results/59645 ? I don’t have any 17″ models to test with, but I may have access to a 15″ with the same configuration sometime in the next week if your problem persists. It would also be helpful if you posted the hardware ID of the 9600 card (from the Device Manager in Windows).

    David

    28 Mar 13 at 5:19 pm

  14. I sure have. I even used laptop2go drivers with custom inf files.

    I’ve tried installing using the have disk method, and via the software setup.exe from nvidia. Also windows update is no help.

    I then went a bit extreme and tried installing the drivers by advance restarting win 8 without digital driver signing (the driver finally installed, but screen went black and eventually the computer rebooted with a problem has occurred message and driver remove. Back to basic WDDM 1.2. My problem is that there are many pixel on the screen that don’t render, simply because I can’t get a correct driver to install.

    Here are the device instance paths for the GPU’s:

    geforce 9400M
    PCI\VEN_10DE&DEV_0863&SUBSYS_00AF106B&REV_B1\4&3115EB80&0&0080

    geforce 9600M GT
    PCI\VEN_10DE&DEV_0647&SUBSYS_00B0106B&REV_A1\4&27070396&0&0060

    d00ski

    29 Mar 13 at 7:54 am

  15. I did this on a Mid 2010 Mac mini server (2 hard disks). I booted from a Windows Server 2012 install USB flash drive. For some reason, it only appeared in the options boot menu as EFI (there was no Windows boot device icon). I ran diskpart from the EFI-booted session – no crash. The Windows installation completed successfully. Audio worked after installing the Cirrus driver from the BootCamp 5.0.5033 driver set. I could not get any version of the NVIDIA GeFore 320M driver to work, but the Microsoft Basic Video driver, which was installed automatically by Windows setup, did work. The full 2660×1440 resolution of the monitor was displayed. I manually ran the following installers in the BootCamp 5.0.5033 driver set:AppleRemoteInstaller64.exe and AppleNullDriver64.exe. I added the RealTimeIsUniversal=1 value to the registry.

    Sejong

    3 Apr 13 at 6:27 pm

  16. Hi David,

    Did you manage to have a look at my driver issue?

    d00ski

    6 Apr 13 at 2:03 pm

Leave a Reply