1. Preserving an existing OpenBSD partition layout during a re-install

1.1 Description of the problem

1.2 Partitioning at MBR level with 'fdisk' step

1.3 Overriding the suggested partition lay-out

1.4 Summary

1.1 Description of the problem

The OpenBSD 4.6 installation program introduced some nice features, like suggesting a disklabel partition lay-out. But if you have quite some experience in installing previous OpenBSD releases, and intend to keep your own custom lay-out, you may be in for a surprise.

I try to keep the actual partition of the disk as it was before and do a fresh
install, but the snapshots looks like simply do not allow this now.
You can select Custom label and it will show the previous label, but then when
you write it, obviously no changes are present, but when you Quit it, it comes
back to the same question and looks like you can't move on from there.
Good if you want to use the auto label, but if you want to keep the old one,
then what really should be the step then?

The correct steps to be taken will be illustrated in the following capture of an OpenBSD install. We skip the preliminary install steps and join the fun at the 'fdisk' part.

Not wishing to use the proposed auto layout, we press 'c' for a '(C)custom layout'.

Code:

You will now create an OpenBSD disklabel inside the OpenBSD MBR
partition. The disklabel defines how OpenBSD splits up the MBR partition
into OpenBSD partitions in which filesystems and swap space are created.
You must provide each filesystem's mountpoint in this program.

While previously the installer asked for the mount points after the disklabel step, now it is required to to specify these during the partitioning with 'disklabel'.

The shortest command to set the mount point is 'n'. If besides the mount point, you want to modify the file system type as well, the 'm' is the way to go.

If you happen to have a very simple layout with for example only one single 'a' partition for '/' and a swap partition, it is easy to set the mount point. In case of a complex one, having the output of the 'mount' available is a life saver. In my case I had mailed the information to my Gmail account.

You can prevent a partition from being formatted. for example your home partition, if you do not specify the mount point here. But as stated in Murphy's Law, mistakes are easily made, so having a backup is always recommended. Remember that you need at least to specify the "/" mount point for the "a" partition.

After setting the mount points we check our work by printing the partitions. As usual, saving is done with the q command.

Notice the mount points nicely printed as comment at the end of each partition. Without asking any kind of confirmation, the installer now creates the files systems for the partitions for which a mount point has been created.

While previously the installer asked for the mount points after the disklabel step, now it is required to to specify these during the partitioning with 'disklabel'.

Technically, specifying the mount points from within disklabel(8) has always been possible and preferred.. in versions prior to 4.6 the installer would confirm them, this was considered redundant by the developers.