Does anyone remember Soekris Engineering, the company that made network hardware and somehow also audiophile equipment? The first part of the company has unfortunately closed down in April 2017, while the latter still persists today. However, we won’t be focusing on high-fidelity audio in this guide, but rather on squeezing the last bits of life out of their old products.
Please keep in mind that this series of articles is to be taken more as a guideline than a word-for-word tutorial. This was written for OpenBSD 6.4
A brief history of Soekris
In the early 2000s, if you wanted to build an access point based on Linux (or any *nix), Soekris net- series of boards was the most commonly used and praised choice. In Wireless Hacks (2003) by Rob Flickenger, he describes Soekris boards as a “popular choice among do-it-yourself networkers” and stating that they work well as wireless access points. Unfortunately, as respected as those products were, the sales of them declined, their main competition being Asian products along other European manufacturers like PC Engines, which is still around today. Another nail in the coffin was when AMD stopped producing Elan and Geode line of low-power SoCs and CPUs needed to make the boards, and the once dominant manufacturer finally kicked the bucket, announcing that the remaining stock can be bought from their company in Denmark, Soekris Europe.
The net4526
The boards that I have are 3 AP-oriented net4526 models, indicated by their small footprint and the lack of multiple Ethernet ports. Processing is provided by an AMD Elan SC520 System-on-Chip clocked at either 100 or 133 MHz, paired with 64 MB of onboard SDRAM. Storage is sparse at most, varying from 16 to 128 MB soldered CF, with my boards having 64MB. Expansion-wise, the boards I have have 2 miniPCI slots, a few GPIO pins, and that’s about it. Networking is provided by the onboard 10/100 Mbit Ethernet card. Like the Cisco IDS I featured in my last article, they don’t have no user interface except for the serial console clocked at 19200 baud, with a surprisingly capable and customizable BIOS that supports VGA redirection. Power can be provided either via PoE (Power over Ethernet) or through a standard barrel jack with a wide voltage range accepting from 11 to 56 volts.
The cluster
So, now that we know what these green boxes have to offer, let’s talk about what we’ll do with them! The idea is to run them diskless, booting from PXE and using a network-attached NFS filesystem with OpenBSD. To do that, we need a DHCP, TFTP, Bootparam server, a router, a NAS, but what if we combine them into a single machine running OpenBSD? It’s definitely possible, and I will show you how.
The cluster master will be *drum roll* the Cisco IDS from the previous article. It’s got a more-than sufficient hard drive and 6 network interfaces which are more than enough considering that we need only two. One is connected to my home LAN with access to the internet, and the other connected to the Soekris boards, named Earth, Wind and Fire after everybody’s favorite band. The network topology is simple and looks like this:
The repurposed IDS acts in this case as a router, DNS server and stateful firewall, but also as all the servers needed to provide diskless booting to the three boards. This versatility is why I love OpenBSD so much.
Gathering MAC adresses (also, PXE 101)
If you’ve read the diskless(8) man page of OpenBSD, you know that the first step in the diskless boot process is handled by the network card’s Preboot eXecution Environment, commonly known as PXE. When PXE starts, it asks the local DHCP server for a lease. Hopefully, if everything is right, the server replies with an IP address lease containing a filename and an IP adress of a TFTP server on the local network containing the mentioned filename. The card downloads the file pointed to by the DHCP server and executes it.
Ergo, for the PXE boot to work correctly, we need a DHCP server which can distiguish between individual clients using their MAC address, and a TFTP server which will serve them the initial boot files.
Time to dig into the hardware! As usual when dealing with serial consoles, we need an adapter. My motherboard already has onboard serial, so I connect it to that and fire up a terminal emulator at 19200 baud (could also be a different baudrate, depends), then connect it to the first Soekris and turn the power on.
POST: 0123456789bcefghipajklnopq,,,tvwxy comBIOS ver. 1.28 20050527 Copyright (C) 2000-2005 Soekris Engineering. net45xx 0064 Mbyte Memory CPU 80486 133 Mhz Slot Vend Dev ClassRev Cmd Stat CL LT HT Base1 Base2 Int ------------------------------------------------------------------- 0:00:0 1022 3000 06000000 0006 2280 00 00 00 00000000 00000000 0:18:0 100B 0020 02000000 0107 0290 00 3F 00 0000E001 A0000000 10 3 Seconds to automatic boot. Press Ctrl-P for entering Monitor. Hit CTRL-P here comBIOS Monitor. Press ? for help. > ? comBIOS Monitor Commands boot [drive][:partition] INT19 Boot reboot cold boot download download a file using XMODEM/CRC flashupdate update flash BIOS with downloaded file time [HH:MM:SS] show or set time date [YYYY/MM/DD] show or set date d[b|w|d] [adr] dump memory bytes/words/dwords e[b|w|d] adr value [...] enter bytes/words/dwords i[b|w|d] port input from 8/16/32-bit port o[b|w|d] port value output to 8/16/32-bit port run adr execute code at adr cmosread [adr] read CMOS RAM data cmoswrite adr byte [...] write CMOS RAM data cmoschecksum update CMOS RAM Checksum set parameter=value set system parameter to value show [parameter] show one or all system parameters ?/help show this help > show ConSpeed = 19200 ConLock = Enabled ConMute = Disabled BIOSentry = Enabled PCIROMS = Enabled PXEBoot = Enabled FLASH = Secondary BootDelay = 5 FastBoot = Disabled BootPartition = Disabled BootDrive = 80 81 F0 FF ShowPCI = Enabled Reset = Hard > set pxeboot=enabled > set bootdrive=F0 sets it to boot from the network > show ConSpeed = 19200 ConLock = Enabled ConMute = Disabled BIOSentry = Enabled PCIROMS = Enabled PXEBoot = Enabled FLASH = Secondary BootDelay = 5 FastBoot = Disabled BootPartition = Disabled BootDrive = 00 F0 FF FF ShowPCI = Enabled Reset = Hard >
So, to recap, we need to enter the serial console, and enable PXE then set the bios to boot first from the PXE. Power cycle the machine and wait for the PXE prompt.
comBIOS ver. 1.28 20050527 Copyright (C) 2000-2005 Soekris Engineering. net45xx 0064 Mbyte Memory CPU 80486 133 Mhz Slot Vend Dev ClassRev Cmd Stat CL LT HT Base1 Base2 Int ------------------------------------------------------------------- 0:00:0 1022 3000 06000000 0006 2280 00 00 00 00000000 00000000 0:18:0 100B 0020 02000000 0107 0290 00 3F 00 0000E001 A0000000 10 1 Seconds to automatic boot. Press Ctrl-P for entering Monitor.
00:00:24:C4
NSC DP83815/DP83816 Fast Ethernet UNDI, v1.03
00:00:24:C4
Copyright (C) 2002, 2003 National Semiconductor Corporation All rights reserved. Pre-boot eXecution Environment PXE-2.0 (build 082) Copyright (C) 1997-2000 Intel Corporation CLIENT MAC ADDR: 00 00 24 C4 55 78
The line we are interested in is in bold. Write the address down.
Now we repeat this same procedure for all of the machines we have. At the end, we have 3 MAC addresses, for each machine one.
Earth - 00:00:24:C4:55:78 Wind - 00:00:24:C4:56:18 Fire - 00:00:24:C4:56:14
This concludes part 1 of the outdated cluster. Tune in next time for part two, where we will set up everything needed to get into the bootloader over PXE!
P.S. Happy New Year!
Leave a Reply