27 posts in this topic

I was recently asked how to setup a Windows To Go installation that can boot from both UEFI and BIOS PCs with non certified devices.

All the guides I found to do this online are compatible with either BIOS or UEFI but not both.

The reason is because compatibly with both needs 2 partitions so most usb keys wont work

IC611726.gif

So you need either a USB HDD or a USB Key that shows up as a Fixed Disk.

If you cant get your device to pass-through into HyperV its not a Fixed Disk and wont work

http://blogs.technet.com/b/askcore/archive/2008/10/24/configuring-pass-through-disks-in-hyper-v.aspx

Im going to test this using HyperV the only difference between this and creating a real device is changing the drive letters and numbers in diskpart.

rWfK4VO.png

Start by creating two VMs a Gen 1 and a Gen 2 VM both with the same VHD File

xFKXZi3.png

Now boot from the Windows CD on the Gen1 VM as the Gen2 VM will complain about not installing to a GPT disk.

5abPIXS.png

At the install screen press shift + f10 to open command prompt and run notepad to get a GUI file explorer window when you select file > open

ZZP8DPI.png

Convert the disk to MBR format and create 2 partitions a Fat32 system partition marked as active and a NTFS windows partition.

llzrKsp.png

Apply any windows image to the windows partition

llzrKsp.png

Which creates the standard windows folder structure

crOgMNF.png

Use the BCDBOOT command to copy the boot files for both UEFI and BIOS computers from the Windows partition to the Fat32 system partition

MaFjsZG.png

Eject the windows iso and let the Windows To Go drive boot.

iQ4XcKU.png

Complete OOBE

G3R9clc.png

Install whatever software you need

ZeQGQk8.png

Shutdown to test the image on a UEFI Secure Boot PC

cueP5HG.png

Start-up the UEFI PC and the Windows To Go drive boots

NxL5f4A.png

The same user profile now starts up on an entirely different articheture.

Code used

diskpart
select disk 0
clean
convert mbr 
create partition primary size=350
format quick fs=fat32 label="System"
Active
assign letter="S" 
create partition primary
format quick fs=ntfs label="Windows To Go"
assign letter="W"
exit

Dism /apply-image /imagefile:E:\sources\install.wim /index:1 /ApplyDir:W:\

bcdboot w:\Windows /s S: /f ALL
Sources

https://technet.microsoft.com/en-ie/library/jj592685.aspx

https://technet.microsoft.com/en-ie/library/hh825677.aspx

2 people like this

Share this post


Link to post
Share on other sites

THIS IS EXACTLY WHAT I'M TRYING TO DO! I want to make a windows to go that can be booted on my desktop using BIOS, as well as my surface pro 3 using UEFI. Thank you, this guide is awesome! 

I do have a couple questions though. How do I "use the BCDBOOT command to copy the boot files for both UEFI and BIOS computers from the Windows partition to the Fat32 system partition"?

Would both of those be on my surface pro, or would I need to copy it from my desktop, then from my surface? Please explain it to me like I'm a novice... because I am.

This guide is a little vague on that step... actually its kinda vague in general (but its still awesome).

Share this post


Link to post
Share on other sites
6 minutes ago, WIRM.KJones said:

THIS IS EXACTLY WHAT I'M TRYING TO DO! I want to make a windows to go that can be booted on my desktop using BIOS, as well as my surface pro 3 using UEFI. Thank you, this guide is awesome! 

I do have a couple questions though. How do I "use the BCDBOOT command to copy the boot files for both UEFI and BIOS computers from the Windows partition to the Fat32 system partition"?

Would both of those be on my surface pro, or would I need to copy it from my desktop, then from my surface? Please explain it to me like I'm a novice... because I am.

This guide is a little vague on that step... actually its kinda vague in general (but its still awesome).

No, you should do the initial setup in a virtual machine to avoid the risk of messing up the BCD on the pc.

 

Create a virtual machine and passthrough the disk that you want to use for windows to go (if it is using hyperv you need to offline the disk in disk management)

 

Then add a Windows iso to the virtual dvd drive and power the VM on.

 

It should boot from the DVD and once it does you can press shift + F10 to open the command prompt where you can paste in the code and it will do everything.

 

The bcdboot command is

 

bcdboot w:\Windows /s S: /f ALL

 

W:\Windows is where windows was just installed using DISM

/s S: is where the system partition is mounted

 

and /f ALL is what tells bcdboot to copy all the boot files not just whats needed at the moment.

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

1 hour ago, TPreston said:

No, you should do the initial setup in a virtual machine to avoid the risk of messing up the BCD on the pc.

 

Create a virtual machine and passthrough the disk that you want to use for windows to go (if it is using hyperv you need to offline the disk in disk management)

 

Then add a Windows iso to the virtual dvd drive and power the VM on.

 

It should boot from the DVD and once it does you can press shift + F10 to open the command prompt where you can paste in the code and it will do everything.

 

The bcdboot command is

 

bcdboot w:\Windows /s S: /f ALL

 

W:\Windows is where windows was just installed using DISM

/s S: is where the system partition is mounted

 

and /f ALL is what tells bcdboot to copy all the boot files not just whats needed at the moment.

Once again, thank you so much for your help! I'm sure this whole procedure is pretty cut and dry, but its still just a little enigmatic to me... But like I said, when it comes to this kind of stuff, my experience is a little inchoate. 

So another question (it probably has a really obvious answer), how do I make a virtual machine?

Share this post


Link to post
Share on other sites
1 minute ago, WIRM.KJones said:

Once again, thank you so much for your help! I'm sure this whole procedure is pretty cut and dry, but its still just a little enigmatic to me... But like I said, when it comes to this kind of stuff, my experience is a little inchoate. 

Do another question (it probably has a really obvious answer), how do I make a virtual machine?

Here is a quick guide

 

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine

Share this post


Link to post
Share on other sites
8 hours ago, TPreston said:

So I enabled Hyper-V Manager on my computer, and I'm in the process of making the two VM. The step where it states "make the two VM share the same VHD file", does that mean the that I need to make them share the same name when I create a virtual hard disk? 

Share this post


Link to post
Share on other sites
6 minutes ago, WIRM.KJones said:

So I enabled Hyper-V Manager on my computer, and I'm in the process of making the two VM. The step where it states "make the two VM share the same VHD file", does that mean the that I need to make them share the same name when I create a virtual hard disk? 

It depends how many devices you are looking to provision if its just one drive then you are better off just making it a pass through drive on both VMs (only one can be started at the same time)

 

http://thesolving.com/virtualization/how-to-configure-a-pass-through-disk-with-hyper-v/

Share this post


Link to post
Share on other sites
57 minutes ago, TPreston said:

It depends how many devices you are looking to provision if its just one drive then you are better off just making it a pass through drive on both VMs (only one can be started at the same time)

 

http://thesolving.com/virtualization/how-to-configure-a-pass-through-disk-with-hyper-v/

I'm really sorry, I'm trying really hard to absorb all of this information and to do it quickly, but I feel like this is still difficult for me to understand. I'm stuck at the point where I'm supposed to make two VMs. I think I've made them as shown here in the capture.png

But how do I tell if I've set them up correctly? 

Capture.PNG

Share this post


Link to post
Share on other sites

Posted (edited)

I noticed on your first step, you show the two VM settings. The one on the left (I'm assuming it's the second gen VM)  you have the SCSI Controller highlighted, showing the Hard Drive. On the right you have the first gen VM, showing the IDE Controller 1 Hard Drive. I noticed that you set the IDE controller to 1, and put the location to 0. When I try to do this, I get this image. Please see the FML.PNG below to see what I've done, and what I need to do next. 

FML.PNG

I may have failed to have Hyper-V Manager to pass-through my USB. Do I need to use diskpart to clean my USB disk, then select the location of the virtual hard disk to be on it? 

 

I'm quite determined, so as long as you're willing, I'll be fastidious to follow every instruction you give.

Edited by WIRM.KJones

Share this post


Link to post
Share on other sites
7 minutes ago, WIRM.KJones said:

I noticed on your first step, you show the two VM settings. The one on the left (I'm assuming it's the second gen VM)  you have the SCSI Controller highlighted, showing the Hard Drive. On the right you have the first gen VM, showing the IDE Controller 1 Hard Drive. I noticed that you set the IDE controller to 1, and put the location to 0. When I try to do this, I get this image. Please see the FML.PNG below to see what I've done, and what I need to do next. 

FML.PNG

I'm quite determined, so as long as you're willing, I'll be fastidious to follow every instruction you give.

In your case if you are just wanting to create one windows to go drive you can passthrough the hard drive you want to use for windows to go.

 

To do this go to disk management and right click on your USB storage then hit "offline"

 

When you do this go back into the settings for both virtual machines and select the drive from the list highlighted below.

 

HDD.thumb.png.7b2be3a89ce430e8b9f42f8ecf32909e.png

 

Once that's done start VM1 and it will boot from the windows iso.

 

From there you can use the commands in the first post after pressing shift + f10 to open the command prompt on the Windows CD.

Share this post


Link to post
Share on other sites

Okay, to get it to pass through my USB Drive (which is showing up on my disk management as disk one) I need to set the physical hard drive disk to disk one, however when I go to do this, it is grayed out, and won't let me select this option.

10%rule....PNG

GottaBe10%SmarterThanWhatYou'reTryingToDo.PNG

Share this post


Link to post
Share on other sites

Scratch that last post, I restarted my computer, then Hyper-V allowed me to apply those changes. I'll now try to start VM1 and boot it from the Window 10 iso.

StruggleIsReal.PNG

Share this post


Link to post
Share on other sites

Posted (edited)

Hey, good news, I'm making progress! I just got to this screen:

Progress...PNG

However, when I press shift + f10, it doesn't open the command prompt. 

Ignore that... I needed to press the Fn key on my keyboard to get F10 to work. ...sorry.

Share this post


Link to post
Share on other sites

Posted (edited)

Now I'm on your step which states:

"At the install screen press shift + f10 to open command prompt and run notepad to get a GUI file explorer window when you select file > open

What am I supposed to do with this notepad?

I'm now here:

 

I'mSoSorryIKeepGettingStuck.PNG

Share this post


Link to post
Share on other sites

Posted (edited)

I didn't know if I should have done this or not, but your instructions didn't say what to do with the notepad, so I closed notpad and continued with your next step. I cleaned the drive, converted it to MBR, and created the fat32 partition and the ntfs partition. After that, I typed in your command:

"Dism /apply-image /imagefile:E:\sources\install.wim /index:1 /ApplyDir:W:\"

When I did this I got this error message:

 

OopsIDidItAgain.PNG

Once again, thank you for all of your help! What would you recommend I do now? 

Share this post


Link to post
Share on other sites
1 hour ago, WIRM.KJones said:

I didn't know if I should have done this or not, but your instructions didn't say what to do with the notepad, so I closed notpad and continued with your next step. I cleaned the drive, converted it to MBR, and created the fat32 partition and the ntfs partition. After that, I typed in your command:

"Dism /apply-image /imagefile:E:\sources\install.wim /index:1 /ApplyDir:W:\"

When I did this I got this error message:

 

OopsIDidItAgain.PNG

Once again, thank you for all of your help! What would you recommend I do now? 

You are nearly there, The error is stating that it cant find the install image if you open notepad from the command prompt and then hit file > open you will be able to find the drive letter the DVD drive has and then replace e:\sources\install.wim with whatever drive letter your vm has assigned for the DVD drive.

Share this post


Link to post
Share on other sites

Posted (edited)

16 minutes ago, TPreston said:

You are nearly there, The error is stating that it cant find the install image if you open notepad from the command prompt and then hit file > open you will be able to find the drive letter the DVD drive has and then replace e:\sources\install.wim with whatever drive letter your vm has assigned for the DVD drive.

Oh I get it, you are just using the explorer in notepad to find the drive letters. I FEEL LIKE I'M SO CLOSE, THANK Y0U!

 

Okay, so my iso file letter is the same as your file letter "E:" but for some reason my Windows To Go ntfs disk became D: instead of W:

So I put in the command 

"Dism /apply-image /imagefile:E:\sources\install.wim /index:1 /ApplyDir:D:\"

and I got this error:

"The system cannot find the file specified.

The DISM log file can be found at X:\windows\Logs\DISM\dism.log"

SoClose.PNG

Share this post


Link to post
Share on other sites

Yeah its

1 hour ago, WIRM.KJones said:

Oh I get it, you are just using the explorer in notepad to find the drive letters. I FEEL LIKE I'M SO CLOSE, THANK Y0U!

 

Okay, so my iso file letter is the same as your file letter "E:" but for some reason my Windows To Go ntfs disk became D: instead of W:

So I put in the command 

"Dism /apply-image /imagefile:E:\sources\install.wim /index:1 /ApplyDir:D:\"

and I got this error:

"The system cannot find the file specified.

The DISM log file can be found at X:\windows\Logs\DISM\dism.log"

SoClose.PNG

Yeah its not working because the iso you used contains esd files not an install.wim once you get an ISO mounted with a normal windows iso the command will work and then you just have the BCDBoot command to copy the boot files and you are done

Share this post


Link to post
Share on other sites

Posted (edited)

Oh I see, okay. I am trying to install Windows 10 Pro. I downloaded this ISO using the MediaCreationTool, which I downloaded from Microsoft's website here:

https://www.microsoft.com/en-us/software-download/windows10

Do you know where I can get a Windows 10 Pro ISO that contains an install.wim instead of esd files?

Maybe something is wrong with my ISO. I'll try downloading Windows 10 again, using the MediaCreationTool, and see if I get the same error. 

It looks like the media creation tool will take some time though... so if you can think of anything I can try in the meantime, please let me know.

 

The MediaCreationTool just finished downloading a second ISO of Windows 10, it looks like it's still a esd file... oh fart... I'll see if I can scour the internet for an ISO of windows 10 Pro that has the install.wim instead of esd files, but I'm always a little skeptical on downloading operating systems other than from the official source. 

Edited by WIRM.KJones
1 person likes this

Share this post


Link to post
Share on other sites

So if I am correct, isn't an esd-ISO a form of all of the different Windows 10 systems (eg. Pro, Home, Education, single language, etc.) Is there a way I can extract just the Windows 10 Pro ISO from the esd ISO?

Share this post


Link to post
Share on other sites
1 hour ago, WIRM.KJones said:

So if I am correct, isn't an esd-ISO a form of all of the different Windows 10 systems (eg. Pro, Home, Education, single language, etc.) Is there a way I can extract just the Windows 10 Pro ISO from the esd ISO?

I don't know I used the MSDN isos try the media creation tool

Share this post


Link to post
Share on other sites

Posted (edited)

Okay, so I took the risk and went ahead with the rest of the guide. It looks like it worked completely. Before I shut down my computer, and boot up from this USB device, do I need to turn it online using disk management? 

 

You my good sir, are eminent in my eyes! Thank you so much for all of your help. Hopefully I wasn't too much of an anathema for you.

Edited by WIRM.KJones

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.