Installing FreeBSD on a Soekris 4801 using Mac OS X as host
I was looking into the possibilities of creating a highly customized router setup for a private client when atoth from the MacHackers mailing list nudged me unto soekris - "a small company specializing in the design of embedded computer and communication devices" (according to their website.)
The 4801
model I opted for is basically a low-power 586-compatible mini-computer
approximately the size of.. uhm... say, a VHS-Tape (you remember those,
don't you?). To say that this machine is fanless is an understatement:
its 266 MHz Geode-CPU doesn't even have cooling fins! Noteworthy: this machine runs FreeBSD's GENERIC kernel just fine, no need to cross-compile (of course, it never hurts to compile your own flavour, David for instance has reduced the kernel well under three megabytes...)
Anyway, since these machines doen't have a video-card or keyboard connector or floppy or optical drive you can either install your OS of choice onto a CF-card using another x86 compatible computer and then pop it into the soekris and boot it up (boring!) or boot it via PXE and do a network install ;-)
This approach is described rather thoroughly by David Courtney, however, he is using an existing FreeBSD machine as host. While I could have simply followed his instructions at home with my old PC-Boxen, I instead opted to take the soekris and my powerbook to the club and get it up and running in geek-company. Herewith follow the notes describing the differences to David's approach.
install a usb-serial adapter, i.e. from Keyspan (Thanks, Denis for lending it to me!)
download ZTerm
set up DHCP
configure tftp
Setting up DHCP
download isc-dhcpd and install it:
./configure ; make ; sudo make installedit
/etc/dhcpd.confso that it looks like this:allow booting;
allow bootp;
option domain-name "somedomain.com";
option domain-name-servers 192.168.1.1 ;
option routers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
}
host soekris {
hardware ethernet 00:00:xx:xx:xx:xx;
fixed-address 192.168.1.4;
next-server 192.168.1.1;
option root-path "/private/tftpboot";
filename "/boot/pxeboot";
}sudo touch /var/db/dhcpd.leasessudo /usr/sbin/dhcpd
Note: This setup is 'safe', as it only provides an
IP to the soekris machine, i.e. it can use an existing router to
install FreeBSD via FTP. You will, of course, need to adjust the
settings to your existing network. Also note the different path to tftpboot from David's description!
setting up tftp on Mac OS X
tftp is built-in - but we we need to configure it! The key to doing this is to edit /System/Library/LaunchDaemons/tftp.plist so that it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>InitGroups</key>
<true/>
<key>Label</key>
<string>com.apple.tftpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/tftpd</string>
<string>-u</string>
<string>root</string>
<string>-s</string>
<string>/private/tftpboot</string>
<string>-l</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>tftp</string>
<key>SockType</key>
<string>dgram</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<true/>
</dict>
</dict>
</plist>
In essence, we're telling it to run as root (rather than the default nobody) so that we can chroot (-s). The main difference here is that Mac OS X Tiger doesn't use inetd or xinetd but rather launchd. The above XML simply corresponds to David's line in inetd.conf. Start tftp using launchd thus: sudo service tftp start. (Don't forget to shut it down when you're finished!)
That's it - everything else works just as described in the tutorial.
