Main menu


Advertisements

Originally created as a place for me to store some notes, this blog comments on my daily encounters with technology and aims to share some of this knowledge with fellow systems administrators and technical architects across the 'net. Amazingly, it's become quite popular!

SmartFeed by FeedBurner Subscribe to the site feed.

If you find the information here useful, then please consider linking to this site.

Recent Contributions

Tag cloud

Active Directory Adobe ADSL Apache Apple BizTalk Server Blogger Blogging Bluetooth CA Certification Configuration Manager (SMS) Dell Desktop Search Digital photography DNS Domain names DRM Dynamics CRM E-mail Exchange Hosted Services Exchange Server File formats Flash Forefront Friends Front Row FTP Google Green computing Groove History Host Integration Server HP Humour IAG IBM/Lenovo IIS iLife Industry trends Instant messaging Internet iPhone iPod ISA Server iSight IT law IT Operations iTunes Java Linux Live Meeting Live/Office Communications Server Macintosh Mainframes Malware Microsoft Microsoft.NET MIIS Mobility Money Motoring MS-DOS NetWare Networking hardware Networks Novell Office OpenOffice Operations Manager OS deployment OS X Outlook P2P Parallels Desktop Patch management PC hardware Photography Photoshop Podcasts PowerPoint Press coverage Professional skills Project Proxy Server QOS QuickTime Real Player Remote access RFID RSS SAP Scripting Search Security Server hardware SharePoint Site notices Social networking SoftGrid Software licensing Solaris Spam SQL Server Storage Symantec System Center Tablet PCs TCP/IP Telephony TV Useful books Useful software Useful websites Virtual Infrastructure Virtual PC Virtual Server/Hyper-V Virtualisation Visio Visual Studio VMM VMware VMware Fusion VMware Player VMware Server VMware Workstation Waffle and randomness Web browsers Web services Website development Wi-Fi Windows Windows 2000 Windows 7 Windows 9x Windows Home Server Windows Live/MSN Windows Media Windows Mobile Windows NT Windows PE Windows Server 2003 Windows Server 2008 Windows Small Business Server 2003 Windows Vista Windows XP Word WordPerfect WordPress WWW XBox 360 Xen Zune

Calendar

January 2006
M T W T F S S
« Dec   Feb »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archive

Booting Windows PE from a USB flash drive

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:

  1. Check that the PC BIOS supports booking from USB-attached removable media and enable this.
  2. 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.
  3. 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.
  4. Perform a test boot into MS-DOS using the USB flash drive.
  5. Download BootPart and copy this to the USB flash drive (I used v2.60).
  6. Copy a Windows PE installation that is known to work from CD/DVD to the USB flash drive.
  7. Rename the \i386 folder to \minint.
  8. Copy ntdetect.com from \minint to \.
  9. Copy setupldr.bin from \minint dir to \ and rename to ntldr (no extension).
  10. 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).
  11. 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

Comments

1

Comment from Glenn Fincher
Time: Wednesday 25 January 2006, 7:49

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…

2

Comment from Anonymous
Time: Monday 30 January 2006, 19:00

Looks like that page has moved:

http://gocoding.com/page.php?al=petousb

3

Comment from Anonymous
Time: Thursday 6 July 2006, 18:54

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?

4

Comment from Mark
Time: Thursday 6 July 2006, 21:21

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.

5

Pingback from Mark’s (we)Blog » More on booting Windows PE from a USB flash drive
Time: Saturday 11 November 2006, 10:01

[…] few months back, I wrote about booting Windows PE from a USB flash drive. Early versions of PE didn’t make this very straightforward, but Microsoft UK’s James […]

6

Comment from Damien Jorgensen
Time: Saturday 19 May 2007, 14:06

this sounds like real fun!

you can get XPe to do this too

7

Comment from wanderer
Time: Thursday 7 June 2007, 13:49

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.

8

Comment from Mark Wilson
Time: Friday 8 June 2007, 10:05

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

9

Comment from wanderer
Time: Monday 11 June 2007, 12:43

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

10

Comment from Tom
Time: Tuesday 24 July 2007, 22:55

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

11

Comment from Mark Wilson
Time: Tuesday 24 July 2007, 23:39

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

12

Comment from mike
Time: Wednesday 14 May 2008, 18:13

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

Write a comment

Please note the rules for comments and the privacy policy and data protection notice. I'm sorry but, because not everyone sticks to the rules, I've had to implement some spam prevention measures - if you're experiencing difficulties leaving a comment, please let me know.





The following XHTML tags may be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>