[syslinux] fwrite?

Gert Hulselmans gerth at zytor.com
Mon Aug 1 11:05:21 PDT 2011


Bryan.James.Krone-EXT at jci.com wrote:
> Is there a mechanism already in Syslinux that would count the number of
> reboot of an OS? I'm working with an embedded OS and I would like to
> reboot into another OS if the original fails to boot more than 10 times.
>
> Thanks for responding to my earlier question.
>

Yes, there is a mechanism.

With the Syslinux/Extlinux installer, you can set the --once option to the
label, you only want to boot once (testing a new kernel).
Next boot, the default label is booted.

The following commands write the the ADV area of Syslinux:
  --once=...   -o  Execute a command once upon boot
  --clear-once -O  Clear the boot-once command
  --reset-adv      Reset auxilliary data
  --menu-save= -M  Set the label to select as default on the next boot

It should be relatively easy to modify Syslinux so it supports the
counting, you need. Instead of only counting once.

- Gert Hulselmans




More information about the Syslinux mailing list