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 22.214.171.124 (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)
\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)
The winnt.sif file contains the following text:
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=winpex86.iso"
Architecture = "i386"
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