PE Builder – Creating BartPE bootable USB device.

Every IT folks and geeks knows that its good to have an USB bootable device handy with your favourite OS on it. Its very useful not only in emergency situations, but in many other cases. Apparently creating USB device with any Linux distro is (some say Linux is complicated) incredibly easy, it usually takes two-three clicks. Not a big deal, click, click and here you go, pre-format of the USB flash drive done, system installed and you can now boot your Ubuntu or other distro from your pocket USB flash drive.

You can even create a dual or even triple boot USB drive on a separate partitions if you want to and its also not a big deal.

The problems starts when you have … Windows. Mister Bill Gates and now the baldy guy, Mr Balmer don’t want you to have bootable Windows USB device, cos they don’t like if you play with their OS. Speaking about partitions, they also don’t want you to have a USB flash drive partitioned, because their operating systems only reads the first partition on a USB flash drive (nope, its not a joke !!!) while on Mac or Linux you just create as many partitions as you want and in a various file formats and system reads them all with no problems.

You may ask, why would you need bootable Windows USB device, huh?  The same reason comes to mind – emergency recovery/antivirus/toolbox portable operating system. I personally use BartPE Windows XP edition to deploy Northon Ghost images onto multiple desktop PC’s at work which makes things a lot faster and easier.

Ok, lets start then.

First of all you will need as follows:

– The latest package of PE Builder which you can get here

– Microsoft Windows XP Professional SP2 CD or CD files. (yes, we need SP2, you may try with Service Pack 3, but there is no guarantee that it will work, don’t ask me why, I don’t know).

– Service pack 1 for Microsoft Windows 2003 , which you can get here . We will only need two files from it, otherwise your bootable USB will crash with a tits up and throw an error 0x0000007b on a nice, well presented BSOD every time you boot it.

1. Install PE Builder, it will create directory c:\pebuilder31xxa

2. Create w2ksp1 folder on C drive and save your Windows2003 SP1 file there.

3. If you want you can rename the downloaded file from WindowsServer2003-KB889101-SP1-x86-ENU.exe to something simple, lets say w2k3sp1.exe

4. Open command prompt and browse to w2k3sp1 folder and unpack the .exe using the following command

w2k3sp1.exe -x

Now create folder srsp1 in C:\pebuilder31xxa folder and copy c:\w2k3sp1\setupldr.bin into this folder.

Copy this file c:\w2k3sp1\i386\ramdisk.sy_ into c:\pebuilder31xxa\srsp1 then expand it from that folder.

that will create ramdisk.sys file within the same folder.

5.Creating BartPE

Now you are good to go to create USB BartPE Windows XP. Open PE Builder, select source and “Create ISO image” as media output. If you wan’t to learn about the plugins and stuff, just click here for more info.

Once that done, insert your USB drive, open command prompt go to c:\pebuilder31xxa\  and create your bootable USB with the following command:

pe2usb -f X: – where -f is a format parameter and X: is your USB drive letter

Please notice that your USB drive will be formated with FAT16 otherwise wouldn’t be bootable. Because its a FAT16, there is a disc capacity limitation to 2GB, if you have a larger USB flash drive … you’re fuc*ed , but if you have two flash drives, small and big one, just continue creating your drive with the small USB flash drive (I managed to use 4GB USB with no problems) then use WinSetupUSB Tool from here and format your flash drive to FAT32, then just simply copy all files across.

PE Builder in general is a very powerful and customizable tool, that allows to do a lot of cool stuff. It is indeed an admin’s best friend. As I mentioned before I use it for ghost image deploying, it took me a while to get the BartPE working as a fully automated disc, therefore now it takes only 5 minutes for me to re-image PC, not 15 minutes as it was before and if we are talking about re-imaging of for exampe 40 PC’s at once … I believe you see my point.

I’ll also write how to create fully automated BartPE Norton Ghost USB or DVD in the next posts. So if you know someone who is “technologically disabled” and keeps bringing you his laptop every month to reinstall operating system, you then will be able to create an idiot-proof, fully automated recovery DVD that you can give your friend and explain him (or her ) , that in case of anything goes wrong – turn on laptop, insert DVD,  wait 5 minutes, have a smoke and reboot at finish.

Leave a Reply