[CUWiN-Dev] for the howto: PXE booting Soekris boxen

David Young dyoung at pobox.com
Thu Apr 20 12:13:31 CDT 2006


Build a memory-disk root w/ e.g. buildmd (for net45xx) or buildgeodemd
(for net48xx).  Compress the resulting .md file (e.g.,
staboot-18-Apr-2006.md) with gzip, and copy it to /tftpboot/netbsd.gz.

Copy the file
$BUILDDIR/O/sys/arch/i386/stand/pxeboot_com0_19200/pxeboot_ia32_com0.bin
to /tftpboot/pxeboot_ia32_com0.bin, where $BUILDDIR comes from your
.mkstabootrc.

Set up your DHCP server.  I use the attached configuration files
to run a DHCP server on the ethernet interface ex0.

If you change the subnet from 192.168.1/24, be sure to change the
next-server line in dhcpd.pxe to match!  The next-server line is
important.  If you see your Soekris boxing trying to download from
the server 0.0.0.0, something is wrong.

Make sure the TFTP daemon will run.  You may need to uncomment a
line in /etc/inetd.conf (on NetBSD).  Not sure how this works in
Linux....

It is best if your CUWiN nodes always PXE boot, first.  To make
sure they do, you need to boot your node with a serial console
attached, break into the comBIOS monitor with Ctrl-P, and 'set
bootdrive=f0 80 81 ff'.  Not all comBIOS versions support 'set
bootdrive'.  You may need to update your comBIOS to 1.28 (or whatever
is the latest version).  I do this with tip(1) like so, where '>'
indicates the comBIOS prompt, and '~' indicates a tilde-escape in
tip:

> download
~C lsx b4501_128.bin
> flashupdate
> reboot

lsx is the program that sends a file with XModem.  It's in the
lsxrx package in pkgsrc.  I'm sure it's easy to find for Linux or
FreeBSD.  b4501_128.bin is the name of the firmware file I downloaded
from soekris.com.

When you have booted your Soekris node, you need to fix up its
disklabel with 'fixlabel'.  There is presently a bug in fixlabel
where it fails while it prints the old label and partitions table.
You can just delete the offending lines....  I will patch this up
in the CUWiN sources, soon.

After you run fixlabel, you can upgrade the node "in the usual way"
using the upgrade script.  You may have to give the -f flag to
"force" an upgrade.  For example,

	upgrade -f dyoung at 192.168.1.101:upgrade.tgz

When you reboot without the DHCP/TFTP server attached to the
ethernet, you should see your node boot up with your upgrade file.
You can tell whether your node has PXE booted or not by looking at
the output of mount(8).  If /dev/md0a is mounted, you can be fairly
certain you have PXE booted.

Dave
-------------- next part --------------
ddns-update-style none;

authoritative;

include "/etc/dhcpd.ex0";
include "/etc/dhcpd.pxe";
-------------- next part --------------
subnet 192.168.1.0 netmask 255.255.255.0 {
	option routers 192.168.1.101;
	option subnet-mask 255.255.255.0;
	range 192.168.1.1 192.168.1.15;
}
-------------- next part --------------
class "pxe-clients-ia32" {
	match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
	next-server 192.168.1.101;
	filename "pxeboot_ia32_com0_19200.bin";
}

class "netbsd-pxe-clients-ia32" {
	match if substring(option vendor-class-identifier, 0, 19)
	    = "NetBSD:i386:libsa";
	next-server 192.168.1.101;
	filename "tftp:netbsd.gz";
}


More information about the CU-Wireless-Dev mailing list