Microsoft and UEFI
2013-Nov-30, Saturday 10:19 pmThe UEFI standard was intended to make it easy to boot different kinds of operating systems on the same computer. Leave it to Microsoft to obstinately ruin the beauty of that open environment. I spent several hours today trying to make it work. It is working now, after I learned how to get around Microsoft's obstacles.
The motherboard on my old computer system died on Friday. I spent a lot of money buying parts for a new system, then I spent today building it out. I got stuck when it came time to install a new Windows 7 Professional 64-bit operating system. I know that I wanted this system to use the new standard. (I eventually want to install other non-Microsoft operating systems to try out.)
1) I created a text file on an existing hard drive with the commands listed in step 4.
2) I interrupted the BIOS autoselection of boot dvd drive in order to manually select the UEFI dvd drive. It's a duplicate of the standard drive, but it had the "UEFI" prefix on it. Unlike the standard boot image, this one is actually able to create a UEFI windows install. Nothing in the Microsoft boot text would tell you otherwise. I eventually discovered this difference by googling.
3) I started the Microsoft install process. When I got to the point where I needed to select the partition to install, I pressed Shift-F10 to get to a DOS prompt. I ran this command (where the "i:" drive letter would be whichever drive letter happens to be mapped on your system):
The motherboard on my old computer system died on Friday. I spent a lot of money buying parts for a new system, then I spent today building it out. I got stuck when it came time to install a new Windows 7 Professional 64-bit operating system. I know that I wanted this system to use the new standard. (I eventually want to install other non-Microsoft operating systems to try out.)
1) I created a text file on an existing hard drive with the commands listed in step 4.
2) I interrupted the BIOS autoselection of boot dvd drive in order to manually select the UEFI dvd drive. It's a duplicate of the standard drive, but it had the "UEFI" prefix on it. Unlike the standard boot image, this one is actually able to create a UEFI windows install. Nothing in the Microsoft boot text would tell you otherwise. I eventually discovered this difference by googling.
3) I started the Microsoft install process. When I got to the point where I needed to select the partition to install, I pressed Shift-F10 to get to a DOS prompt. I ran this command (where the "i:" drive letter would be whichever drive letter happens to be mapped on your system):
diskpart /s i:\winsetup.txt4) Here is the script contained in that "winsetup.txt" file. My new hard drive was disk zero, so the script worked for me. You have to create your own file. Don't run this script on your pc unless you're sure the disk number and partition sizes are appropriate for you. I made partition #2 larger than 100MB because I intend to install several other operating systems and figured it would need the space for setup information for each of them.
rem http://technet.microsoft.com/en-us/library/hh825686.aspxHopefully somebody else will find this blog post on a web search, and save themselves many hours of scratching their heads.
rem http://technet.microsoft.com/en-us/library/hh824839.aspx
rem == These commands are used with DiskPart to
rem create five partitions rem for a UEFI/GPT-based PC. ==
select disk 0
clean
convert gpt
rem == 1. Windows RE tools partition ===============
create partition primary size=300
format quick fs=ntfs label="Windows RE Tools"
assign letter="T"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x80000 0000 0000 001
rem == 2. System partition =========================
create partition efi size=1024
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="EFI System"
assign letter="S"
rem == 3. Microsoft Reserved (MSR) partition =======
create partition msr size=128
rem == 4. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary size=257000
rem == b. Create space for the recovery image ===
shrink minimum=15000
rem ** NOTE: Update this size to match the size
rem of the recovery image **
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Win7"
assign letter="W"
rem === 5. Recovery image partition ================
create partition primary size=15000
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit