I use a tool called Bowlfish to build OpenBSD images which run with the drives mounted read-only. This lets me use cheap Compact Flash or USB drives in a Soekris single board computer instead of a real disc or a more expensive SSD.
Bowlfish has been a lifesaver and has worked perfectly for years. The current version, however, didn’t. I was shocked. Then I fixed it!
It failed with:
Failed to build new filesystem.
Luckily, the “install” script is just that, a shell script, and I could add debugging statements and figure it out.
The error is caused by running disklabel incorrectly. On line 181 of the install script, there’s an echo statement that builds the commands to feed disklabel. There’s a “63″ and the end of it. Either change it to “64″ or delete the “63″ digits entirely.
It is specifying the starting space on a partition, and 63 is too low for my systems. Had to be 64, which was the default.
How do I know this? I copied those two lines to an “echo’ statement, and ran the script. I then ran disklabel manually to see what the error was, and how to fix it.
Once it was fixed, BowlFish created a working OpenBSD boot disc perfectly. (It did this even though it was running in a VM on my Mac and writing to a USB drive on a hub plugged into the Mac. Worked perfectly when I plugged it into the Soekris! Amazing.)
Hope it helps someone, even if it’s just me finding it later.
Tags: OpenBSD BowlFish