The other day, I had a problem: I was trying to install Windows XP on a system with a pair of mirrored SATA drives, accessed through the on-board RAID controller. Which, unfortunately, is not supported by Windows XP "out of the box".

Normally in these situations, you'd press F6 during the boot process, and insert a driver disk. Trouble is, this machine has no floppy drive, and Windows does not want drivers on CD-ROM during this phase of the installation process. So what can I do?

One possible answer is to create a modified Windows XP CD-ROM that contains the necessary drivers. This requires the following steps:

1. Find the driver files

The driver would normally come in the form of a set of files: as a minimum, a .sys file with the driver code, a .inf file with installation information. Once you found the files, you need to compress them with the makecab utility, e.g.:

makecab viaraid.sys viaraid.sy_

This compression step is apparently necessary, otherwise the installation process would be looking for the correct checksum in the txtsetup.sif file (see below) and may fail if the checksum is not present. (I haven't actually verified this, I am just following the advice I read elsewhere.)

2. Extract the files from an XP CD

Simple enough: I use xcopy. Optionally, you may also want to "slipstream" onto the extracted files any service packs or hotfixes you may have downloaded from Microsoft.

3. Add the new driver files

Add the compressed files you created in Step 1 to the I386 subdirectory.

4. Modify txtsetup.sif

This is the tricky part: You need to add entries to txtsetup.sif. Some of it may be guesswork, based on what you read in the driver's own .inf files. For instance, in order to make the VIA RAID driver work, I added the following to my txtsetup.sif:

PCI\VEN_1106&DEV_3149 = "viasraid"

viasraid = viasraid.sys,4

viasraid = "VIA Serial ATA RAID Controller"

viasraid.sys = 1,,,,,,4_,4,1,,,1,4
viasraid.inf = 1,,,,,,,20,0,0

These lines can be added to the respective sections in the file, or appended at the end (i.e., the same section title can appear multiple times in the file.) Either way, be careful not to lose the often invisible end-of-file marker (Control-Z character) as reportedly, that will cause setup to fail.

Also, what I have done here isn't perfect, just "good enough" for my purposes. For reasons I don't completely understand, Windows still asks for a driver disk: but, it does so during the graphical phase of the setup, and is perfectly happy with a driver CD. Meaning that the driver was present and usable when Windows initially started from the CD-ROM. This was enough for me, but if your goal is to create a CD that can be used for an unattended install, you may need to experiment a little further.

5. Create a bootable CD-ROM image

This can get difficult. In order to create a bootable image, you first need a boot sector image, which you must extract from (where else?) a Microsoft CD. I use IsoBuster from Smart Projects, but there are also other tools available. If all goes well, you'll end up with a 2,048 byte (that's byte, not kilobyte or megabyte) file containing the boot image. This is a "no emulation" boot image so set your CD burning software accordingly. I set Nero to "No Emulation", the image start at sector 07C0, and an image length of 4 sectors. When burning the CD, it is advisable to set the "Disk-at-once" and "Finalize CD" options.

6. The proof of the pudding...

To find out if your CD works, you need to test it. (You may want to use a CD-RW disk at first, to avoid creating too many coasters.) Try booting from the CD. If you made a mistake when burning the image, you'll likely not see much: the boot process will fail. If the boot is successful, you'll see the Windows Setup program starting, and if you watch carefully, you may even see the name of your added driver flash briefly as drivers are loaded. Of course the real test is whether or not you see your disk drive when the list of drives to which an installation can be attempted is shown.