Welcome to MSDN Blogs Sign in | Join | Help
Booting Windows 7 or 2008 from a vhd on a USB drive
after struggling for a week i managed to boot my machine from a vhd located on an external USB drive.
steps:
=====
1- prepare a vhd file that has windows 7 or windows 2008 (there are thousands of blogs on how to do this step)
 
2- copy the vhd to the local hard drive in any parition that has enugh space for the vhd to expand
 
3- boot from your normal windows (not the vhd that we just prepared)
 
4- right click my computer and select manage then go to disk management
 
3- attach the vhd after which it will appear as a normal disk drive volume
 
4- go to http://www.boot-land.net/forums/index.php?showtopic=6851 and download pwboot then copy it inside the vhd drive
 
5- shut down the current windows and boot your machine into the vhd (again there are many blogs explaining how)
 
6- run the pwboot (FROM WITHIN THE VHD IMAGE)
 
7- use bcdboot to copy the system files from the vhd to the physical USB drive
 
8- restart your machine
 
9- select boot from USB drive
 
Posted: Saturday, October 17, 2009 6:50 PM by Hussein Ahmad
Filed under:

Comments

Roger said:

Sounds really useful!  This will come in handy. Imagine having a complete Windows 7 machine on a flash drive! Just plug it in, restart, and now you're using your own computer, on any physical machine. It would be quite handy here in the KSU library, where the screens are not set to the native LCD resolution, but the computers are extremely locked down so I can't do anything about it...

Actually, that makes me wonder: is this completely self-contained, and can boot on any computer, even one with only XP or Linux installed, or does it need the Vista+ bootloader to work?

Thanks!

# October 17, 2009 1:08 PM

Marauderz said:

Hmm.. I've tried the steps you've mentioned but it's not working. I'm getting an invalid file error for

\windows\system32\winload.exe

And some other thing I had a question with, is that where is the boot store? how does it know which VHD to use on the USB drive?

# October 18, 2009 1:57 AM

Hussein Ahmad said:

Roger

only Wondows 7 and Windows 2008 R2 supports that. and yes it is an incredible feature. now i have all my virtual machines on a USB drive. so i turned my physical machine to a native virtual . i dont have any OS on my machine. even my personal is a vhd file. if something happens i can just take away my vhd to a new physical machine.

backup is very easy, i only have to copy the vhd periodically.

i am sure you will find thrid part software in the future may be to support also windows vista and XP

so did you try it ?

# October 18, 2009 7:40 AM

Hussein Ahmad said:

Marauderz

great question

bcdedit is your tool to configure the boot options. do you remember boot.ini

we used to run notepad to edit it

but now you have to use bcdedit and point it towards the boot manager to configure it.

so if i have 3 vhds on my USB.

i will go to command prompt and three of them as 3 different entries

so when you boot you will see three different boot options (like dual boot) , every entry points to a different vhd

if you want to add a new entry it is easier to copy one of the existing entries and modify it

what did you do exactly ?

# October 18, 2009 7:48 AM

Marauderz said:

Here's what I did

- Installed Win7 Ultimate onto VHD

- Booted into it

- Ran PWBoot on it.

- Plugged in my USB drive

- ran "BCDBOOT C:\windows /s USBDrive:"

- Rebooted into normal Win7

- Copied VHD to USBDrive:

- BCDEdited the boot store in USBDrive: to use the VHD file to boot.

- It WILL boot, BUT.. it'll never make it into windows cause it BSOD and restarts soon into the booting process, I think it's because it's confused about what it's installed on.

# October 18, 2009 10:15 AM

Hussein Ahmad said:

when yo booted your machine lastly , did you change the boot from BIOS to be from USB drive ?

# October 19, 2009 4:05 AM

Marauderz said:

Yes, it's definetly booting from the USB drive. It's jsut that it's bluescreening in the booting process.

# October 19, 2009 8:09 AM

Marauderz said:

Yes, it's definetly booting from the USB drive. It's jsut that it's bluescreening in the booting process.

# October 19, 2009 8:09 AM

Hussein Ahmad said:

it has to be RTM not RC

are you using RTM ?

# October 19, 2009 8:23 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker