[syslinux] online updates

Rance Hall ranceh at gmail.com
Wed Apr 14 12:48:37 PDT 2010


On Wed, Apr 14, 2010 at 1:22 PM, Lee Thalblum
<LThalblum-consultant at cleverdevices.com> wrote:
> Hi. I'm looking for ideas or suggestions for field updates for an embedded system running linux with syslinux as the bootloader. The requirements are to be able to upload an image online (probably a private network using sftp) while the device is running, do some error checking on the new image and then reboot the device and run the new version. I'll be running off a CF card. The image is likely to be over 1G, and I only have 512M of RAM, which means I'll have to load the image into flash and run it from flash. I'm assuming I'll set a bit somewhere in upper flash space to tell which image to boot from.
>
> I know syslinux will allow booting multiple OSs. Is there any way I can configure things to do what I'm trying to do? Or come close? Thanks.
>
> Lee
>

I saw something similar to this once, but im not convinced it will
work for you.  I remember cf cards having a max write limit but im not
sure about the current state of cf card affairs.


Anyway, This is how I saw this done:

The hard drive was configured to run the grub boot loader.  There were
two grub configuration files.  Normal boot, and reimage boot.  a copy
of normal boot was copied to grubs config location and name.

a script ran in the backround of the normal boot process looking for a
new image to load.  If it found a new image it did the sanity
checking, switched the two grub config files so that the next boot it
would boot from the network and run the reimage procedure.

The reimage process took care of restoring the normal grub.conf file
and when it was done it scheduled another reboot.

I thought this was really intelligent and relatively maintenance free.
 The only issue is when the location of the image on the network
moves.  all the scripts had to be redone.

What we did for this transition is that we created a dummy image that
had updated scripts.  and put the real new image in its new home.  the
next update cycle forced two updates per device, but it worked.

Maybe something like this would help you.




More information about the Syslinux mailing list