Run Windows 10 from a USB Thumb Drive

By setting up Windows on a bootable external USB flash Thumb drive you have a way to boot into a computer that made need maintenance,  if you want to easily switch between different Operating system copies, try out an OS or application without needing to install on your computer hard drive, or just for fun.

There are directions on the web including in this post Run Windows from an external USB drive that work for setting up a USB external hard drive or if you can get the removable bit set on a flash drive. However these don’t work for a USB Flash such as a Thumb drive.

I’ve done some experimentation with the Windows 10 technical preview and have success getting a USB Flash drive to work which I will walk you through. The instructions below are close to how you would setup an external USB hard drive but there are some tweaks and some remaining issues hopefully Microsoft will have a better story when Windows 10 ships.

The underlying issues with USB Thumb drives are that Microsoft doesn’t support partitions for removable media. Until Microsoft supports partitions or provides better ways to setup the boot information I’d recommend continue to use a USB Hard Drive instead of a Thumb drive.

 PreReqs

Windows 10 Technical preview .ISO or DVD.
USB 2.0 or higher Flash drive with at least 15 Gb or storage capacity

Formatting the Flash Drive

We need to setup the Flash Drive as NTFS. Windows 10 doesn’t work going to a Fat32 drive due to file lengths and ExFat isn’t bootable.  To complicate things even more since the Bootable isn’t set Windows won’t recognize multiple partitions.

We’ll use DiskPart to format the disk and set an active partition.

Run DiskPart as administrator. Its important on to make sure you run as administrator or you’ll get all sorts of errors when running commands.

My typical method of running DiskPart is to first launch a cmd prompt as admin and then type DiskPart.

In Disk Part type

DISKPART> list disk

The disks along with your USB drive should be displayed. Be careful pick the right disk and remember the disk number.

Select the Disk with the select disk # command substituting your disk number for the #

DISKPART> Select Disk #

Run the following commands to erase the disk, create a primary partition, mark the primary partition as active, format it and then assign it a letter.

DISKPART> Clean
DISKPART> Create Partition Primary
DISKPART> Select Partition 1
DISKPART> Active
DISKPART> Format FS=ntfs  quick
DISKPART> Assign

Make note of the assigned drive letter. The examples in the next steps will use e: but you will need to substitute in the letter assigned to your drive.

Find the install.wim file

On the Windows DVD the install.wim is at sources\install.wim. If you have the .iso and windows 8 you can mount the .iso as a disk and use that. I found its faster if I mount the .iso and then copy the install.wim file to my local disk.

For our purposes lets say we have the install.wim at location f:\sources\install.wim

Pick the image index to install

The install.wim can come with multiple images but for Window 10 Technical we pick index 1.  For Windows Server there are multiple choices. To see the list of available image you can run the following command from and administrator cmd prompt (Always use administrator on Windows 8).

dism /get-wiminfo /wimfile:f:\sources\install.wim

Install the image

You now have all the information you need. Just Dism the image you want to the disk.

The following command will  apply the image index 1 on disk f: to the disk on E:

dism /apply-image /imagefile:f:\sources\install.wim /index:1 /applydir:e:\

This can take awhile so be patient.

Mark the drive as bootable

Next you  need to set the disk to be bootable. This is where I haven’t figured out a nice way to get this to work just doing a single bcdboot command.

What does work is to bcdboot both the %windir% boot information as well as the boot information just copied to the USB Flash Drive. More information on bcdboot can be found at https://technet.microsoft.com/en-us/library/dd744347(v=ws.10).aspx

For the boot files we need to specify BIOS since we are going to an NTFS partition.

Back at your administrator cmd prompt run both of these commands substituting the drive letter of your flash drive for e:

%windir%\system32\bcdboot  e:\windows /s e: /f BIOS

 Boot from your USB

Restart your computer to boot from the USB.

Computers have different ways to select to boot off USB, Bios, F9, Esc, F12 that goes beyond the scope of this post. You’ll need to figure out the steps for your specific computer. You may also have to turn off Secure Boot in the BIOS for it to recognize the USB Thumb drive. I also found it worked better if I made the USB drive first in the boot order.

What can go wrong at this point?

Sometimes things go fine from here but other times the Drive isn’t being recognized or you get a message the boot file is missing.

If the USB Flash doesn’t boot properly or gives an error:

  • Shut down
  • Remove the USB Flash Drive
  • Start the computer off of the hard drive.
  • Once booted put in the flash Drive and make note of the drive letter it mounted on.
  • Run the bcdboot command for the drive letter. If e: again then run

%windir%\system32\bcdboot  e:\windows /s e: /f BIOS

  • Restart from the USB

If you run bcdboot multiple times the boot menu will come up. Pick the top one since that is the most recent.

Run through the Windows Setup

Let Windows go through its setup process. If a reboot is necessary make sure on reboot you select the option to boot off the USB Flash Drive.

I hit some issue with what appeared to be time outs when using a slower USB Thumb Drive that it would reboot and restart setup. If this happens you can keep trying but you probably need a faster USB Thumb drive.

Clean up the extra boot image ( Optional)

Congratulations. You have now booted and ran Windows off of a USB Flash drive.

If you had to do bcdboot multiple times when you reboot you can just continue to makethe selection of which Windows to load in when launching the Flash drive or clean up the extra boot entries. I’m not sure why you don’t need them anymore other than there must be some extra Windows goo that marks it to boot off the same partition as selected to Boot From (which would be the ideal way to mark it in the first place).

You can remove the extra boot choices with BCDEdit.

Other Issues

I’ve been running off of a USB Flash to try out Windows 10 since I want to wait to upgrade my main hard drive until Windows 10 is released. While doing this I have found the following issues

Fragile – I found that the USB Flash drive seems to be easily corruptible if you don’t let the computer shut down COMPLETELY before pulling the flash drive or if Windows Hangs and leaves you with the only choice to power down.

Complains about Page Swapfile. Ignoring the error seems to be okay. I’ll update the reported issues when Windows 10 is released.

Leave a Reply

Your email address will not be published. Required fields are marked *