silent.gumph.org
Pages
  Welcome
  Basics of a quiet pc
  Quiet or Silent
  Boot Linux from CF
  Mini-Itx Comparison
  Diskless Windows
  Build a Media PC
  Silent PC Options
 
Reviews
  Cubid 2699R Case
  Kiss dp-500
  Zalman Flower Cooler
  AcoustiPack Foam
 
Books
  Build a PC Home Theater
  Build your own PC
  Upgrading and Repairing PCs
  Hardware Projects
 
Appendix
  Privacy policy
  About









Diskless Windows with PXE
 
A step-by-step guide to booting windows 98 without a hard disk, or a windows server (terminal or otherwise) using just a pxe enabled network card and a linux box.

You should be able to get this up and running in under a day, as there are quite a few steps involved, so we will be testing the setup at each stage to help iron out any problems. You will need a linux box, a pc for windows, a copy of windows98 (probably on CD) and a small hard disk (say 2GB) to use for the original windows 98 setup. The basic steps we are going to do are as follows

Now I made that sound easy huh?

Setup bootpd and tftpd

Most linux distributions come with bootpd and tftpd, so you will have to refer to your distributions documentation as to how to install them (package, rpm or from source) All of the examples in this guide are based on Slackware Linux. We are just going to do the most basic setup possible in order to get this to work.

First up, if you have a server or router on your network that is providing dhcp addresses for all of the network, then you need to ensure that it is configured to not support bootp clients, as we are going to use our linux box for that. I'd allocate a seperate range of addresses just for the bootp clients, which will only need those addresses during the boot process. Once windows is booted, it can get it's real address from a dhcp server or use a static address as normal.

Bootpd uses a configuration file /etc/bootptab. We will set up a dummy entry for our windows pc, and you will need to replace the values with those for your network. For full details of the parameters check out the bootptab man page. We are using a very cut-down configuration, just enough to get it working.

.windows:\
        :ht=1:ha=001122334455:\
        :hd=/tftpboot:bf="pxelinux.0":\
        :sa=10.0.0.5:sm=255.255.255.0:\
        :ip=10.0.0.11:
You need to make the following replacements

ha with the MAC address of the windows network card.
hd with the path tftpd will serve the pxe files from
sa with the ip address of the linux box
sm with your networks subnet mask
ip with the ip address you want to give the windows box during the boot process

Now create the directory that tftpd will use for the pxe files. I'd recommend /tftpboot for simplicity at the moment. Create a small text file in the directory, and check you can retrieve it with tftp

root@linuxbox:~# tftp linuxbox
tftp> get /tftpboot/test.txt
Received 615 bytes in 0.0 seconds
tftp> quit
root@linuxbox:~#
If it fails, check the messages log file for any errors.

Setup PXE

You need to grap a copy of H. Peter Anvin's excellent Syslinux that makes all of this possible. Extract memdisk and pxelinux.0 from the download and copy them to /tftpboot. Now create a directory /tftpboot/pxelinux.cfg where the pxe configuration files live. Copy the following basic config into a file called default in the /tftpboot/pxelinux.cfg directory.
DEFAULT net
PROMPT 0

LABEL local
      LOCALBOOT 0

LABEL net
      KERNEL memdisk
      APPEND initrd=win.img
By having local and net sections in the config file means that by changing the default entry we can get the windows box to boot off of its local hard drive, or the network.

We are now going to check that everything is working ok. From windows create a bootable floppy disk. Make sure its bootable. Put it into the linux box, and copy the disk image off

dd if=/dev/floppy of=/tftpboot/win.img bs=1024 count=1440
You will probably need to go into the bios setup of the windows box, to enable network booting. You may need to change the boot order to allow network booting first. Check your motherboard manual for details.

Now for the moment of truth ... drumroll please ... Start the windows box.

If everything goes smoothly, you should have seen it start the PXE process, load memdisk and win.img and then give you an A:\ dos command prompt. If you have, then Hoorah, you may proceed. If not, then we need to do a little troubleshooting first.

  • You didn't see the PXE stack load, and it try to request an IP address. Re-check your bios and network settings to find out how to get it to network boot.
  • The PXE stack loaded, but sat there for ages before failing and booting of the local hard disk. This means it failed to get a bootp response. Check the MAC address in your bootptab file matches the MAC address of the windows network card. Check nothing else on the network is giving out bootp responses.
  • The PXE stack loaded, but then complained accessing your tftp server. Check the /var/log/messages log file to see if there is a path of permissions problem. Double check the tftpd server is running. Check the ip address of the server in the bootptab file is correct. You are running bootp and tftp on the same box aren't you as PXE seems to work best when the bootp server is the same box as the tftp server.
Rinse and repeat.

Part 1 | Part 2 >>

Add a Comment

 
© 2003-2010 silent.gumph.org

Valid HTML 4.01! Valid CSS!