Discussion:
changing active slice at boot
Frans Haarman
2007-11-06 14:05:50 UTC
Permalink
Just wondering.......

Has anyone ever thought of having 2 openbsd installations to boot from ?
This way I could upgrade the installation on one slice/disk and boot from it!

Then if the kernel would crash/reboot the other slice would be used for booting.

So at boot time the active slice is changed, after booting its changed back
if there are no troubles!


Perhaps this is an ugly work around to most, but it might save my life when a
system refuses to boot the active slice...... Most of this can be
prevented with
remote consoles or ILO stuff I guess! What do you think ? FUD ? ;)
Joshua Smith
2007-11-06 14:20:45 UTC
Permalink
man 8 daily
etc/daily
This script is run daily. It currently does the following:
...
Creates a backup root file system which is updated daily. This only
happens if the following conditions are met:

1. The environment variable ROOTBACKUP must be set. For ex-
ample, the following can be added to root's crontab(5):

ROOTBACKUP=1

2. The mount directory /altroot must exist, and there must be
an /etc/fstab entry specifying `xx' for the mount options,
e.g.

/dev/wd0j /altroot ffs xx 0 0
...
Thanks,
Josh
Post by Frans Haarman
Just wondering.......
Has anyone ever thought of having 2 openbsd installations to boot from ?
This way I could upgrade the installation on one slice/disk and boot from it!
Then if the kernel would crash/reboot the other slice would be used for booting.
So at boot time the active slice is changed, after booting its changed back
if there are no troubles!
Perhaps this is an ugly work around to most, but it might save my life when a
system refuses to boot the active slice...... Most of this can be
prevented with
remote consoles or ILO stuff I guess! What do you think ? FUD ? ;)
Woodchuck
2007-11-06 17:20:06 UTC
Permalink
Post by Frans Haarman
Just wondering.......
Has anyone ever thought of having 2 openbsd installations to boot from ?
This way I could upgrade the installation on one slice/disk and boot from it!
"slice" is FreeBSD talk. I assume you mean "disk partition", the thing
manipulated by fdisk.
Post by Frans Haarman
Then if the kernel would crash/reboot the other slice would be used for booting.
So at boot time the active slice is changed, after booting its changed back
if there are no troubles!
Perhaps this is an ugly work around to most, but it might save my life when a
system refuses to boot the active slice...... Most of this can be
prevented with
remote consoles or ILO stuff I guess! What do you think ? FUD ? ;)
OpenBSD's boot loader won't do this... but GRUB and LiLO will. But
we do not need to turn to the penguin for this.

A "rescue floppy" or any recent OpenBSD installation cd will do it,
too. You choose that third option from "upgrade, install, shell".
You get a shell, you then run fdisk to change the active partition, then
reboot. Presto, change-oed.

If the "bad" partition just has a bad kernel, then you will have been
wise to have the bsd.rd kernel happily awaiting you, you can boot it
from the boot> prompt, run fdisk, etc etc. If you are having "version
trouble" recall that bsd.rd need not be the latest and greatest to
be used for "rescue".

Dave
--
You don't have to like businessmen to like capitalism.
Continue reading on narkive:
Loading...