Install Windows 7 on a USB Stick/Flash drive

Installing W7 on a virtual machine I’m sure is not as fun as having it installed on a physical machine. The problem is, I no longer have enough space to squeeze W7 into my laptop’s hard drive. So I thought of having it installed via an external USB hard drive (Maxtor 40GB) but doing so unfortunately is not possible; the W7 installation wizard tells me that it does not support such a hardware configuration. Frustrated, I searched the Internet to see if it was possible; there were instead lots of “How To’s” on installing W7 from a USB stick especially on Netbooks where presence of an optical drive is absent. Well, I eventually end up installing W7 on a 16GB Transcend USB flash drive instead. Now, I’ll be sharing how I did it. I will divided this tutorial into three phases; Phase I is about how to prepare your USB flash drive while Phase II tackles staging the virtual machine and installing W7 then Phase III walks you through tweaking the W7-VM to become W7-on-stick. Here’s a list on what you need to achieve our goal:

A PC with a working USB 2.0 port/s.

A 16GB USB stick/flash drive or larger (the actual install size is a little over 8GB).

VMware Workstation 6.5.x

A pre-installed Windows Vista as guest OS in VMware Workstation.

A copy of the Windows 7 installation (DVD or ISO).

An administrative user account.

Tons of PATIENCE.

PHASE I – Preparing the USB Stick/Flash Drive

Plug in the USB stick into your PC’s USB port.

Fire up your VMware Workstation. If you don’t have it yet, download at least an evaluation version from VMware. You need to register before you can actually download the software. You’d probably ask why VMware Workstation and not Microsoft Virtual PC? Well, I tried this trick on VPC 2007 but it didn’t work but I guess with Hyper-V, it might. Sorry, I currently don’t have a 64 bit PC to install Hyper-V.

Just click OK to close it and login to vista when the login screen is presented.

VMware can load your USB stick within the guest OS. To do this, click the VM menu then hover your mouse pointer to Removable Devices and hover your mouse pointer to your USB stick from the list of devices then finally select Connect (disconnect from host) from the sub-sub menu. Click here to view image.

Click OK when a message box will popup.

You will know when the USB stick is loaded because Vista will present you the Autoplay dialog box. Just click Close.

Click the Start menu then type comp in the Start Search field then click Computer Management when it gets listed.

Click Continue when prompted by the UAC.

In the Computer Management snap-in, click Disk Management.
Notice that your USB stick is identified as Disk 1 with its corresponding drive letter assignment or higher if you have more than one currently plugged in. Take note of this. Click here to view image.

Close Computer Management.

Click Start -> All Programs -> Accessories -> then right-click your mouse on Command Prrompt and select Runas Administrator from the context menu then deal with the UAC dialog box when it pops up.
The Command Prompt should launch thereafter.

It’s geek time folks so in the Command Prompt, type diskpart and hit the Enter then type list disk and hit Enter again.
Notice that the USB stick will be listed as Disk 1 or higher.

Now do the following commands exactly as sequenced:
– select disk 1 <<< selects the USB stick
– clean
– create partition primary
– select partition 1 <<< you can do list partition to check the partition number if you wish
– active <<< marks the new primary partition active
– format fs=ntfs override <<< tested your patience will be but patient you must…he he he
– exit
After you exited diskpart, don’t close the Command Prompt. Just have it on the background.
Remember that you have to hit Enter everytime you finished typing a command.

Type bootsect /nt60 X: /force then hit Enter. This is going to make the USB stick compatible with BOOTMGR bootcode. X: is the drive letter assignment of the USB stick.

Now that the USB stick is ready, let’s dive into the next phase…

PHASE II – Setting up the W7 Virtual Machine and Installing W7

If you have 2GB or more RAM on your PC, you don’t have to do this procedure; shutdown the Vista VM to give way to W7.

Click the File menu -> New -> Virtual Machine.

Tick Custom (advanced) then click Next when the New Virtual Machine Wizard pops up.

Workstation 6.5 is pre-selected for Hardware Compatibility so just click Next.
I haven’t tried this on an earlier version, sorry. It might work but you will have to try it yourself and perhaps share your experience.

Tick the last option, I will install the operating system later then click Next.

Choose Vista as guest OS from the list under Microsoft then click Next.

Type Windows 7 in the Virtual machine name field then click Browse.

In the Browse for Folder dialog, create a new folder on drive C: named Windows_7 and click OK then click Next.

If you have a dual core CPU, choose Two for Number of processors then click Next. Choose One if using a single core CPU.

The RAM is pre-set to 512MB so click Next. Otherwise, assign a larger RAM if you have the hardware for it.

Tick Do not use Network connection then click Next.

LSI logic is pre-selected for SCSI Adapter so click Next.

Select the last option Use a physical disk (for advanced users) then click Next.

In the Device list, choose PhysicalDrive1 then click Next. PhysicalDrive0 is used by the host OS. If you use this, you’ll mess up the host OS.

Select Hard Disk (SCSI) then click the Advanced button located in the lower right corner of the Virtual Machine Settings window.
You will see something like this…

Tick Independent. Persistent is pre-selected so click OK.
It should look like this…

Select CD/DVD (IDE) then choose how the optical drive is connected, Use physical drive or Use ISO image file (in my case, I used an ISO image).

Remove both the Floppy drive, USB Controller, and Sound Card then click OK.

Before you continue, make sure that the USB drive where you wanted to install W7 is attached to VMware Workstation. Otherwise, this trick ain’t gonna work. Click Power on this virtual machine to start installing W7. Just go through the installation routine as you would on a physical machine.
REMEMBER to:
– Press F2 when you start the virtual machine to change the boot sequence to boot from the CD/DVDROM.
– Format the USB stick within the W7 installation.
– Be patient. The installation is not as fast as it is on real hard drive.

That’s it, you now installed W7 into your USB stick but we have to do something before we can shed tears of joy

PHASE III – Tweaking W7-VM to become W7-on-stick

After the installation, you will be logged into the Desktop for the first time. This will also take time so again be… Yep, that’s right.

First, change the resolution to 800×600. Just right-click the Desktop then select Screen Resolution from the context menu.
I don’t have a huge Desktop workspace thus the resolution change.

You can use Notepad to edit these files. In Notepad, press CTRL+Endto navigate to the last portion of the file then insert or add the above-mentioned tag.

When you’re done, fire up the Registry Editor by typing regedit in the Search programs and files text field then hit Enter.

Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

On each of these services:
– usbccgp
– usbehci
– usbhub
– usbuhci
– usbohci
edit keys
Start = 0
Group = boot bus extender
– USBSTOR (for this service, you create a new key string value named Group and do the same as the other services )

When you’re done, exit the Registry Editor.

Change your user picture unless you want to be represented as a flower.

Shutdown W7 then close VMware and shutdown your PC.

To be sure that you won’t mess up the host OS, either disable the physical disk/s in BIOS or remove your PC’s the hard drive. You don’t have to do this if you wish but I don’t take chances so I did it.

Turn on your PC then alter the BIOS settings to boot first on the USB drive.

Save the settings and exit the BIOS.

Momentarily, you will see the fruit of your labor coming to life.

Welcome to the future of USB computing…

Like this:

LikeLoading...

Related

this guide is what i\’ve spent forever looking for :Dhowever, you\’ve lost me hereOn each of these files add this tag: – usb.inf – usbport.inf – usbstor.inf [*.AddService] StartType = 0 LoadOrderGroup = boot bus extenderIn the Command Prompt, type cd ..\\\\inf and hit Enter then edit each of the above-mentioned files and add the needed tag as follows: c:\\Windows\\inf\\notepad usb.infIn Notepad, press CTRL+End to navigate to the last portion of the file then add the tag. and i can\’t boot from it outside the VM, and it\’s probably because i did this wrong.

From what I could gather on Phase III – Any part of those .inf files that had AddService in them, the StartType needed to be changed from 3 to 0 and LoadOrderGroup has to = boot bus extender. You can find those by searching for "AddService]" (minus quotes) in notepad. After following all these instructions, I still get a blue screen when trying to boot to the flash drive outside of VMWare. It\’s definitely happening when Windows resets/initializes the USB bus… you know, the part where the lights on the keyboard and mouse flash halfway into booting.

I get the blue screen too…At one time I was not getting the blue screen, rather was getting asked to repair Windows 7 and then reboots, loads the drivers and then freezes on the black screen where you can only see the mouse cursor. It would not go any further although I left it for more than an hour at that stage. There is definitely another step or modification required in order to run it off a USB.

First of all your guide which is followed is excellent……….Secondly, I was successfully able to install server 2003 on a seperate usb hdd by following your method. I haven\’t followed "PHASE III – Tweaking W7-VM to become W7-on-stick" yet because I don\’t want my system to boot from usb hard drive. What I did was I closed everything and safely removed the usb hard drive.after which i reconnected it and started vmware again and this time when I tried to start server 2003, it threw an error message:Operationon file "\\\\.\\PhysicalDrive1" failed.If the file resides on a remote file system, please make sure yournetwork connection and the server where this disk resides arefunctioning properly. If the file resides on removable media, reattachthe media.Choose Retry to attempt the operation again.Choose Abort to terminate this session.Choose Continue to forward the error to the guest operating system."this time when i connected the usb hard drive again my windows mounted the usb hdd and it showed the partitions i create during the installation of server 2003 inside vmware.how would i be able to run windows each time in vmware after connecting the usb hdd ?????thanks in advance.

For Those who have the same problem as Alex, probably you have Vista as your operating system, if so please install VMware Workstation over XP not Vista. The procedures of solving that problem under Vista is too complicated, require external software and could damage your hard drive if you have litle experience.For those who have the blue screen on the start, do you have using the same computer where you installed the W7? If not please run the USB drive in the same pc to see if you were getting the same errors.Hope this could help you guys.

What do you mean? Are you telling us to:Change "4. A pre-installed Windows Vista as guest OS in VMware Workstation." to XP instead of Vista?or Change "6. Choose Vista as guest OS from the list under Microsoft then click Next." in Part II to XP instead of Vista?or Reinstall("downgrade" for some XD) our original Vista system to XP? I\’m a Vista user and like Alex, I get the same error…I mean at Part II. "Click Power on this virtual machine to start installing W7. Just go through the installation routine as you would on a physical machine."-etcetc, when I press esc and then choose to boot from CD/DVD driveI get the error:Operationon file "\\\\.\\PhysicalDrive1" failed.If the file resides on a remote file system, please make sure yournetwork connection and the server where this disk resides arefunctioning properly. If the file resides on removable media, reattachthe media.Choose Retry to attempt the operation again.Choose Abort to terminate this session.Choose Continue to forward the error to the guest operating system."Plus it should be said that I get an error where it says "\\\\.\\PhysicalDrive1 not found" when I have to choose "PhysicalDrive1" in Part II under 14. if I don\’t shut down Vista as told in PartII 1. (I got over 2gb mem).I hope it\’s easy fix-able so I can get started on the usb installation XD Hope it\’s not a too big a bother and I hope you can help.

In PHASE II step 18. – There\’s no Hard Disk (SCSI), only IDE, thus no "Advanced" option (so I move on to step 20.)In PHASE II step 22. – I\’m getting "BOOTMGR is missing" when installation commences. ;(Else I followed everything to the letter. Redid the procedure twice with same outcome. Any ideas?Note: Using Vista x64 as guest OS in VMware as it\’s the only version of Vista I\’ve got. ( Main OS is Windows 7 x64 )

Tom, For some reason this trick does not work on a Windows 7 host machine. I\’ve played around with using either a Windows XP or Windows Server 2003 host OS (haven\’t tried it in Vista). The process went along flawlessly. I remember encountering an error when I attempted to install W7 directly on a USB drive in its beta stage. The error says W7 does not support being installed on an external storage media. You can however use PHASE I to prepare your USB drive (at least 4GB) then copy all the contents of your W7 DVD into the USB drive; you now have a W7 USB-based installer.No name (Aug 4)After doing PHASE III, I removed my laptop\’s hard disk. I plugged in my USB-installed W7 and turned on the laptop. After a few minutes, I now have W7 up and running.

Hi Faelmar,Making the USB bootable & placing the W7 image on it is no big deal. I have a USB stick merely for installation purposes.This trick you are kind enough to share however… how to get a bootable, fully functional W7 on a portable device is just what I\’m after. Since there is (to my knowledge) no "sata/satapower to USB" converter to be found anywhere, it\’s not easy to trick the installer.So far this method right here seems to be the only working one that is published (other methods require a virtual machine installed either on USB or on target system & only allows the USB to boot from within the host OS).Thanks for confirming that this doesn\’t work on a W7 machine though, that\’s what I suspected but wasn\’t sure.Will try this with XP then Vista. I\’ll let you know how it turns out.

Ok, now I\’ve managed to install it!Unplugging my secondary HDD & using XP 32-bit as host & Vista as guest in VM did the trick. (the HDD is taged as SCSI now but there is still no advanced option in PHASE II step 18)Nevertheless… it\’s fully installed now.Next problem: When I boot from the USB & when the windows animated logo appears, a blue screen flashes by and the system reboots. It\’s exactly when C:\\Windows\\System32\\drivers\\AGP440.sys has finished loading. Tried all failsafe boot options without any results.:(

Tom,I have added a snapshot of PHASE II step 18 and 19. Check it out.By the way, you were using VMware Workstation doing this trick right? I tried doing this in MS Virtual PC 2007 SP1 but to no avail.Anyway, hope this helps… c",)

Hello. Great guide. I have the same problem as Tom though, I get a blue screen on load if I try to boot outside of vmware and deleting agp440 references doesn\’t help. I\’ve done everything as suggested in the guide.

Hi Tom,I got a succesful install on the USB drive but like you had the problem it doesn\’t load up it just loads up until it says starting windows and then it reboots. Then I did erase that agp440 from the registry and tryed it again and this time it said starting windows and then it loaded that windows logo for a little bit and it still rebooted (didn\’t work). I also erased the agp440 from the windows sys32 drivers folder and it still doesn\’t load windows.How did you see that the file agp440.sys was the error? How can I see what is my error, like to see the error log or something?Thank You

Hi Daniele & Adriana,I "knew" it was that driver only because the OS rebooted every time C:\\Windows\\System32\\drivers\\AGP440.sys finished loading, same place each and every time. Since most computers differ hardware wise it could be some other driver in your case. Try to take notice of which driver is the last to load before the reboot, then go back and boot the USB in WMware and delete that specific key from the registry. Sorry that\’s all I can help you with, it worked well in my case.To see loading order of the drivers boot the USB drive in failsafe mode (usually F8).Good luck.

@TomI now know for sure it\’s the AGP440.sys file that\’s causing the BSOD as it\’s the last driver that is being loaded. Can you tell me what you did to remove it? ( I just noticed you didn\’t specifically say how to remove it from the registry)

Hey after installing I got the apg440.sys error, although I did manage to get it back on in VMWare to change it I realized that the disk is formatted to RAW???Umm not sure if it should be or not, please reply, thanks

Nevermind, Fix found, Please everybody:CLICK START -> SHUTDOWN in WINDOWS 7!!!Then you may power down VMWare, and only after that, remove your usb device and then shut down your pc.After that reinsert it if it isn\’t partitioned, if it is make sure you use a program or a separate copy of windows 7 to make the partition it is installed on Active!

Has anyone been able to get this to work with Windows 7? I\’m getting the same BSOD 0x00..7B error and hangs on the agp440.sys driver when booting to command prompt only. Deleting agp440.sys from the registry as suggested didn\’t work.

Thanks for much for the guide. This method works perfectly with Windows Server 2008 R2.

One thing to note though. When moving between computers, Windows will detect tons of new devices and install the drivers for them. After installation you need to reboot and start up the OS from VMWare. Then shut it down and boot it from the external. Then chkdsk will run on boot and everything will be fine for all subsequent boots. If that is not done, then the OS will reboot after the loading bar shows up for a second or two.

I used VMware Workstation 6.5 at the time I wrote this blog. I haven’t tried doing this procedure with any other version. I went through the entire procedure over and over again before I posted this blog. Which version of VMware Workstation did you use to try the procedure?

firstly, i couldnt get this vm stuff to work so i used power iso, assuming it will still work. now i cant get passed the bootsect stuff in sect 1. im doing this to solve my ‘bootmgr is missing’ error on w7 on my other netbook and can’t fix it with a cd for obvious reasons. am i doing the right stuff? is there an easy solution through another OS? thanks

I am using windows xp as host OS and vista as guest OS. When I am creating virtual machine for windows 7 as described in phase II, I dont get physical device 1, if I shutdown windows vista (guest OS). If I run the vista and follow the phase II, I can see the physical device 1. When I select the physical device 1, I get an error: “Failed to load partitions for device \\.\PhysicalDrive1:The system can not find the file specified”. Can anyone please tell, what wrong I did?

Well, it could have been easier if Windows 7 supported being installed on an external USB storage media; hence this grueling workaround. wwycobmt suggests using a tool from this website http://www.prime-expert.com/flashboot is simpler. You might want to try it instead…

also got the AGP440.sys BSOD problem. followed the guide step by step and everything worked fine. i can boot up the w7 sys in vmware without any problems, but if i try to boot without vmware on real notebook i get the bsod exactly after loading the AGP440.sys.

still no solution to this problem ?

interesting thing is i tried to boot with the usb hdd on my girlfriends notebook and it worked without bsod ! then i rebooted and tried it again and now bsod appeared also here.

so first boot worked on another notebook but then no further booting from usb hdd was possible …

Hi guys, I had the problem, that vmware told me, my USB-Stick is “inconsistent”…
If you were experiencing the same problem try to halt installation at “Boot-Prompt” and CONNECT the USB to VM Ware!!!! The error is forwarded to the system with “continue” and OK!!!

Hello, I have been trying to install this for some time now. I have Vista 32-bit as my host(main) operating system, and I am using Vista as my Guest OS.
I continuously get this error during start of the WIndows 7 VM:

Operation on file “\\.\PhysicalDrive4″ failed.
If the file resides on a remote file system, please make sure your network connection and the server where this disk resides are functioning properly. If the file resides on removable media, reattach the media.

PhysicalDrive 4 is my USB stick.

I would like to know how to fix this problem.
Do I have to use XP as a host OS?

thanks ftanada, I’ll take your word for it, but there don’t seem to be any new guides coming up near the top of google searches – just the old ones, with endless vistas (sic) of blue screens. This was one of the most active ones where i read, then decided i wasn’t going to have any more success than the people posting here. When I found 7USB.tk and tried it on several machines i felt some of the guides (with a certain few members always stating confidently in authoritarian tones: “it can’t be done”) needed updating.

What sets iMortaluz’s 7USB.tk apart is that it really works on any system. Maybe he used the method you describe? – he wasn’t letting on easily.

I shall investigate, but for the meantime the main files directly on the stick are BCD, plop.iso, AutoNeoGrub, and the main 8Gb system image in vhd format, all which give clues as to it’s method.

When you’re in the system it appears as if there are two USB devices mounted – the actual USB and the booted, mounted vhd which looks like a normal Windows install (though I’m led to believe it’s modified).

Another clue is the fact that I’m able to copy plop.iso to my iMac desktop, then attach plop and the .vhd file to an existing VMWare Windows installation, and boot the stick as a virtual machine (if plop is not off the stick then it “loses” it sometime during boot).

I read about a VirtualBox method somewhere, but apparently this 7USB required a lot more to make it universal (otherwise blue screen on hardware change).

It works great for me. One thing to remember is if new drivers are added, the USB services revert to Start=3 and Group=Base. I double check those values before I shutdown or reboot and so far, no issues. The only issue I have using a USB hard drive on a different machine is the licensing.

Using Windows 8 in this example, in the Command Prompt, issue this command:imagex /info x:\sources\install.wim <<< this is useful to check the windows images available in your install DVD. Substitute x with the actual drive letter of your USB drive and take note of how the images are listed. For instance, Windows 8 is listed as number 1. You then issue imagex /apply x:\sources\install.wim 1 x:. X again is the actual USB drive letter and 1 is the Windows image listed in the previous command.
After the image has been successfully applied to the USB drive, issuebcdboot x:\windows /s x:

You now can safely eject the USB drive and try it on another PC. This procedure works flawlessly on Windows 8 but still have problems with Windows 7. :(

your stick is usb 2.0 right! how does it work?? very slow .. doesn’t it! now that usb 3.0 appeared i think it works better! but i don’t have usb 3.0 on my laptop … please email me at skysandmix@yahoo.com so we can talk about it!thanks

Type:
1. Diskpart
2. list volume
3. lookup the USB letter, You’ll see something like ” C, D, E, ….etc”
4. If for example “E” is Your USB drive letter, type ” Select volume x ” where x is the number of volume that corresponds to that Volume letter on the very far left of the table shown.

Hi. I have a netbook that has a problem in flash memory, but the cost to fix it it´s prohibitive, so, i´m trying to do it work by a pendrive. I stuck at point 18 of phase II (Select Hard Disk (SCSI) then click the Advanced button located in the lower right corner of the Virtual Machine Settings window). The case it´s my VMWare Workstation (version 7.1.3 build-324285) does not present me the ,Advanced> button at the hard disk configuration page as show at the image on this tutorial. I´ve searched at forums and faqs disponible at vmware´s website without sucess. all i found describes the same way this tutorial, but my vmware does not show me that! How can I proceed the configuration listed at item 19? Please, help me. I don´t wanto to loose my netbook. Thanks! (sorry about my bad english! :)

Before shutting down and removeing your usb drive you should make a lil shutdownscript.
1.Open regedit and export the alterd keys to a folder on your C:.
2.Open notepad and type
regedit.exe /s C:\folder\usbstor.reg
regedit.exe /s C:\folder\usbhub.reg
etc.

save the file as shutdown.bat in the folder where u stored the exported reg files

THANK YOU VERY MUCH FOR THIS! BUT I CANT GET PAST THE SELECTION OF THE PHYSICAL DISK.. THE FLASH DRIVE DOESNT COME UP AS PHYSICAL DISK 1. THERE IS ONLY PHYSICAL DISK 0.. DOES THIS WORK WITH ALL USB FLASH DISKS

This post is now outdated. Read comments by Simba; my reply to Neodinium is worth a try especially if you want to install Windows 8 instead which natively support the install procedure. But if you’re really into this, try the workaround suggested by Peter Winchester in previous comments.

I tried this, got to phase II step 22. I wasn’t seeing how to attach usb to VMware. googled it, tried to do it, but not available (grayed out). I clicked the VM then the vm menu then found the usb option and grayed out. I even added the usb controller back as I don’t see how you could install to a usb drive without the controller? still have same issue, rebooted host too no effect. I did notice though that there does seem to be some issues with win 7 host systems.
so I may try and do on a virtual in vbox, or another system I have around. i’m also not doing “win7″ i’m trying to do with server 2008 R2 SP1 which is basically windows 7 like 95% of same source, both run install with PE too.
I googled to find out about the thing being grayed out. issue is out there many tried reloading VMware, but made no difference. most have no clue why this is happening. i’m using eval version just for this procedure, and evals I think get no support.
any ideas. even made sure ejected from host OS