1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Windows Installing Windows 7 in native EFI mode from USB

Discussion in 'Software' started by r3loaded, 9 May 2011.

  1. r3loaded

    r3loaded Minimodder

    Joined:
    25 Jul 2010
    Posts:
    1,095
    Likes Received:
    31
    Windows 8 users: This stuff is now unnecessary. Just copy the entire contents to a FAT32 USB drive and it should boot correctly in native EFI mode.

    I got my replacement SSD at the weekend, and I wanted to install Windows so that it would take advantage of the native UEFI firmware of my Sandy Bridge motherboard. Booting the installer from the DVD will apparently boot you straight in EFI mode as you'd expect (I don't have Windows on disc so I wouldn't know). However, if you create a USB boot drive for the Windows 7 installer, the system will only boot in BIOS mode, and the installer will not let you install in EFI mode to GPT disks.

    After a fair bit of googling and general hacking around, I've managed to get my P8P67-M Pro to boot the Windows installer from a USB drive in EFI mode. Here's what you need to do:

    Requirements:
    • 4GB USB boot drive with Windows 7 64-bit installer - there are plenty of guides around the internet for creating one. Ensure that the drive correctly boots on a BIOS system.
    • A copy of bootmgfw.efi. You can obtain this from an install of 64-bit Windows 7 - look in C:\Windows\Boot\EFI. Alternatively, you can download a copy from here.
    • A system with native 64-bit UEFI 2.0 firmware. This is pretty much all Sandy Bridge systems (except for Gigabyte motherboards) and some new laptops.

    Instructions:
    1. In the root of your USB drive, there is the \efi\microsoft\boot directory. Copy this directory one level up so the files also reside under \efi\boot.
    2. Copy the bootmgfw.efi file to \efi\boot, and rename it to bootx64.efi.
    3. Test the USB drive in a UEFI system. It should automatically boot with the UEFI method, but you may have to specifically choose UEFI boot depending on your system.

    That's it! No need to write boot sectors or anything like that - as long as you have a FAT32 filesystem with a \efi\boot\bootx64.efi file, the computer should pick that up and start booting. There are now two methods to verify that the installer has indeed booted in EFI mode:

    • When you see the Install welcome screen, hit Shift+F10. This will open a command prompt. Run "notepad \Windows\Panther\setupact.log", and the log will show:
      Code:
      Callback_BootEnvironmentDetect: Detected boot environment: BIOS
      for a BIOS boot and
      Code:
      Callback_BootEnvironmentDetect: Detected boot environment: UEFI
      for a UEFI boot.
    • Open the command prompt with Shift+F10, but this time run diskpart. Use "list disk" to see all the disks on your computer, and type "select disk n" to select the disk with number n that you're going to install Windows to (usually 1). Type "clean" to clear the partition table, then run "convert gpt" to create a GPT partition table. Once that's done, close the command prompt and start the install process. When prompted for the disk to install to, choose the one that you just created a GPT partition table on. If no yellow exclamation mark warning appears, the installer will install Windows in EFI mode, creating the necessary EFI partitions and add the necessary bootloader entry to the EFI's NVRAM. Otherwise, you've booted in BIOS mode and the installer will not let you install to a GPT disk.

    I hope you all find this useful! :thumb:
     
    Last edited: 2 Sep 2012
    RedFlames likes this.
  2. r3loaded

    r3loaded Minimodder

    Joined:
    25 Jul 2010
    Posts:
    1,095
    Likes Received:
    31
    Another tip that you might find useful if the motherboard's EFI NVRAM has been reset somehow (perhaps you got a new board or something) or the default bootloader has been changed. Run
    Code:
    bcdedit /set {FWbootmgr} displayorder {Bootmgr} /addfirst
    either from Windows or a WinPE environment and the EFI bootloader will be set back to the default Windows Bootloader.
     
    brave758 likes this.
  3. Paul_T

    Paul_T What's a Dremel?

    Joined:
    22 Aug 2011
    Posts:
    1
    Likes Received:
    0
    Thank you for an elegant solution. It was a head scratcher why I could not EFI boot from my usb drive and due to the relatively recent mass arrival of Sandy Bridge there has not been a lot of posts with a solution to this little install snag.

    Most appreciated.
     
  4. markoles

    markoles What's a Dremel?

    Joined:
    26 Aug 2011
    Posts:
    1
    Likes Received:
    0
    r3loaded thank you for such comprehensive post.
    This is the best write up about installing Win 7 in EFI mode I could find.

    It took me some time to get everything in order and I made several mistakes I would like to share.
    My laptop is HP 4530S and and I was using USB stick with Windows 7 SP1 on it.

    1. Do not use official Windows 7 USB DVD download tool to create bootable USB drive. It formats drive as NTFS and my laptop would never recognize it in EFI mode. I used http://sites.google.com/site/rmprepusb/ to format USB drive as FAT32 Win7 bootloader option and then manually copied files from DVD. Once I've done that I could browse the drive upon EFI boot and get following prompt

    ,Acpi(PNP0A03,0)/Pci(1D|0)/Usb(0,0)/Usb(0,0)/HD(Part1,Sig96EC2807)

    2. My second mistake. Since the link above for bootmgfw.efi is not working I google for it. Search returned some mediafire file and it's wrong. Correct size for bootmgfw.efi should be around 657kB. When you boot in BIOS mode to test your new USB bootable drive, setup creates X: drive. I copied needed file from X:\Windows\boot\efi to USB stick. After renaming and rebooting in EFI mode again I picked my new bootx64 from the list and installation started. Yeah, we are getting somewhere.

    3. I followed above instructions to clean and convert drive to GPT and then let GUI setup create three partitions and and formated third one. Windows setup complained again about not being able to install into hard drive and ask me to check controller. I rebooted to start setup again and computer recognized my newly created GPT drive.
    My new setup prompt

    ,Acpi(PNP0A03,0)/Pci(1D|0)/Usb(0,0)/Usb(0,0)/HD(Part1,Sig96EC2807)
    ,Acpi(PNP0A03,0)/Pci(1F|2)/Sata(Port 0)HD(Part1,SigBB1E3064-6162-44AD-B017-313491)

    Installation went smooth and OS Boot Manager boots me into my new EFI/GPT Windows 7
     
  5. kidmetal

    kidmetal What's a Dremel?

    Joined:
    8 Dec 2011
    Posts:
    1
    Likes Received:
    0
    Thanks for your useful information.

    However, I would like to know is there any way to boot and install UEFI Windows 7 and Windows 8 from a single bootable USB install drive? Thank you!
     
  6. r3loaded

    r3loaded Minimodder

    Joined:
    25 Jul 2010
    Posts:
    1,095
    Likes Received:
    31
    There's no simple dual-boot option as far as I am aware. What I did when I had both 32-bit and 64-bit copies of Windows 7 on my USB drive was to move the entire contents of one copy into a separate folder on the drive, and move the required copy to the root. When I needed to switch versions, I'd just move all the files into their own folder and the files from the other version back out into the root.

    Not the most elegant solution but it works flawlessly.
     
  7. steve6375

    steve6375 What's a Dremel?

    Joined:
    5 Jan 2012
    Posts:
    1
    Likes Received:
    0
    Using a USB Flash Drive (not a USB HDD) you can simply place the ISO files on the USB drive - see http://www.rmprepusb.com/tutorials/firawiniso - I am not sure if you can EFI boot to such a UFD though...
     
  8. r3loaded

    r3loaded Minimodder

    Joined:
    25 Jul 2010
    Posts:
    1,095
    Likes Received:
    31
    EFI boot is actually easier than BIOS boot as you don't need to write a bootsector at all. As long as your disk has a FAT32 partition with the bootloader stored at \efi\boot\bootx64.efi, the system will pick it up and boot from that.
     
  9. vynbos

    vynbos What's a Dremel?

    Joined:
    26 Jul 2012
    Posts:
    2
    Likes Received:
    0
    Thanks, r3loaded

    This guide worked. Many of the other online guides didn't work for me.
    I created my USB installation with WintoFlash which one can instruct to format the USB drive in FAT (I believe that NTSC format cannot be used for a UEFI installation which is why the "Windows 7 USB/DVD download tool" will not work-as as Markoles has pointed out. However because UEFI is becoming the standard, MS might, in time, update this tool to allow FAT formatting). I then followed R3loaded's steps and it installed without a hitch.

     
  10. r3loaded

    r3loaded Minimodder

    Joined:
    25 Jul 2010
    Posts:
    1,095
    Likes Received:
    31
    An update: I believe that it's worth mentioning that for Windows 8, the bootx64.efi file is placed correctly in the install image. Just copy the contents of the ISO to a FAT32 USB drive, and the firmware should pick it up and start the installer.
     
  11. koolwalky

    koolwalky What's a Dremel?

    Joined:
    10 Sep 2012
    Posts:
    1
    Likes Received:
    0
    Just registered to say this,

    My disc did not have the bootx64.efi file which I used to make the USB. I followed your steps and ended up facing an error right after the initial boot.

    File: \windows\system32\boot\winload.efi
    Status: 0x000000f
    Info: The selected entry could not be loaded because the application is missing or corrupt.

    It appears that I don't have the EFI files anywhere on the disc, not even in the compressed files that make up my future Windows and System32 folders...
     
  12. wluv

    wluv What's a Dremel?

    Joined:
    24 Sep 2012
    Posts:
    4
    Likes Received:
    0
    Hey, i just registered here, because i have some troubleshooting to get this done.

    I recently bought a new Laptop upgraded it to windows8, but did not like it at the current status, how ever i formated the OS partition and tried to install windows 7 prof again, encountered the GPT problem, followed the steps above, even used the "RMPrepUSB".
    My problem, when i select the UEFI mode of my stick, the "Repairboot" (i call it this way, it trys to fix the lost OS) of windows 8, as if there were no stick, when i try the normal bios setup i get the error message, that a driver for my optical disc reader is missing (the ux32vd has no dvd reader).

    Anyway thans for the thread, it gave me an idea at least.
     
  13. r3loaded

    r3loaded Minimodder

    Joined:
    25 Jul 2010
    Posts:
    1,095
    Likes Received:
    31
    If you have a USB 2.0 port, try using that - Windows 7 (unlike Windows 8) does not have any inbox drivers for USB 3.0 controllers so that might be why you're getting those error messages.
     
  14. arnshea

    arnshea What's a Dremel?

    Joined:
    19 Oct 2012
    Posts:
    1
    Likes Received:
    0
    It works!

    You are a life saver!!! This worked. I was installing from USB key (I throw out all my optical drives a month ago) so had to reformat it to FAT32 first. Also, had to reboot after converting the disk to GPT for the conversion to "take".

    The yellow warning icon when selecting the GPT partition never went away but after converting then rebooting into setup the next button was no longer disabled. The install went without hitch.

    One other thing - 2 of the USB slots on my ultrabook are usb 3.0, 1 is usb 2.0. The install didn't seem to work from the usb 3.0 slots. This might just be coincidence since I was trying a lot of things at once.

    Thank you!!!
     
  15. idontwannaknow

    idontwannaknow What's a Dremel?

    Joined:
    20 Feb 2009
    Posts:
    50
    Likes Received:
    2
    I followed the steps mentioned but am having this error :

    File: \windows\system32\boot\winload.efi
    Status: 0x000000f
    Info: The selected entry could not be loaded because the application is missing or corrupt.

    I downloaded the bootmgfw.efi file from internet earlier but where do I get this winload.efi from?
     
  16. True_Blue

    True_Blue What's a Dremel?

    Joined:
    6 Dec 2012
    Posts:
    1
    Likes Received:
    0
    I am having the same exact problem.

    I got the bootmgfw.efi file from another Windows installation instead of downloading it though. But the same message is showing for me and I am not sure what to do.
     
  17. pipe

    pipe What's a Dremel?

    Joined:
    6 Dec 2012
    Posts:
    1
    Likes Received:
    0
    I followed all the steps
    My HP Pavilion Sleekbook 14 have the UEFI system

    But, when i try to boot with efi, this error jumps

    Windows Failed to start. A recent hardware blablabla...

    File: \EFI\Microsoft\Boot\BCD
    Status: 0xc000000d
    Info: An Error Ocurred while attempting to read the boot configuration data

    Sorry my bad english!
     
  18. IntricateRuin

    IntricateRuin What's a Dremel?

    Joined:
    17 Dec 2012
    Posts:
    1
    Likes Received:
    0
    Did you ever resolve this? I'm having the same issue trying to get the installer to run on an ASUS X501A. Seems many people have seen this problem, but there doesn't seem to be any documented solution.

    Cheers
     
  19. DrWolfenstein

    DrWolfenstein What's a Dremel?

    Joined:
    7 Jan 2013
    Posts:
    1
    Likes Received:
    0
    I have had the same, still stuck with win 8 which i just dont like. Is there any more info on this please?
     
  20. Funbar

    Funbar What's a Dremel?

    Joined:
    4 May 2016
    Posts:
    1
    Likes Received:
    0
    Has anyone found a solution, duing these last three years


    Windows Files load after adding bootx64.efi to efi\boot\ but it results in the above error
     
    Last edited: 5 May 2016

Share This Page