Imaging

Finding a good way to deploy a Windows XP image to a bunch of workstations from your Samba file server in a timely fashion can be tricky. This is what I did to make the process a little smoother.

Booting

The first step is finding a way to boot your workstations easily. In the beginning I was using Knoppix, but when you're imaging three hundred computers at a time, carrying around that many CDs becomes cumbersome. Not to mention that Knoppix takes a long time to boot. So I was looking for an OS that used the PXE capability of our workstations to boot disklessly. I eventually found RIPLinux. It has two root images, a 35MB version which downloads quickly, and a 75MB version which contains a full X server, web browser, gparted, and a bunch of other stuff.

Deploying the image

Initially, we were using DOS boot images and Norton Ghost, but Ghost proved unreliable under high load. I tried to use partimage, but the server process would die if more than one workstation tried to fetch an image at a time. I was, however, able to combine the two, but using a Linux boot image, and using Partimage to pull the image off a Samba share. This has proven to perform well even under high load (like pulling the same image down to a hundred machines at once.) With gigabit ethernet and SATA disks in the workstations, we are able to image single machines at speeds up to 2GiB/min (that's two gigabytes per minute), and labs (~30) full of machines at about 1GiB/min

Configuring the workstation

Before sending the image up to the server, we use Sysprep to prepare the master. When the image comes down to a workstation, Windows first boots into Mini-Setup, which allows the technician to specify the workstation name and joins the domain automatically.

Automating the process

This system required a certain amount of keyboard entry, to mount the share on the local server, start the imaging process, and configure the workstation name. I wanted to find a way to take care of all of this automatically. I started by modifying the root image in RIPLinux (instructions on how to remaster the boot image can be found here). I configured init to call a script that determines the correct server, mounts the share where the images are stored, and runs a script found on that share. The script checks the machines MAC address against a manifest file on the share. The manifest file is a CSV containing the MAC address, the image filename, and the workstation name. If an entry isn't found, the script asks the technician to enter this information, and then uses it to start the imaging process. After the image is retrieved, the script mounts the share using a user-space NTFS driver (included in RIPLinux) that allows read-write access. It then modifies the Sysprep answer file, inserting the workstation name, and dumps a registry file on the machine. After the machine reboots, Mini-Setup runs completely unattended. The machine reboots again, coming up to the first login prompt. At this point, other scripts take over, taking the location of the workstation (determined by the machine's name,) and installing printers and additional software. This setup allows a single person to image a school of three hundred machines in eight hours.