Booting nanoBSD on the Alix2c2 SBC

A friend and I recently purchased a couple of Alix2c2 SBCs from PC Engines with the intention of running FreeBSDs nanoBSD on them.

However, getting nanoBSD to boot on the Alix board turned out to require a few customizations which I will post here in the hope of saving others the trouble.

The Alix2c2 reports the following at boot time for the noname 1GB CF card from PC Engines:

PC Engines ALIX.2 v0.99
640 KB Base Memory
261120 KB Extended Memory

01F0 Master 044A CF 1GB                                  
Phys C/H/S 1966/16/63 Log C/H/S 983/32/63

Running diskinfo(8) on the CF in an USB CF card reader on another FreeBSD machine revealed the capacity of the card:

$ diskinfo /dev/da0
/dev/da0        512     1014644736      1981728 967     64      32

Gettng nanoBSD to boot on the Alix2c from the 1GB CF card required the following customizations to the nanoBSD configuration file:

# Drive geometry
NANO_DRIVE=ad0
NANO_MEDIASIZE=`expr 1014644736 / 512` # size from diskinfo(8) on the UBS CF card reader
NANO_HEADS=32 # heads from the logic CHS information at boot time
NANO_SECTS=63 # sects from the logic CHS information at boot time

# Boot loader
NANO_BOOT0CFG="-o nopacket -s 1 -m 3" # nopacket seems to be required by tinyBIOS

Before booting nanoBSD, hit ‘s’ on the Alix2c2 serial console during RAM testing and switch the BIOS to LBA mode and 9600 baud serial console (default is 38400 baud, but this wont work with boot0sio). Re-attach to the serial console with 9600 baud and reboot to verify the setup.

Leave a Reply

Your email address will not be published. Required fields are marked *