[intro | bootstrap | linux kernel | root filesystem | network boot | install on flash card ]

Linux on net4501


The net4501 uses PXE ("Pre-boot eXecution Environment") to boot from the network. The net4501 broadcasts a DHCP request to get an IP address from the DHCP server and a bootstrap filename from the PXE server. The net4501 then downloads the bootstrap file using TFTP and runs it.

We will provide PXELINUX as the bootstrap, which will in turn load and run a Linux kernel; the kernel will then mount its root filesystem over NFS. This will give a fully working Linux environment without touching the flash card.

If you have not installed the following packages on your network boot server, do so now:

PXE server

Edit /etc/pxe.conf to serve pxelinux. Note that Local Boot is commented out; this makes pxelinux the default boot image.

# 14,linux-boot

# 0,Local Boot
13,Remote Install Linux
# 14,Remote Boot Linux


DHCP server

Edit /etc/dhcpd.conf. It's easiest to allocate a fixed address to this image. Substitute appropriate values for your network for the hostname, hardware ethernet address and IP address.

host net4501.mydomain {
        hardware ethernet uu:vv:ww:xx:yy:zz;
        fixed-address aa.bb.cc.dd;

You should ensure that the hostname to IP address mapping is also in /etc/hosts and/or in the appropriate zone in your name server configuration. /etc/hosts has IP address followed by fully qualified hostname, optionally followed by aliases:

aa.bb.cc.dd     net4501.mydomain  net4501

NFS server

If the exported filesystem image is to be in /export/net4501, the exports file will be:

/export/net4501 net4501.mydomain(ro,no_root_squash)


Copy the pxelinux program to /tftpboot/X86PC/UNDI/pxelinux/pxelinux.0

Create a file called /tftpboot/X86PC/UNDI/pxelinux/pxelinux.cfg/AABBCCDD where AABBCCDD is the IP address converted into hex. (AA is the hex representation of aa in the IP address chosen above, BB is bb, etc.) Any letters in AABBCCDD should be in capitals; there are no dots between the octets. The contents of the file will be:

SERIAL 0 19200
DEFAULT net4501 console=ttyS0,19200n81 root=/dev/nfs nfsroot=pp.qq.rr.ss:/export/net4501 ip=:::::eth0:dhcp panic=10 ramdisk_size=32768

Substitute your nfs server's IP address for pp.qq.rr.ss.


Now enable the servers:

for i in pxe tftp nfs nfslock dhcp; do /sbin/chkconfig $i on; done

You should either reload the configuration on the pxe, dhcp and nfs servers, or reboot the machine.


Valid HTML 4.01! Valid CSS!

Peter Benie <peterb+linux-net4501@chiark.greenend.org.uk>