Creating a UEFI/BIOS Windows 7 USB and installing to GPT partitions

Standard

I bought a new Asus Zenbook a few days ago and decided to format it and replace the win 7 home premium with bloatware with a clean install of win7 ultimate.

With no DVD drive you have to boot off USB to install it. Then I realized I’d never actually setup a bootable windows install USB before.

After some research I noticed it’s not as easy as it seems if you want to install on a UEFI computer that already has GPT partitions created.

Steps to create bootable Windows 7 USB for UEFI support and GPT partitions:

  1. Open a command line in administrator mode
  2. run DISKPART
  3. type LIST DISK
  4. Look for the disk number that represents your USB drive
  5. type SELECT DISK # where # represents the number of your USB drive. Get this right or you will wipe a different drive out.
  6. type CLEAN
  7. type CREATE PARTITION PRIMARY
  8. type SELECT PARTITION 1
  9. type ACTIVE
  10. type FORMAT fs=fat32
  11. type assign
  12. The drive should now be formatted and marked as active and fat32. Do not format the drive as NTFS or you will only be able to boot into the installer in BIOS mode.
  13. Now you will need to copy the contents of the windows 7 install dvd to the USB with a regular copy paste from windows explorer.
  14. Once this is done you will need to get a copy of the EFI boot manager firmware file from a computer that has windows 64 bit installed on a UEFI system.
  15. This file is located in C:WindowsBootEFIbootmgfw.efi
  16. On your USB (Let’s assume it’s drive E:) look in E:efimicrosoftboot and copy this boot folder up one level so it sits in E:efiboot
  17. Now copy the bootmgfw.efi file from your computer which has windows installed to this new E:efiboot folder and rename it to bootx64.efi
  18. Insert the USB in the machine and turn it on and boot into the UEFI/BIOS loader and check for boot options. On the ASUS Zenbook it detected two boot options on the USB drive. One was UEFI and one was regular BIOS. I made the UEFI option the first choice and restarted the machine.
  19. I could now install windows to the formatted existing GPT partitions that were on the machine.

The reason I didn’t want to install in a regular BIOS MBR scenario is because there are recovery partitions on this drive that are GPT as well and to convert back to MBR from GPT you have to delete all partitions on the drive which would have caused me to lose my recovery and data partitions.

This solution was perfect and gives me the added bonus of UEFI and GPT partitions.

If you need to find out if you have booted into BIOS mode or UEFI mode when the installer starts you can press SHIFT+F10 when the welcome installer shows up to open a cmd prompt. from here you will likely be at X:Sources. Type cd .. to go back a dir and move into WindowsPanther

Then type notepad setupact.log

Within this file do a ctrl+f and search for

    Callback_BootEnvironmentDetect: Detected boot environment:

It should either say BIOS or UEFI.
Advertisements