Friday, February 6, 2009

Automating the building of BartPE

So I got really tired of building BartPE manually. So in short, (to be encapsulated for more permanent and official documentation later) is a summary of how to build the various pieces of BartPE.

Build the "original" version using PEBuilder313
Run pebuilder.exe. Build with appropriate plugins and WinXPSP2 files. Skip the CD write option and burn the ISO. The only files of value are in the BartPE folder anyways.

Run InfCacheBuild.cmd
Cleans up the inf files and makes it load faster.

Run PatchSP2.cmd
This tranfers the new build to the PXE folder structure, copies in the required W2KSP1 files, and fixes the open file security warning problem for bartpe.exe.

Run CreateSDI.cmd
This automates the highly manual process of creating the SDI. SDIMgr is used to create the "BLOB" that will become the virtual disk. BLOB is a binary large object. Disk is mounted using a command line form of SDILoader. Diskpart is used to partition and assign a driver letter. Disk is formatted. Files are loaded using robocopy. Disk is unmounted using a command line form of SDILoader.

Run CreateUSB.cmd
To test the build, we need to put it on a USB key. This script will format and copy the relevant files on a USB key.

Issues with BartPE

It's that time of year again. Another machine model, another retool of BartPE. This time it the Dell Optiplex 960. Unassuming machine, really. But wait until you start playing with it...

1) I had forgotten about this, but am constantly reminded this time of year. BartPE will BSOD if the SATA operation is not set to RAID Autodetect/ATA. Applies to 755 & 960. For your reference, the error is stop: 0x0000007b.

2) Unrelated issue. Tried building BartPE with W2K3SP1 as a base as recommended in some circles. Nada. Has issues with Intel 825xx net drivers, specific to W2k3. Broadcom's XP drivers work fine. If you're lucky, it causes the occasional BSOD on both the 755 and 960.

3) Had to go back to WinXPSP2 as a base because the previous didn't fly. Got tired of doing all the steps manually which spawned my next project... Automating the build of BartPE.

4) Booting from usb using an ISO is officially broken. :-( Oh maybe that's where I saw the BSOD. Which makes the previous step even more important. For testing, I now have to either boot from CD (yuck) or change the format to SDI for quick testing.