Thursday, 31 December 2015

Make a Windows 10 To Go Removable USB Flash drive (MBR and UEFI)

Windows To Go allows you to boot from a USB drive, but Windows 8.1 and Windows 10 will not allow you to boot from a 'flat file' installation on a Removable USB drive.

You can MBR boot Win 10 from a Removable USB Flash drive if you use a VHD to contain the Windows system files however.

But what about UEFI-booting? We cannot have more than one partition visible to Windows on a Removable USB drive, but for UEFI, we need a FAT32 partition which is not able to hold the large VHD file.

Here is how to set up a non-GPT Removable Windows To Go Flash drive so it will MBR and UEFI-boot:

Note that if you use an x64 version of Windows, you will only be able to UEFI-boot from it on 64-bit UEFI systems. If you have a 32-bit UEFI system, use a 32-bit version of Windows.

Aim

To make a Removable USB Flash drive that will MBR and UEFI-boot to Windows To Go.

I used Win 10 Pro x64 TH2. I have not tested this with any other version of Windows.

Equipment/software required


  1. Removable USB flash drive (32GB+) - a fast USB 3.0 drive is preferable!
  2. A spare USB HDD (temporary use only)
  3. EaseUS Home Paritition Master
  4. RMPrepUSB (optional)
  5. WinToUSB
  6. BootIce
  7. Windows 8/8.1/10 Installation ISO - e.g. Win10 Download tool

Procedure


1. Use EaseUS Home Partition Master to wipe and re-partition the Removable USB Flash drive:

USB Flash drive:
   PTN1 Primary Active 300MB FAT32                  (Volume name: W2G FAT32)
   PTN2 Primary            (remainder of drive) NTFS (Volume name: W2G NTFS)

Note the size of the NTFS partition that has been created.

2. Now connect your spare USB HDD and wipe and repartition the USB HDD using EaseUS Home Partition Master or Windows Disk Manager as follows:

USB HDD:
   PTN1 Primary Active 300MB FAT32                   (Volume name: W2G FAT32)
   PTN2 Primary            (remainder of drive) NTFS (Volume name: W2G NTFS)

3. Run WinToUSB - make a WinToGo USB HDD drive using a Windows Install ISO as the source and the USB HDD drive as the target.

The size of the VHD should be set to be about 1-2GB smaller than the free space on  your Removable USB Flash drive.

Set the FAT32 partition as the System partition and the NTFS volume as the boot partition containing the VHD.

3. After WinToUSB has finished, copy the following files and folders to the FAT32 partition from the WinToGo USB HDD:

At this point, only the FAT32 partition will be accessible from Windows.

\bootmgr
\EFI folder
\Boot folder

4. Use RMPrepUSB - Ctrl-O - 2 to swap to partition 2 on the Removable USB Flash drive (you can use BootIce - Parts manage - set accessible for this if you prefer)

5. Copy the large \WinToUSB.VHD file to the NTFS partition on the Removable USB Flash drive

6. Use RMPrepUSB - Ctrl-O - 2 to swap back partition 2 to partition 1  (you can use BootIce - Parts manage - set accessible for this if you prefer). 

The FAT32 partition should now be accessible to Windows.

Disconnect the USB HDD - we don't need this any more.

7. Use BootIce to load and edit both BCD files on the FAT32 partition of the Flash drive:
  • \Boot\BCD
  • \EFI\Microsoft\Boot





Ensure that you set:
Type=VHD(X),
Disk=Removable Flash drive,
Partition: NTFS,
File=\WintoUSB.VHD.

Then click on Save current system.

Don't forget there are two BCD files to edit!

- o -

The Removable USB drive should now be both UEFI and MBR-bootable.

When you boot to Windows, Explorer will see the NTFS partition of the Removable USB drive only. You can use any spare space on that partition that is not taken up by the VHD file for file storage purposes.

You can expand or shrink the VHD using BootIce - Disk Image - VHD Info - Reset Capacity (but it may take a while and does carry a risk of corruption!).

You could run this process twice, once for 64-bit Windows and once for 32-bit Windows and then add the VHDs to your Removable USB Flash drive and use BootIce to add another entry for the second VHD. This would give you two full 32-bit\64-bit WinToGo's that will MBR and UEFI-boot on any system (theoretically!).

Note: If you leave the Removable USB drive with the NTFS partition set as the first (Windows accessible) partition, your UEFI firmware may not be able to boot from it (it may not appear as a boot option in the UEFI boot menu).

Tip: You can copy the VHD to your Easy2Boot USB drive and MBR-boot from it once you have completed the initial Windows Setup process. If you wanted to UEFI-boot from a Removable E2B USB drive, you would need to convert each partition to .imgPTN files - this has been described in a previous blog. e.g.

WinToGo.imgPTN - FAT32 300MB
WinToGo               - NTFS xxxGB containing large WinToUSB.VHD file.


Troubleshooting

If the drive does not MBR-boot to bootmgr, then it probably still has a grub4dos MBR and/or PBR.
You can use RMPrepUSB - DriveInfo - 0 and P1 to look at MBR and PBR.
To fix, run RMPrepUSB and use Bootloaders - Install Std MBR and also Install Bootmgr bootloader.