On Fri, Apr 02, 2010 at 03:21:30PM +0200, Toni Mueller wrote:
| Hi,
|
| On Fri, 02.04.2010 at 06:50:00 -0500, Chris Bennett
<[email protected]> wrote:
| > If you are talking about an upgrade then
| > cp bsd bsd.backup before install should do it.
| > Then use boot> boot /bsd.backup after a failed upgrade.
|
| I thought about the case where the new kernel won't boot and I don't
| have a console and power switch to reboot the machine and/or select a
| different kernel. It would be nice if I could say something like (in
| grub) "fallback /bsd.backup".
|
| As I said, this is only relevant if I'm working remotely.
What do you mean "the new kernel won't boot" ?
If the kernel image is there, it will be loaded by the bootloader. If
it's garbage, then that's what you get: garbage. If the kernel is not
there, the bootloader will automagically try /bsd. So if you have 'set
image mybsd' in your /etc/boot.conf (which is frowned upon, mind you;
certain things assume that your kernel is always /bsd) and /mybsd is
not found, the bootloader will boot /bsd next. If that's not found
either, the bootloader will cancel the timeout and wait for your input
on the console.
I'm thinking your talking about the first case, your new kernel "won't
boot" means that the kernel image (/bsd) exists but it panics /
crashes / calls your mom / does other fun stuff.
How would the fallback solution work ? I can only think of a solution
where the bootloader and userland interact somehow. The bootloader
sets a flag on the kernel it tries to boot which is cleared by
userland after a succesful boot. If the bootloader starts again and
sees the flag set, it knows the previous boot failed and the fallback
kernel should be loaded.
May seem like a nice idea at first, but it doesn't sound very portable
to me. The boot.conf stuff is platform specific - a workaround for
broken bioses. sparc64 machines, for example, just read the kernel
image name from their boot configuration and load that, no boot.conf
needed at all.
Cheers,
Paul 'WEiRD' de Weerd
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/