Jump to content
RESET Forums (homeservershow.com)

Running Windows 2012 R2 from USB drive


Recommended Posts

Hi all,

Here is some info I would like to share about running Windows from USB drive on a server.
As usual, I am not responsible if you destroy your server using anything described here!

A while ago, I was running Hyper-V 2012 R2 from an USB drive on HP MS G8 for more than a year - despite many people claiming that USB drives are not reliable.
I disabled the page file and was using a more-or-less recommended flash drive - Kingston Datatraveler Ultimage G3.

The disk performance of host os was limited to the internal USB2 port, however all HDDs were free for VMs and Storage Services.

At some point, I decided to use rack-mounted servers, as 16GB RAM limit on HP MS G8 was too low for me.
Long story short, I got 2 servers in the garage and installed the full Windows Server 2012 R2 OS - mainly for the amazing data deduplication feature of Storage Services.

As a full OS can wear a flash drive much quicker (I am running them with GUI enabled), I decided to use something more reliable than a simple flash drive. As I did not want to spend money for USB SSD drives (like Kingston HyperX?), I went to a much cheaper route - I got the cheapest mSATA SSD drive (Intel SSD 310 @40GB) and the cheapest mSATA-to-USB adapter. Well, the cheapest adapter didn't work on my laptop but did work on the server, so the second one was a little bit more expensive - by ~50p. In total one enclosure with a SSD drive costed me ~30GBP.

Then, I migrated the installed OS to the SSD - and this is the tricky part. I did the following:
1. Attached the SSD-in-USB-enclosure drive to the destination port on the server and all further actions were performed on the server via RDP.
2. Partitioned the destination drive according to MSDN recommendations:
  a. UEFI server: https://msdn.microsoft.com/en-us/library/windows/hardware/dn898510%28v=vs.85%29.aspx
  b. MBR server: https://msdn.microsoft.com/en-us/library/windows/hardware/dn898504%28v=vs.85%29.aspx
3. Captured the live server OS in a VHDX with Disc2vhd tool: https://technet.microsoft.com/en-us/sysinternals/ee656415.aspx
4. Mounted the captured VHDX file, assigned a drive letter to the OS partition and removed the letters from others (the tool captures them as RAW partitions even if you unchedk them from capture process).
5. Mounted the SYSTEM hive from OS on the VHD drive: http://smallvoid.com/article/winnt-offline-registry-edit.html
6. Updated the driver loading flags to load USB drivers on boot (otherwise you get BSOD when loading from USB): http://blog.frankovic.net/2010/06/install-windows-server-2008-r2-or-windows-7-on-usb-stick/
   However, by trial and error, I found that the article above does not specify the needer path for the flags key and to make it work I had to edit the key at the following location: <LOADED SYSTEM>\HardwareConfig\<some guid>
7. Removed the information about drive letters from original HDD, otherwise the OS boots from a drive different than C but certain system files get loaded from C anyway and all this leads to weird errors: http://windowsitpro.com/windows-client/changing-windows-system-drive-letter
8. Captured the OS image into a WIM file (yes, without sysprep): https://msdn.microsoft.com/en-us/library/windows/hardware/dn898498%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
9. Depending whether the server is UEFI or MBR, the following was done to make it boot:
  a. UEFI server: use bcdboot tool and force UEFI boot configuration. I had a few automatic repairs and reboots after, but all worked in the end.
  b. MBR server: use bcdboot tool with default parameters and then use bootsect tool to fix the MBR boot record. All worked from the first try.
10. Booted the OS and verified that it indeed uses the new USB SSD.
11. Using bcdboot tool enabled the hypervisor launch (it is disabled in default configuration): http://blogs.interfacett.com/enabling-hypervisor-auto-start-boot-configuration-database-bcd

According to general recommendations, the page file was not disabled.

General recommendations:
0. DO NOT delete or alter or change or touch or do anything with the original OS HDD until you boot everything from USB SSD and set up backup and make sure it works and you are happy with it! You've been warned!
1. Set up backup asap and make sure you can restore it.
2. Have a Windows Deployment Services server running in the network - it is really helpful when you need to load Windows PE to fix broken boot records.
3. Have running all necessary remote tools - like iDRAC console on Dell, iLO on HP or iKVM/IPMI on Supermicro to avoid running around with monitors and keyboards. It is much more fun to do everything from your sofa.

For me, all is working fine so far - I will post here if I will encounter any issues or find some more interesting information.
I hope this information will be helpful to someone.

Thank you for reading!

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Hey Artiom


Can I ask you about your USB 2012 install?


I plan to run 2012 R2 from the USB drive and save all 4 x 3.5 for data/VM's.  How did you choose the USB as the destination for the OS?  Did you have to make it part of the RAID setup?  Is it an off the shelf config or was all a workaround?





Link to comment
Share on other sites

Windows Installer cannot deploy OS to an USB drive - you will have to deploy it manually.

1. Partition the drive with diskpart (I am using GPT format).

2. Deploy the Win 2012 R2 from wim image with dism.

3. Update drive boot with bcdboot.

4. Plug the USB drive into server and set it as bootable.


I did this several times and everything is still working perfectly.

Link to comment
Share on other sites

Thank you.  My Microserver will be here this week so just preparing.  I may just stick in a cheap/small SSD for the OS but looking for options.  Cheers, Daren  

Link to comment
Share on other sites

it all depends on the needs. My servers are running perfectly on 40GB mSATA SSDs in USB enclosures - Hyper-V + File Services. Everything else is installed in VMs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...