Slipstream your very own XP CD

Tech questions and answers, video game stuff.

Moderator: ElTaco

Post Reply
ElTaco
Networking Securely
Posts: 907
Joined: Fri Jan 14, 2005 4:12 pm
Location: Northern VA
Contact:

Slipstream your very own XP CD

Post by ElTaco »

I had to create a slipstreamed Windows XP CD yesterday, because a machine that we built had a specialized Raid card in it but no floppy drive. The reason that this is significant is that during install, Windows XP will allow you to add in drivers that it needs to access raid arrays or specialized storage drives but it only allows you to use your A: drive (aka floppy drive). I already said that this machine did not have a floppy drive so what are the possible solutions?

USB floppy drive would have worked, but we didn't have one and I didn't feel like purchasing and waiting a couple days to get my hands on one.

We couldn't just take out the hard drive and install windows on it in another machine for several reasons. One was that the drives were SATA drives and none of our other machines have SATA support. The second reason is that you can't just take an array and move it from one computer to another without doing lots of work, and that still wouldn't have allowed you to see the Raid card so it would have been useless.

So the only quick option left at this point was to create a windows XP CD with the RAID driver already on it. Luckily for us, Microsoft does allow this to be done with relative ease. The nice thing is you can also apply the current Service Pack (SP2 for XP) and patches so that when the install is finished, your machine is already patched. In theory if you have a bootable DVD, you could even set the system up with software and everything. And if you want to be really crafty, you could add your own logos and automate it all so you don't have to touch the keyboard at all while the system installs itself.

Now there are a lot of options and choices so to look at them all, you can browse this site, which gives most of the choices:
http://www.unattended.msfn.org/index.htm

The steps to create a patched XP CD are these:

Copy the contents of your XP cd to a directory on the C:\ drive such as c:\xpcd.

Go to Microsoft's website and get the latest service pack and download it.
XP SP2 Download

You can also grab all the other patches by searching for them on the MS website.

Once you have your service pack downloaded, start a command prompt window and type in: c:\xpsp2.exe -s:C:\xpcd

This will instruct the SP2 installer to update the files with the SP2 files in the xpcd directory.

After you have updated XPCD directory contents to SP2, you can patch them with the post XP hotfixes. You do this by downloading them first and then in the Command prompt window type:
C:\hotfixfilename.exe /integrate:c:\xpcd

Do that for each post SP2 hotfix that you download.

Now your hard drive contains the contents of an XP install CD that have been patched with the latest SP and hotfixes. If this was your only goal then you can skip ahead and burn the bootable install CD. If you need to add drivers then read on.

Next you'll need to download the drivers for your Raid/Scsi device. The only time you need to get the drivers is if it has something to do with the install Hard drive. Otherwise, you can just install the raid/scsi card after you are finished setting up windows and add the raid array later.

After you have all of the driver files (usually consists of 7 files per device), you will want to add the following directories to your XPCD directory:
c:\xpcd\$OEM$\$1\Drivers\01

In the 01\ directory, copy your first device's drivers. As I said you will have about 7 files. If you have a 2nd device, add those drivers to a directory called \02 in the \drivers directory.

The next part is the tricky part. You will have to show the CD install files that you have a new driver on there.

Move the system driver file (the file with the .sys extention) from the $OEM$\$1\Drivers\01 directory into the XPCD\I386\ directory that contains the majority of the windows XP files. You can compress this file if you want to follow Microsoft's example by using the makecab.exe program that comes with your windows machine. If you turn the sys driver into a cab file, remember to change the file name to filename.sy_. Next you will need to open up the 'TXTSETUP.SIF' file in the I386 directory and edit a few options.

Under [SourceDisksFiles] add:
filename.sys = 1,,,,,,3_,4,1

where filename.sys is the original filename of the .sys file you copied into the i386 directory. If you made it into a cab file, replace the 3_ with x_ so it would read: filename.sys = 1,,,,,,x_,4,1

This next part is a pain. In your original driver directory, there should be a file called 'txtsetup.oem', open this file and find all the lines starting with:
"PCI\VEN_". They should look something like:
id = "PCI\VEN_1095&DEV_3112&SUBSYS_61121095", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_611215D9", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_34228086", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_B0031458", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_A0111019", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_A0121019", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_A0131019", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_A0141019", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_A0151019", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_1014147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_100B147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_1402147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_1404147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_1802147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_1804147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_1C00147B", "Si3112r"
id = "PCI\VEN_1095&DEV_3112&SUBSYS_5930107D", "Si3112r"
and there were a lot more lines then that. You are only interested in the sections in between the quotes. Take each line and copy it to the TXTSETUP.SIF file under the [HardwareIdsDatabase] section.
When you put each line into the TXTSETUP.SIF file, they will look like:
PCI\VEN_1095&DEV_3112&SUBSYS_61121095 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_611215D9 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_34228086 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_B0031458 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_A0111019 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_A0121019 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_A0131019 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_A0141019 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_A0151019 = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_1014147B = "Si3112r"
PCI\VEN_1095&DEV_3112&SUBSYS_100B147B = "Si3112r"

I had about 20+ lines for my driver, but you could have less ormore. I also just limited the lines to the ones marked for Windows XP. The Driver file will contain those same lines for XP, 2000/NT and 9x systems.

Next find the [SCSI.load] section in the TXTSETUP.SIF file and add this line:
Filename = Filename.sys,4

I should note that the filename before the equal sign should not have the .sys extention. The filename after the equal sign should have the .sys extention.

Finally, also in the TXTSETUP.SIF find the [SCSI] section and add:
filename = "SCSI/RAID card driver model"

and again the filename before the equal sign should not have the .sys extention attached. You can call the driver whatever you want in between the double quotes.

Next create a file called WINNT.SIF in the i386 directory. Add the following content:

[Data]
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=ProvideDefault
OemPreinstall=Yes
OemSkipEula=Yes
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
WaitForReboot="No"
TargetPath=\WINDOWS
DriverSigningPolicy=Ignore
OemPnPDriversPath="Drivers\01"

[GuiUnattended]
OEMSkipWelcome = 1

[UserData]
ProductKey=product key
FullName="Your name"
OrgName="company name"

Of particular interest are:
OemPnPDriversPath="Drivers\01" - replace the content in between the double Quotes with the actual driver path under the $OEM$\$1\ directory structure. As you might notice, you only need to fill it in starting with the Drivers directory. Fill out the [UserData] section as needed.


All the edits are finished. Now you just need to burn a CD with the contents on it. Use your burner software of choice. You will want to burn a bootable CD. To grab a boot image, you will need to grab the original one from the windows CD that you started with. To do this, you can use a software called ISOBuster. Download it, install it and then find the microsoft boot image on the CD and save it on your hard drive. Then when your burner software of choice , like Nero, asks you for the bootloader image, just select that file. The file will have a .img extention and on my cd it was called BootImage.img.

Once the CD is burned, boot it as if it would be the original XP CD. You do not have to push F6 to add the driver, and if you follow the driver names as they are being loaded, you will see the name you typed in for your driver. You will still have to set up the hard drive configuration unless you set up your winnt.sif file to automate every question. During the windows portion of the setup, you will notice that the questions should be filled in if you filled the appropriate [UserData] choices in the WINNT.SIF file.

That is the very quick introduction to it. If you want more in dept descriptions, I suggest you go to that site, I linked above. There are also many other websites that discuss it in steps similar to the ones I've described here. I'll throw out one warning that most websites seem to ignore on the site. When I did my first slipstream, most of the sites stated you only needed 3 lines in your Winnt.sif file. This led to errors during setup. If you add all the lines and fill in the appropriate information you should be good to go.
Post Reply