The OpenBSD system on the $15 Laptop (Compaq Armada 7770dmt) has a 3 GB hard drive mostly devoted to OpenBSD, with about 600 MB set aside for Linux, about 130 MB as Linux swap and the rest an ext2 filesystem on which I have my pup_save file for Puppy Linux and any other Linux files I’ve generated with other live CDs (Wolvix and Slitaz at the moment).
As I recall, I created the Linux partitions at one end of the drive and reserved the front for OpenBSD.
As a result, OpenBSD wrote its disklabel — the system’s guide to how the drive is partitioned — to include one big Linux partition and not the separate swap and ext2 partitions I later created.
Check your disklabel this way (as root) (and with the name of your drive, mine being wd0):
# disklabel wd0
You should see any non-OpenBSD partitions at the end of the list.
You can edit the disklabel this way:
# disklabel -e wd0
This opens a file in vi (the default editor in OpenBSD, or whatever the $Editor variable is set to; I’d reset it to Nano if only I knew how).
I tried to modify the disklabel to recognize BOTH Linux partitions, but all I got were errors in both OpenBSD and when booting Puppy 2.13.
To figure out how to edit the disklabel, I ran the following command in OpenBSD:
# fdisk wd0
I figured that copying the “start” and “size” info into the disklabel would make my Linux partitions mountable in OpenBSD.
Nope.
I got some fsck errors when I booted Puppy. I fixed them by a) deleting and re-creating the Linux swap file and b) running Puppy in RAM (boot parameter: Puppy pfix=ram) and running e2fsck on my ext2 partition.
I still don’t have my Linux filesystem mountable in OpenBSD, but I didn’t lose any files or filesystems either.
Clearly I need to figure out how to take the information from fdisk and properly write it in the disklabel.
I’m just glad (and very much amazed) that I didn’t lose anything. It’s a tribute of sorts to the OpenBSD system and documentation that I managed not to totally kill the whole installation.