PXE-booting DamnSmallLinux -- the easy way [updated]

PXE-Booting or Etherbooting usually is a quite complex thing that usually involves three servers (DHCP, TFTP and NFS) as well as some modifications to the kernel and the ramdisk of the linux system that has to be booted via network.

I slightly modified the initial ramdisk to boot DSL just using DHCP and TFTP and thus significantly reduce the amount of configuration needed...

Setting up a boot server now is done in less than five minutes!

The procedure usually works as follows:

  • The PXE client sends a DHCP request and receives network parameters like gateway, client IP, IP of the TFTP-server and name of the next file to load. This next file usually is a bootloader like PXELINUX.
  • Via TFTP the client receives the bootloader.
  • This TFTP-aware bootloader now loads its configuration and finally kernel and initrd from the TFTP server.
  • Now the kernel takes control: it loads network drivers that have to be present on the initrd, searches its NFS server, mounts its root filesystem (or a folder containing the KNOPPIX cloop-image) and continues booting.

Since I wanted to keep PXE booting simple I asked myself "Why not pack the KNOPPIX image into the initial ramdisk?". This would allow to boot DamnSmallLinux entirely from TFTP without needing to have an NFS server as well as to having to make massive modifications to the ramdisk for detecting network cards.

I tried it and found out that I just needed to do small changes to the "linuxrc" file for introducing a cheatcode "frominitrd" which makes DSL skip searching for a local KNOPPIX folder.

It works perfectly from CD and I also tried it via the net. It just works. You may download an ISO image containing the modded initrd from

http://cdprojekte.schlenker-webdesign.de:8080/Public/DSL-frominitrd/1.5-0.0/

There you also find the diff for the linuxrc.

Update:

Now you can download ZIP- or TAR.GZ-files that contain the bootloader and a complete boot configuration. You just have to adjust the settings of your DHCP and TFTP server. A boot server on a windows box is set up in less than five minutes using TFTPD32:

  1. Create a directory C:\tftpboot
  2. Unpack the contents of dsl-X.X-tftpboot.zip to the folder C:\tftpboot
  3. Download TFTPD32 from http://tftpd32.jounin.net/ and unpack the contents of the ZIP file to the folder C:\tftpboot.
  4. Run the TFTPD by double clicking "tftpd32".
  5. Adjust the inclluded DHCP server according to your network settings (just
    take a look in the output of the command "ipconfig /all"). Do not forget to
    set the boot file to "pxelinux.0". Save the configuration.

Screenshot of TFTPD32 configuration

Take a look at the README file to see how to configure Linux as a boot server.

Regards,
Mattias

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Very cool!

Hi Mattias,

This is great as it really simplifies pxe booting by not having to set up an nfs server (I'm in a Windows 2003 server environment).

A little additional information, if you can't use the built in dhcp server of tftpd32 (for example because of the need to use Windows dhcp), then http://pxes.sourceforge.net/howtos/ms_only_environment/ explains how to setup Windows dhcp to supply pxe facility.

Would you mind expanding on how you packed the DSL image into the initial ramdisk ("Why not pack the KNOPPIX image into the initial ramdisk?") as I'd like to be able to create my own custom DSL image for pxe booting.

Thanks!

Martyn

Just what I was looking for, but..

..it's not working. Did like in HowTo and in picture. Tftpd32 keeps repeating:

Read request for file pxelinux.0. Mode octet [23/01 13:19:38.953]
OACK: blksize=1432, [23/01 13:19:38.953]
Rcvd DHCP Discover Msg for IP 0.0.0.0, Mac 00:50:C2:19:C0:84 [23/01 13:19:38.984]
DHCP: proposed address 10.0.0.2 [23/01 13:19:38.984]
Rcvd DHCP Rqst Msg for IP 0.0.0.0, Mac 00:50:C2:19:C0:84 [23/01 13:19:38.984]
Previously allocated address acked [23/01 13:19:38.984]
Read request for file pxelinux.0. Mode octet [23/01 13:19:39.000]
OACK: blksize=1432, [23/01 13:19:39.000]

..and so on.

Boot file is pxelinux.0, "option negotiation" enabled , "allow "\┬┤as virtual root" enabled.

It boots when i'm using some old ltsp boot file (vmlinuz.ltsp) but this one panics.

What might be the problem?

I'm using Tftpd32 Version 2.81 and dsl-1.5-tftpboot.zip. Hardware is some Thincan.

edit: If I put etherboot.nbi as boot file. Client shows "KNOPPIX terminalserver started, booting in 30 seconds."
But nothing happens after that.

edit2: Client supports only TAGGED-ELF format (http://www.artecdesign.com/downloads/TC_EtherBoot_guide_v1.0.pdf). Can this be the problem? How to overcome this?

new iso?

any update with the latest dsl or dsl-n ??

it'll be much better if we just boot the iso, then start the terminal server and let all diskless client boot from it.
just like knoppix does...

tnx&rgds,
rex

http://www.gobloglah.com