[[...]]
I have kept two copies of OpenBSD on my laptop for a long time (going
back to 2.8, I think). I've described my scheme in this list several
times, eg <http://archives.neohapsis.com/archives/openbsd/2005-05/1384.html>.
Basically I keep a single fdisk partition containing the entire disk,
but two sets of OpenBSD root, usr, and now var partitions inside that,
both sharing /home and /data (where I keep my user files):
wd0a root fstab mounts root, usr, var, home, data
wd0b swap
wd0c entire disk
wd0d root2 fstab mounts root2, usr2, var2, home, data
wd0e var
wd0f var2
wd0g usr
wd0h usr2
wd0j home
wd0k data
I use the standard OpenBSD bootloader; typing "boot wd0a:/bsd"
(or just doing nothing and waiting for the 5 second default timeout)
boots the wd0[aeg] set of partitions, while "boot wd0d:/bsd" boots
the wd0[dfh] partitions.
I normally boot & run from the wd0[aeg] partitions; currently these
contain OpenBSD 4.3-release, while wd0[dfh] contain 4.2-stable. When
I do an OS upgrade or reinstall, I only do one of the two sets of
partitions, leaving the other unchanged as a backup. For example,
prior to a few weeks ago, both partition sets contained 4.2-stable;
when I was ready to install 4.3-release I first copied (dump|restore
and then running installboot on the wd0d /boot) the wd0[aeg] partitions
to the wd0[dfh] partitions, and verified that I could boot & run
normally from the wd0[dfh] partitions. (In fact, as a test I ran
from them for 5 days or so before finally doing the 4.3-release
install.) This way if anything had gone wrong with the 4.3-release
install (nothing did), I could have aborted and rebooted from the
wd0[dfh] ones and (still) had a working computer.
More generally, this system gives considerable insurance against
"corrupted root partition -- computer won't even boot single-user"
problems, because by booting from the other set of partitions (e.g.
typing "boot wd0d:/bsd" at the OpenBSD "boot> " bootloader prompt),
I have a full OS available to help fix the problem. Having man pages,
X, web browsers, etc, is really nice when debugging!
This system has saved my neck in the past. Notably the move from
XFree86 to X.org in 4.1 was a disaster for me: X.Org didn't grok my
(then) laptop's video board, so I couldn't configure X. I "solved"
the problem by reverting to my 2nd set of partitions and staying at
4.0 for another 6 months, then finally persuading my employer to get
me a new laptop (which X.org grokked).
ciao,
--
-- From: "Jonathan Thornburg [remove -animal to reply]" <J.Thornburg@soton.ac-zebra.uk>
School of Mathematics, U of Southampton, England
"Open source code is not guaranteed nor does it come with a warranty."
-- the Alexis de Tocqueville Institute
"I guess that's in contrast to proprietary software, which comes with
a money-back guarantee, and free on-site repairs if any bugs are
found." -- Rary