21 6 / 2010
OpenBSD, bad sectors
Had some fun on the command line this morning, just wanted to drop a note say how glad I am for command line kung fu. The hiccup started when I plugged in one of my Soekris OpenBSD firewalls that I needed to change the hostname on. It gave me a disk error on bootup. Fortunately, I was viewing it over the console, instead of SSH’ing in. The actual message said.
One or more disk properties is wrong! Help!
That was certainly encouraging. It asked for the path to the shell or enter for default. Fortunately, I know where bash was located, having made a point to install it (not that I hate ksh or anything).
/bin/bash
If I had dropped to the default sh, I would not have been able to run:
fsck
Which checked my disk, found the errors and auto suggested the actual values. How excellent is that? I just had to hit ‘y’ a few times and reboot. Of course, fsck is a powerful tool that can do a number of things, but in this case, I just had to know that it does error checking on my disk. Didn’t even need to run any options! How is that for a fun morning?