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:
- Open a command line in administrator mode
- run DISKPART
- type LIST DISK
- Look for the disk number that represents your USB drive
- type SELECT DISK # where # represents the number of your USB drive. Get this right or you will wipe a different drive out.
- type CLEAN
- type CREATE PARTITION PRIMARY
- type SELECT PARTITION 1
- type ACTIVE
- type FORMAT fs=fat32
- type assign
- 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.
- 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.
- 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.
- This file is located in C:\Windows\Boot\EFI\bootmgfw.efi
- On your USB (Let’s assume it’s drive E:) look in E:\efi\microsoft\boot and copy this boot folder up one level so it sits in E:\efi\boot
- Now copy the bootmgfw.efi file from your computer which has windows installed to this new E:\efi\boot folder and rename it to bootx64.efi
- 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.
- 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 \Windows\Panther\
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.