Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2011 17:42:39 +0000
From:      "Dieter BSD" <dieterbsd@engineer.com>
To:        hackers@freebsd.org
Subject:   Re: Active slice, only for a next boot
Message-ID:  <20110530174243.95200@gmx.com>

next in thread | raw e-mail | index | archive | help
>> I have i.e; 3 slices, of which first is active.
>> Now I wana set slice 2 active, but only for a one/next boot.
>> Once slice 2 is booted and system is shutdown or rebooted,
>> once again, first slice is active and booted, without user's intervention.

I think that setting the active slice is the wrong approach.
Because then whatever OS you boot must then somehow know to
automagically change the active slice back to the default.

A better approach is to be able to boot whatever slice you
want without having to change the active slice.

NetBSD can do this.  The MBR puts up a menu of the bootable
slices on the disk being booted.  You can allow the timer
to time out and boot the default.  Or you can enter the number
of the slice you want to boot.  Or you can type a function key
F1 F2 ... to boot a different disk, and it will load the MBR
from that disk and run it.  There is an alternative for keyboards
without function keys.

And it works great.  Except that one of the 27 stages of boot
code that FreeBSD uses INSISTS on booting the active slice,
so you can tell the MBR to boot slice 3 and slice 3's boot
code sees that slice 4 is active and boots slice 4.

My ugly workaround is to have my backup FreeBSD slice on
a different disk.  The better solution would be to fix
FreeBSD's boot code so that it boots the slice it is in
rather than insisting on booting the active slice.  And
import the NetBSD boot selector MBR.

> Anyone has any idea, for a case of a remote server,
> which is accessible over ssh, only when it is "up"?

Remote access only when the system is up will bite you,
sooner or later.  The classic formula is:

RS-232 console + hardware modem + POTS = remote console



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110530174243.95200>