PXE Windows Image Using Linux


UPDATE 2009-04-11 version 0.3 now available, 2.6 kernel and better hardware detection.

This mini Linux implementation contains tools like partimage, NTFSresize, and fdisk and is based around the fantastic busybox.

It enables you to PXE boot a PC into a Linux client which can create an NTFS partition, grab a Windows disk image from the network, write it to a local disk and then resize that partation. I developed this client whilst working at the School of Electronics and Computer Science at the University of Southampton.

The NTFS code used is considered experimental so I give no guarantees, but it has never failed for me :)

If you are having trouble then please email me, or take a look at the tips page

This is what you need to make it work;

  • A DHCP server
  • A TFTP server with the pxelinux boot image
  • A Partimaged server (with a windows image stored on it)
  • A PXE bootable PC (most modern PC's)

First step is to configure the DHCP and TFTP server to get your PXE client working. Follow the guides at http://syslinux.zytor.com/pxe.php. The main thing is that you have an entry in your dhcpd config that contains the directives;

next-server TFTP_SERVER_IP_ADDRESS
filename "/pxelinux.0"

Now grab the WIUL kernel, the RAMdisk and the boot.msg files from here. Place them into the root of your TFTP server (/tftpboot) You'll need to edit the boot parameters passed to the kernel as defined by the 'default' file located in /tftpboot/pxelinux.cfg/default. Try something like this;

default 1
prompt 1
timeout 600
display boot.msg
F1 boot.msg

label 1
kernel wiul-kernel-2.6.25.2
append initrd=wiul-0.3.img.gz rw root=/dev/ram ramdisk_size=65536 vga=1

In this new version of WIUL the client will try and tftp get an image list when it is booted. The file that it will try and get is called image.lst this should be placed into the root of the tftp server and updated with a list of images that are available one per line. Comments are allowed and should start with a #.

So your tftp server should have a structure something like this;

/tftpboot/boot.msg
/tftpboot/image.lst
/tftpboot/pxelinux.0
/tftpboot/wiul-kernel-2.6.25.2
/tftpboot/wiul-0.3.img.gz
/tftpboot/pxelinux.cfg/default

Now if all these things have been setup correctly you should be able to PXE boot into the Linux client.

How to image a client

There are a few steps that we have to take to image a client this may seem a bit hacky but it does work :)

There are two users on the WIUL client root and wiul. If you login using username:wiul password:wiul you will be presented with the main WIUL menu. The root password is set to partimage and logging in as root will take you to a shell prompt.

Please have a look at the README before you begin!