Installing FreeBSD 6.2 on a Soekris net5501
Today I installed and configured FreeBSD 6.2 on a Soekris Engineering net5501 (which was purchased by mail order from Yawarra Information Appliances in Victoria, who have been very helpful). It will be functioning as an office firewall/gateway. This particular unit has a 433MHZ AMD Geode Integrated Processor and 256MB of RAM, and most importantly — 4 ethernet interfaces. The operating system is installed on a 1GB CompactFlash card, but it also has a laptop hard-disk interface and if you really want to you can get CF adapters for full sized hard-disks.
I initially intended to use pfSense for this device, but quickly ran in to problems. pfSense only supports a single PPPoE connection (on the ‘WAN’ interface), and you can only configure any remaining interfaces (in this case OPT1 and OPT2) as regular ethernet interfaces. This is a problem, as we have two ADSL connections which are both PPP links. m0n0wall, on which pfSense is based also seems to have this limitation.
So I made the decision to install regular ol’ FreeBSD instead. I ran in to numerous problems attempting to install it via serial console (which I won’t go in to in detail here, I may write a rant about this on another day) and ended up deciding instead to set up the system in VMWare, and then burn the image of the VM’s hard-disk to the CompactFlash card and continue from there. These are the steps I took to get a working FreeBSD 6.2 installation on my Soekris net5501:
- Create a VMWare Virtual Machine with 1 processor, 256MB RAM, and an IDE hard disk slightly smaller than the size of your CompactFlash card (I am using a 1GB CF card, I made the disk 0.9GB)
- Mount the FreeBSD install ISO (6.2-RELEASE-i386-disc1.iso) as a CD-ROM drive in VMWare and kick off the FreeBSD install by booting the machine
- Install as normal but choose the “Minimal” installation set. Chances are you are working with limited space and the minimal installation has everything you need to get a working system. No source files/man pages/other junk. Do NOT install the ports collection. Ports are massive and you probably don’t have enough RAM or disk space to compile stuff anyway. When you are setting up the disklabel (partitions) do NOT add a swap partition. It will give you some warnings but just ignore these and everything will be fine. If you want to build a custom kernel, you might want to enable NFS client at this stage to make it easier to install your new kernel from the build machine later.
- When FreeBSD installation is complete, unmount the FreeBSD install CD ISO image in VMWare and reboot the VM.
- When the FreeBSD system has rebooted, you’ll need to change some system parameters to reflect the hardware differences between your Soekris net5501 and your VMWare virtual machine. The most important differences are the network interfaces (lnc* in VMWare, vr* on the net5501), and the fact that the net5501 has no VGA or keyboard interfaces.
- Update your /etc/rc.conf to reflect the required network configuration on the target net5501, ie:
ifconfig_vr0="inet 192.168.69.1 netmask 255.255.255.0"
(repeat for each interface vr0, vr1, vr2, vr3 as required) - Edit /boot/loader.conf and /boot.config to enable the serial console (so you can access the system through the serial console via null modem cable)
/boot/loader.conf:
comconsole_speed="19200"
console="comconsole"
/boot.config:
/boot/loader -h - The system should now be ready to move on to your net5501 box. Shut down the virtual machine with the halt command and power it off.
- Using another VMWare virtual machine running FreeBSD, add an extra hard disk and use the disk file you just created for your net5501 VM
- Boot the alternate virtual machine and as root, and create an image of this disk (most likely ad1) using dd
dd if=/dev/ad1 of=/tmp/net5501.img
(change /tmp/ to whatever directory you want to dump the image to) - scp or otherwise transfer the image file to your desktop PC or other machine with a CompactFlash card reader/writer
- Use dd to write the image to the CompactFlash card (in my case, using my Sony DSLR-A100 digital camera as a CF adapter located at /dev/sdb)
dd if=/tmp/net5501.img of=/dev/sdb - Insert the CF card in to your net5501 and fire it up! It should work.
Disclaimer: I wrote these instructions a couple of hours after I actually did it, so while I think they’re pretty much correct, I might have omitted something. I haven’t had any caffeinated beverages for about 2 days and I have a headache so it’s not that unlikely.
Here’s a picture of the net5501 in it’s standard case as supplied by Soekris, sitting nestled amongst the mess in our comm’s rack:

Output from dmesg:
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-RELEASE-p7 #1: Fri Aug 17 17:25:17 WST 2007
wg@**********:/usr/obj/usr/src/sys/NET5501
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Geode(TM) Integrated Processor by AMD PCS (433.25-MHz 586-class CPU)
Origin = "AuthenticAMD" Id = 0x5a2 Stepping = 2
Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
AMD Features=0xc0400000<MMX+,3DNow+,3DNow>
real memory = 268435456 (256 MB)
avail memory = 257466368 (245 MB)
K6-family MTRR support enabled (2 registers)
kbd1 at kbdmux0
cpu0 on motherboard
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no driver attached)
vr0: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe100-0xe1ff mem 0xa0004000-0xa00040ff irq 11 at device 6.0 on pci0
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:00:24:c8:**:**
vr1: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe200-0xe2ff mem 0xa0004100-0xa00041ff irq 5 at device 7.0 on pci0
miibus1: <MII bus> on vr1
ukphy1: <Generic IEEE 802.3u media interface> on miibus1
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr1: Ethernet address: 00:00:24:c8:**:**
vr2: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe300-0xe3ff mem 0xa0004200-0xa00042ff irq 9 at device 8.0 on pci0
miibus2: <MII bus> on vr2
ukphy2: <Generic IEEE 802.3u media interface> on miibus2
ukphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr2: Ethernet address: 00:00:24:c8:**:**
vr3: <VIA VT6105M Rhine III 10/100BaseTX> port 0xe400-0xe4ff mem 0xa0004300-0xa00043ff irq 12 at device 9.0 on pci0
miibus3: <MII bus> on vr3
ukphy3: <Generic IEEE 802.3u media interface> on miibus3
ukphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr3: Ethernet address: 00:00:24:c8:**:**
isab0: <PCI-ISA bridge> at device 20.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <GENERIC ATA controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe000-0xe00f at device 20.2 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
ohci0: <OHCI (generic) USB controller> mem 0xa0005000-0xa0005fff irq 15 at device 20.4 on pci0
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xa0006000-0xa0006fff irq 15 at device 20.5 on pci0
pre-2.0 USB rev
device_attach: ehci0 attach returned 6
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc8000-0xd27ff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A, console
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
Timecounter "TSC" frequency 433250922 Hz quality 800
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding enabled, default to deny, logging disabled
ad0: 977MB <SanDisk SDCFB-1024 HDX 4.04> at ata0-master WDMA2
Trying to mount root from ufs:/dev/ad0s1a
Page modified 171 weeks ago



