Icon Rufen Sie uns an
+49 441.309197-69 +49 441.309197-69

New rescue system for bytemine openbsd appliance

Posted by David Zurborg on Thursday, December 02, 2010

My name is David, I’m working for bytemine since June 2010 and the last few months I’ve been working on an improved version of the bytemine openbsd appliance (a.k.a. boa) rescue system.

First of all, there already is a rescue system. If the boa won’t boot no longer normally, a rescue system can be started by interrupting the boot loader. The rescue system is a small openbsd environment residing in its own partition and will be loaded into a ramdisk. Afterwards you can load the network configuration from root disk, apply it and start a ssh server. If the root disk cannot be mounted, manual network setup may be done. But this all has to be done over a serial connection, which may not be available at remote hands in your data center.

So the challenge was to improve the rescue system by using the lc-display with the four keys at the front panel of the boa, without needing a serial link. After booting the rescue system a small menu is presented on the display, and the user may use one of the following programms to get the box back up:

Rescue system via display

This programm is the lc-display-using version of the rescue script which can be used without a serial console. The user will be asked to mount the root disk and use the network configuration from this disk. If this fails, the DHCP option is offered for each ethernet port. After network configuration the ssh server can be started, allowing users to connect to the box using ssh, so no serial link is needed at all.

Discovering a configuration via DHCP

… got it!

Backup the CompactFlash card – and restore it.

So, the boa won’t boot no longer and it seams the operating system needs to be fixed. What to do now? Picking a screwdriver, disassembly the boa from the rack, open the box, remove the CF card, fix the CF card on another host, re-insert the CF into the box and reassembly it into the rack. The improved rescue system has an option to copy the whole CF card to an external medium – like an USB mass storage. Just a medium a bit bigger than the CF card is needed. On the front panel are two USB ports. Plug in the USB stick and select the CF-Backup routine in the menu on the lc-display.

Using one of the USB ports…

… to create a full backup of the internal CF card

The other way is also possible: the CF card can be overwritten with the content of the external medium. For all this, no serial console, no ssh link and not even network is needed. All stuff can be done without additional tools or cables, except the external storage. Just select CF-Backup on the display and the CF is on the external device.

Simple and functional

While the lc-display has limited capabilities the improved rescue system is quite simple. The one left application is printing some information like a list of assigned ip-adresses or the configuration of the serial console (speed, parity, stop-bits). The goal was to provide basic functionality directly at the box, but not be be a full replacement of the serial console. These new features will help admins who need a quick way to enable a rescue console usable with ssh link or just copy the CF card when time is expensive.

The rescue system tells us, that the ssh server is up and running