> It strikes me that this is also in part a LILO 'problem'. We could
>use some way to tell LILO to only boot a given image _once_ as the
>default, and thence reboot to the normal default. Combine this with any
>of the methods for remote reboot (hardware watchdog, other machine wired
>to reset, whatever) and you can easily recover from a futzed new kernel.
> I'm sure LILO can find room for a single byte 'flag' for such things
>and an extra per-config option in /etc/lilo.conf.
Erm, this *IS* possible.
excerpt from `man lilo`:
--- /sbin/lilo -R - set default command line for next reboot-R command line This option sets the default command for the boot loader the next time it executes. The boot loader will then erase this line: this is a once-only command. It is typically used in reboot scripts, just before calling shutdown -r'.
---/etc/lilo.conf:
image = /vmlinuz-stable label = Stable_Kernel root = /dev/hda1 read-only
image = /vmlinuz-test label = Test_Kernel root = /dev/hda1 read-only
---test_kernel.sh:
#!/bin/sh
lilo -R 'default=Test_Kernel' && reboot
---------------------
Normally, LILO will boot the first image listed (in this case, the Stable_Kernel) by default. However, running 'test_kernel.sh' will -- for one time only -- make the default kernel be the Test_Kernel.
The only thing left is to make the kernel (or, if something goes wrong there, userspace) reboot if something isn't working okay.
-- Stevie-OReal programmers use COPY CON PROGRAM.EXE
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/