Wednesday, June 23, 2004

Soekris-based FreeBSD System Operational

I'd like to report successful use of FreeBSD 5.2.1 RELEASE on the same Soekris Net4801 on which I previously installed OpenBSD. I followed the same methodology: install FreeBSD on a spare HDD on my laptop, then move the HDD to the Soekris.

To send console messages to the serial line during the boot sequence, I followed the FreeBSD Handbook's advice:

echo -h > /boot.config

I tried to edit /etc/ttys to enable 19200 speed for ttyd0, but this did not work as I hoped. It seems the Soekris sends output to the serial line at 19200 prior to the FreeBSD boot sequence. Then, despite my attempted settings of 19200 in /etc/ttys, the FreeBSD boot sequence sends output at 9200. Accordingly, my /etc/ttys file has this entry to enable the serial console:

ttyd0 "/usr/libexec/getty std.9600" cons25 on secure

Notice the use of cons25. This lets me use vi properly, for example. I think the kernel must be recompiled to support speeds higher than 9600, as suggested by this section from the FreeBSD Handbook:

18.6.5.1 Setting a Faster Serial Port Speed

"By default, the serial port settings are: 9600 baud, 8 bits, no parity, and 1 stop bit. If you wish to change the speed, you need to recompile at least the boot blocks. Add the following line to /etc/make.conf and compile new boot blocks:

BOOT_COMCONSOLE_SPEED=19200

If the serial console is configured in some other way than by booting with -h, or if the serial console used by the kernel is different from the one used by the boot blocks, then you must also add the following option to the kernel configuration file and compile a new kernel:

options CONSPEED=19200


There is a sysctl variable, machdep.conspeed, which is set to 9600 by default. If changed to 19200 in /etc/sysctl.conf, the system will be available at 19200 once booted:

machdep.conspeed=19200

To set the speed by hand, issue this command:

sysctl machdep.conspeed=19200

FreeBSD sees the three NICs as sis devices, as does OpenBSD. Unlike OpenBSD, however, FreeBSD recognizes my Linksys USB200M 10/100 NIC, adding a fourth Ethernet interface if needed:

axe0: Linksys product 0x2226, rev 2.00/0.01, addr 2
axe0: Ethernet address: 00:10:60:25:a4:1a
miibus3: on axe0
rlphy0: on miibus3
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

axe0: flags=8802 mtu 1500
ether 00:10:60:25:a4:1a
media: Ethernet autoselect (none)
status: no carrier

Multiple helpful pages discuss FreeBSD on the Soekris:

wiki.wirelessleiden.nl
www.rfc1149.net
www.xinu.nl
www.webweaving.org

No comments: