PXE booting UBCD4Win
We've been PXE booting at work for a long time now. We use it to Image our computers. its pretty cool really. a while ago I found this tool called the Ultimate Boot Disk for Windows. Thats a project headed up by a guy named Ben Burrows along with his merry band of coders. you can read about it at http://www.ubcd4win.com The tool is great!!! Once I found out how useful it was, I was like, that's cool, but what if I don't want to carry a cd around to make use of its techno-delicisocity. so I fiddled around with PXE booting it and came up with this little document to make it easier for people to replicate. read on if you want the gory details.
my system : winxp sp2 80 gig drive, p4 with 1024M ram.my pxe server :emboot
my tftp server :the win2k3 default. I couldn't get the emboot tftp
server to play correctly.
This process is not for the feint of heart. please read it fully and understand
what is going on. I don't want to be responsible for anyone formating thier other
hard drive by accident...
these notes are the distillation of a lot of different resources and a lot of time.
most of this is taken from Harold over at 911cd.com forum pages
please print this out so you can follow as you are doing it.
1. Download MS Windows Server 2003 Service Pack 1 (RC). It is a SFX CAB archive.
You may use WinRAR to open it.
A. Extract the SETUPLDR.EX_ and RAMDISK.SY_. STARTROM.n1_
B. Expand SETUPLDR.EX_ and ramdisk.sy_ to get SETUPLDR.EXE RAMDISK.SYS and STARTROM.N12
C. Make a folder called tftproot copy the setupldr.exe to the folder tftproot and
rename it to NTLDR (no extension)
D. copy STARTROM.N12 to tftproot and rename it to STARTROM.0 (zero)
E. copy NTDETECT.COM from the win2k3 sp1 folder to the tftproot folder
2. Build a normal XPsp2 source (a directory with xp cd contents, and sp2 slipstreamed in. not a cd)
3. set up your tftp boot server.
4. start with a fresh UBCD4WinV3.12 install, you can get it here, http://www.ubcd4win.com/downloads.htm
5. now there there is no 5...
6. launch UBCD4WinBuilder.exe , disable plugins as many plugins as you are comfortable with, I
disabled ones like opera and some of the duplicate tools.
7. (**OPTIONAL**)go through the drivers directory and delete the ones you know you won't be using.
these will take up space in the disk image, and we want it to be as small as possible, but
make sure you have the ones you need.
8. update malware defs/antivirus defs from the plugin configuration tool (enable,disable config etc..)
once you are happy with your plugins, go ahead and build and create the iso. (for the menu post processing.
***if you want to build a smaller sdi disk image continue on to step 9.
***if you want to use ISO file instead of smaller SDI image. build the ISO.
copy the ISO image to the tftproot folder and skip down to step 21
9. ok so we have built and have the bartpe output directory structure. right click on the
"c:\pebuilder3.10a\bartpe" output folder and select properties, notice the size,
subtract 80M. Write this down, this is the size of the SDIdisk we will create later.
10. download xpeffi.exe from here
http://www.microsoft.com/downloads/details.aspx?FamilyID=dacd1722-256b-48c5-91c1-af6062340efc&DisplayLang=en
11. launch xpffi.exe and select only "windows xp embedded sp1 tools"
In the middle where it says download location click "change location"
and select somewhere familiar to you, I created a folder called sdi
on the desktop and chose it ..
click "start download now" when its done it will launch the setup application.
cancel out of it, we are not interested in it.
12. in the sdi folder will be a couple of files, one of them is tools.cab.
you can use winzip to extract the files. keep all the files together..
we are interested in the file called sdiloader.exe, sdi.sys, sdi.inf, and sdi.cat
13. launch sdiloader, it will prompt you to install a driver, go ahead and do it.
when the gui comes up, click the "add disk" button and navigate our tftproot folder
and for a file name I used "bartpe.sdi". it will prompt you to create it if it does not exist.
It will ask you what size it should be, (the default is 64) change it to the number we wrote down earlier.
this will create a virtual hard disk which we will work with next. keep sdiloader running, just minimize it.
14. open a cmd window. and run DISKPART.EXE (case is unimportant in the following.)
A. type: LIST DISK <enter>(it will return the hard disks it finds. one will be the disk we just created with sdiloader
B. type: SELECT DISK x <enter> (where x is the small drive we just created,(usually disk 1 but make sure you have the right one!!!)
C. type: CLEAN <enter>
d. type: create partition primary <enter>
e. type: ASSIGN LETTER=R (or whaterver, I'll use R...)
f. type: EXIT
15. In the cmd window type:
format R: /FS:NTFS /V:BARTPE_SDI /Q /C /Y
(make sure your drive letter is the same as what we ASSIGNed just now!!
this formats the drive and enables compression.
16. once the format is done, in the cmd windows type
robocopy.exe /MIR c:\pebuilder3.10a\bartpe\ R:\ /MIN:150000 /R:3 /W:4
17. in the cmd window type DEFRAG R:
18. in the cmd windows type
robocopy.exe /MIR c:\pebuilder3.10a\bartpe\ R:\ /MAX:150000 /R:3 /W:4
(note the min and max difference in the 2 robocopy commands.
19. all of the files should fit. you can play with different sizes after you are familiar with the process.
20. go back to the sdiloader application, or relaunch it if you closed it. and select "remove disk"
it will dismount our disk image file.
21. navigate to the tftproot folder and create a textfile called WINNT.SIF and paste the following lines
for using sdi image:
#############snip##################
[SetupData]
BootDevice="ramdisk(0)"
BootPath="\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=bartpe.sdi"
#############snip##################
for using ISO image
#############snip##################
[SetupData]
BootDevice="ramdisk(0)"
BootPath="\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=bartpe.iso"
#############snip##################
so in our tftproot folder we have the files:
NTDETECT.COM, NTLDR, WINNT.SIF, STARTROM.0, and (BARTPE.SDI or BARTPE.ISO)
*I capitalized all of them... I think it makes a difference, I did it just in case.
**important----copy all of the files in our tftproot folder into the root directory of your tftp server.***
22. if you are already running a pxe server, you will have to configure its menu
so that it passes the STARTROM.0 file as the start up file.
this file will handle booting the machine correctly.
once you have it working, you can just replace your iso/sdi image
if you're using sdi image, it is good to keep an eye on how much free space
it has. the smaller the file the less time it will take to download to boot the
machine.

