Penguin

CRCnet uses a lot of Soekris BiscuitPCs and I wanted a nice fast way to install and configure them.

Each Soekris has a CompactFlash slot into which we insert a 64MB CompactFlash card. This is the system disk. It is mounted read-only during normal operation and we use a custom built LinuxDistribution. The Soekris BIOS supports PXE booting. The solution that I came up with PXE-boots the Soekris, copies a basic system onto the flash card, reboots the biscuit PC and configures it automatically. Minimal user interaction is required.

You need two components to get PXE to boot successfully:

  1. A DHCP server to pass basic network configuration to the client
  2. A TFTP server to serve up PXELINUX and your Kernel.

Configuring DHCP

You'll need the following options in your DHCP configuration such that the machine you want to PXE-boot is passed them.

# Address of the tftp server
next-server 10.1.224.254;
# Filename to load off the tftp server
filename "pxelinux.0";

Configuring TFTP

If you are running Debian, make sure you are using the tftpd-hpa package. Set tftproot to /tftproot. Inside tftproot you need to put the pxelinux.0 image and create a pxelinux.cfg directory. Inside this directory place a configuation file called default. It should contain the following:

SERIAL 0,19200
DEFAULT soekris
TIMEOUT 30
PROMPT 1
IPAPPEND 1

label soekris
  kernel bzImage-2.4.26-bpc-pxe
  append root=/dev/nfs nfsroot=10.1.224.254:/exports/soekris ip=:::::eth0:dhcp panic=10 ramdisk_size=32768 console=ttyS0,19200n8

You also need to ensure the kernel image referenced above (in the kernel line) is in your tftproot.

Installing the Flash Card

Once you have the system PXE-booting successfully and loading the NFS FileSystem you are almost home and hosed. To achieve the configuration of the machine and install the flash card I simply editted the inittab(5) file on the NFS root to load a Shell script rather than spawning a getty. This script mounts the flash card read-only and copies a base image across on to it. This step is likely to be very user specific. Once the installation and configuration is complete the biscuit PC can be rebooted and it's up and running.


Part of CategoryHowto, CategoryNetworking