Something that I’ve been playing around with for a while now is booting Windows Preinstallation Environment (Windows PE) from a USB flash drive and a few weeks back I finally found enough time to have a proper look at this and make some progress.
There’s lots of anecdotal evidence of success (or otherwise) on the ‘net, but because Microsoft restricts access to Windows PE, many people are using Bart Lagerweij’s BartPE as an alternative. I do have access to Windows PE and specifically wanted to get this working using the Microsoft version. Some people (e.g. Niko Sauer and Dag at bootdisk.info) have done similar things with Linux variants such as Knoppix.
It seems that not every USB flash drive is capable of acting as a boot device and not every PC BIOS supports USB boot. If there is no BIOS support, then it’s just not going to work (I think USB 2 is also a prerequisite). It’s also unlikely that a USB stick will work as shipped from the factory – it will need a boot partition to be (re)written and the easiest way to do this is with a USB disk format tool.
I got a Dell Latitude D600 to boot MS-DOS last year using a Dell 128MB USB flash drive (which is a rebadged Lexar Digital Film device) but didn’t get much further because Windows PE was too large to fit on the device. More recently, I’ve been using a 256MB SanDisk Cruzer Mini that I bought from MyMemory.co.uk for £9.99. I’ve use this to successfully boot an IBM Thinkpad T40 and a Compaq Evo D510SFF but can’t test on the Fujitsu Siemens Lifebook S7010D that I use for work because I don’t have access to the BIOS (thanks to my employer’s corporate information systems administrators).
Here’s my process for taking a USB flash drive from new to booting Windows PE:
- Check that the PC BIOS supports booking from USB-attached removable media and enable this.
- Download and install a USB flash drive format utility – I used the HP USB disk storage format tool v2.1.8 (SP27608) but alternatives include the Dell USB memory key utility revision 1.0.6.25 (R69131) and Martin List-Petersen also recommends MBRTool, which formats a USB flash drive in hard disk mode and installs a FreeDOS kernel (with FAT32 support); however he also reports that it seems to have trouble with USB keys of 256MB or larger.
- Format the USB flash drive with a FAT16 file system, including ability to work as an MS-DOS startup disk and with quick format deselected.
- Perform a test boot into MS-DOS using the USB flash drive.
- Download BootPart and copy this to the USB flash drive (I used v2.60).
- Copy a Windows PE installation that is known to work from CD/DVD to the USB flash drive.
- Rename the \i386 folder to \minint.
- Copy ntdetect.com from \minint to \.
- Copy setupldr.bin from \minint dir to \ and rename to ntldr (no extension).
- Reboot from the USB flash drive and run bootpart (you can now delete the DOS files on the stick and remove the boot. ini entry for MS-DOS (if really needed, personally I would leave it there).
- Reboot from the USB flash drive once more and Windows PE should load.
Some notes I’ve read suggest that there is an extra step – i.e. that of copying winbom.ini from \minint dir to \; however, using a colleague’s pre-built Windows PE 2005 images I couldn’t get the normal PE one to work – only the one which was configured to to use a RAM disk (and that didn’t have a winbom.ini). The downside of this was that it took about an hour to boot! I thought this was because the reference PC only had 256MB RAM but tried on a 512MB machine and no difference. Obviously need to do more work in this area, but the basic principle of booting from the USB flash drive is now proven.
I’ll post an update with the final configuration when I manage to make Windows PE more performant but, at present, the file system on my USB flash drive looks like this:
\bootpart.exe (01/08/2005 02:06 44,544 bytes)
\winnt.sif
\winpex86.iso
\ntldr (25/03/2005 11:00 298,096 bytes)
\ntdetect.com (25/03/2005 11:00 47,772 bytes)
\minint\bootfix.bin (25/03/2005 11:00 1,024 bytes)
\minint\ntdetect.com 25/03/2005 11:00 47,772 bytes)
\minint\setupldr.bin (25/03/2005 11:00 298,096 bytes)
\minint\winnt.sif
The winnt.sif file contains the following text:
[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=winpex86.iso"
Architecture = "i386"
Links
USB articles at bootdisk.info
MSFN forum – Boot PE from USB flash drive
Oliver Aaltonen’s USB booting tips
Jacopo Lazzari’s USB pendrive how to
The CD Forum – boot your WinPE or UBCD4Win on USB flash drive
An easier method for most would be to use the free PEtoUSB tool here:
http://codebeetle.com/page.php?al=petousb
It really works well…
Looks like that page has moved:
http://gocoding.com/page.php?al=petousb
Mark – I am having trouble getting networking running on my winpe image. I also am using a IBM T-40 with WinPE 2005. Did you have to add network drivers to your iso image to get networking to work?
Anonymous – unfortunately (because I used a colleague’s image) I don’t know what was in the WinPE ISO. This was just a proof of concept and I haven’t been working on Windows deployment recently so I haven’t tried to take it any further yet.
There is a tool that I’ve heard of called nLite, which might help you out, although I’ve not tried it yet and it’s still on my “must have a look when I get some spare time” list.
this sounds like real fun!
you can get XPe to do this too
Hi Mark,
If i may ask,is Windows PE the same thing as a BartPE iso?
I used the contens of a BartPE.iso and nothing happens after running Bootpart.Just get “Invalid systemdisk” after removing the Dos-files.
Is there a parameter needed using Bootpart?
Thanks for your time and greetings from The Netherlands.
wanderer,
Bart PE was produced as an alternative to Windows PE because Windows PE was limited to use by Microsoft’s enterprise customers and OEM partners. I think that has changed for Windows PE 2.0 but am not 100% certain.
I haven’t actually used BartPE but it is a different product so that’s why these instructions might not work so well for you. I think they’re also a bit out of date now – Windows PE 2.0 should make things easier and it’s worth checking out James O’Neill’s article on getting started with Windows PE.
Good luck! Mark
Mark,
Thank you for your answer.In the mean time i found this site,so hopefully it brings me a little bit further.
http://www.911cd.net/forums//index.php?showtopic=14798&view=findpost&p=129601
With kind regards,wanderer
Mark,
I followed all the instructions how to boot the WinPE from USB. Everything seems to be working fine till setup starts to copy data. It seems like the installation fails to copy data required for the installation. Have you seen such an issue before?
Thanks
Hi Tom,
Unfortunately, I really can’t remember what happened as it’s such a long time since I did this. I seem to remember that the whole process is a bit hit and miss though as not all USB sticks are created equal. I also think that these instructions are a bit out of date now – Windows PE 2.0 should make things easier and it’s worth checking out James O’Neill’s article on getting started with Windows PE.
HTH, Mark
Meh I made one of these Live USB Bart PE sticks today, it worked on my IBM R32’s USB 1.1 slot, only issue I had was Barts PE2USB formatter didint work, I had to use the above HPs to format the stick the copy the files onto the stick manually
Excellent step by step explanation, thanks mate!
Hey Yosef here,
Great tutorial, I’ll definitely be using this on presentation in Computer Science 150.
Thanks
Why must the format of the USB key be Fat 16 (step 3)? A 16 gig key only formats Fat32 or NTFS with HPUSBFW.EXE.
If anyone knows of a way to to this with Fat32 i’ll tell you how to skip step 6 and just copy a winPE ISO file.
@vh1too – the reason for FAT16 was for MS-DOS support, I think. I wrote this 3 years ago, since then a lot has changed (like that it’s easy to get hold of Windows PE; and that back then the typical USB key was only 128, 256 or 512MB in size!) – I wouldn’t consider this post to be good advice any more as I’m pretty sure there are better ways to do this now!
Just want to bump PEtoUSB that someone mentioned above – great little freeware tool. Highly recommended.
I did not get the instructions above to work, but PEtoUSB worked with no hitch.
Per readme.txt / actual testing, PEtoUSB doesn’t support USB Keys greater than 2 gig. Fat 16 only. Anyone know how to make a Fat32 USB Key bootable?
@vh1too – As featured in my recent post about installing OS X on a netbook (using a USB drive), you can use
syslinux.exe
to make a FAT32 USB drive bootable.You could also use the
bootsect.exe
utility from a recent Windows install DVD (as described in my post on installing Windows from a USB drive).This post is horribly out of date and I’m surprised to see how many people are still reading it. Since Windows PE became more widely available and we have the Windows Automated Installation Kit (WAIK) Josh Phillips’ WindowsConnected post on creating a bootable WinPE 2.0 USB key contains what is probably a better method.
I used this solution. Works great!
http://problemvssolution.tumblr.com/post/3327733289