Installing Windows 7 in UEFI mode from a USB drive

Thanks mainly to this post, I finally installed Window 7 in UEFI mode from a USB drive.

Windows Setup will only install in UEFI mode if it boots in UEFI mode. As PCs transition from BIOS to UEFI many of them automatically fallback to BIOS mode if there’s no EFI-bootable partition.

The Microsoft USB/DVD tool, which modifies a USB key so that Windows 7 can be installed from it, unfortunately formats the USB key NTFS. EFI requires an FAT32 boot partition. So as soon as this particular system, a Fujitsu Lifebook UH572, tried to boot from the USB drive it switched into BIOS mode.

To install Windows 7 from a USB key in UEFI mode:

  1. Format the USB key specifying FAT32 as the filesystem type.
  2. Mount your Windows 7 ISO or DVD.
  3. Copy the contents of the ISO or DVD onto the USB.
    1. That’s right, you can use plain old Windows Explorer to copy the files.
    2. The directory structure on the USB key should be identical to the directory structure on the ISO/DVD when this step is done.
  4. Copy the \efi\microsoft\boot directory up 1 level – to \efi\boot.
    1. This directory was put in the wrong location on the ISO/DVD. A UEFI firmware expects to find a bootloader in \efi\boot.
  5. Download the bootmgfw.efi from this post and copy it to \efi\boot then rename it bootx64.efi.
  6. Boot your target machine from the USB drive.
  7. At the “Welcome to…” window, press SHIFT+F10 to open a command prompt.
  8. Clean the primary disk then convert it to GPT (convert gpt).
  9. Exit then reboot (again from the USB drive).

That’s it. Since the primary disk is GPT formatted and the USB key has \efi\boot\bootx64.efi Windows 7 setup should be running in UEFI mode.

Clean install of Windows 7 on Ultrabook fails

So I get a new ultrabook, the Fujitsu UH572, and promptly plug in my usb stick to do a clean install of Windows. Windows sees 2 drives: a 32GB ssd as Drive 0 and a larger spin drive as Drive 1.

Creating a new partition on Drive 1 doesn't create the expected "System Reserved" 100mb partition on the same drive. It creates it on Drive 0! The installation proceeds but upon reboot the ultrabook will not boot! This cycle repeats with various attempts to patch it on my part (including manually partitioning via diskpart).

The solution? Load the "SATA AHCI Controller Drivers" before partitioning the drives. Once the drivers have been loaded the much bigger spin drive shows up as Drive 0 and Windows installs properly. The drivers are in the files\irst\Drivers\x64 folder of the driver download self-extracting executable. The necessary drivers can be downloaded from Fujitsu's mobile support website.

*whew* For a few hours this ultrabook was looking like it'd be a glorified paperweight...

Windows Search and Undoing RAID-0

So you'd like to undo RAID-0, perhaps because you're replacing the array with a single SSD, perhaps for other reasons.

As far as I can tell there's no "undo RAID-0 but keep my data" option. Most of the articles on the web boil down to "copy your data off the RAID-0 array then delete it."

I've periodically kept a few backups to an external 1TB USB drive. So much of the data on the RAID-0 array has already been backed up.

But how to determine which files have been modified since my last backup?

I love Windows Search. In Win7 (and earlier versions) the following query does the trick:

datemodified:>9/1/2012 NOT kind:music NOT kind:folder

All of my music is backed up to Amazon's Cloud Drive so I'm not worried about backing that up.