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

Amit Kucheria akucheria at metricsystems.com
Thu Oct 7 14:13:29 PDT 2004


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?
> 
> One scheme that would work is to list the fail-safe system as default in syslinux.cfg, and the normal one with a label. A file on the boot partition (say 'syslinux.ptr') would contain the name of the kernel to invoke and would be deleted by syslinux just before invoking the kernel. The 'normal' kernel would create this file with contents 'normal' during the shutdown procedure. The net effect is that anytime syslinux boots it will invoke the default kernel unless the normal kernel shut down cleanly, or someone created the file manually. (All this would be augmented with a hardware watchdog that resets the board if the system locks up.)
> 
> Thanks for any suggestions,
> 	Thorsten - Santa Barbara Amateur Radio Club

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.

HTH.

ciao,
A
-- 




More information about the Syslinux mailing list