[syslinux] fail-safe boot - how can this be done?

Dag Wieers dag at wieers.com
Sun Oct 10 16:24:34 PDT 2004


On Thu, 7 Oct 2004, Amit Kucheria wrote:

> On Thu, 2004-10-07 at 13:55, Thorsten von Eicken wrote:
> > I'm installing syslinux on an embedded board that will only be 
> > reachable via boat+hike or helicopter. This will be a somewhat 
> > experimental platform, so I can't make a read-only filesystem on CF. 
> > What I'd like is to have two root filesystems on a CF card, one that 
> > is a read-only "fail-safe", and a 2nd that is the "normal" system I 
> > experiment with. What I'm looking for is a fail-safe where anytime the 
> > system does not shut down cleanly the fail-safe boot is invoked. Is 
> > there support for this in syslinux?
> 
> Don't know about syslinux support for this. But Lilo supports an option
> (-R) to specify what image to boot on the next reboot.
> 
> So you boot up with your 'production' kernel and run 'lilo -R
> fail-safe'. Now if your machine reboots uncleanly it will come up with
> the 'fail-safe' kernel.
> 
> In the shutdown sequence you could add another line 'lilo -R
> production'. So if the machine shuts down cleanly, it will come up with
> the 'production' kernel.

You can do the same hardcoded in lilo.conf. Something like:

boot=/dev/hda
root=/dev/hda1
append="panic=5"
...
default=linux

image=/boot/kernel-2.4.21-20.EL
	fallback=2.4.21-15
	label=2.4.21-20
	alias=linux

image=/boot/kernel-2.4.21-15.EL
	fallback=2.4.21-9.0.4
	label=2.4.21-15

image=/boot/kernel-2.4.21-9.0.4.EL
	label=2.4.21-9.0.4

In this case, if you get a kernel panic, it will reboot after 5 seconds. 
And in that case your system will boot the fallback kernel. We've used 
this with great success where new kernels are remotely tested and in case 
of failure previous kernels are used.

Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]




More information about the Syslinux mailing list