[syslinux] online updates

H. Peter Anvin hpa at zytor.com
Wed Apr 14 15:25:02 PDT 2010


On 04/14/2010 01:54 PM, Lee Thalblum wrote:
> On 04/14/2010 11:22 AM, Lee Thalblum 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.
>>
> 
> Hi there,
> 
> There are multiple ways to do what you want, and it's not entirely clear
> from context which would be the easiest in your situation.
> 
> The simplest way, if you have sufficient flash, is probably to have two
> partitions, one active and one standby, in your flash, and install the
> new image to the standby partition.  After your verification tests pass,
> you can flip the active bit to the formerly-standby partition and reboot.
> 
> 	-hpa
> 
> Thanks Peter,
> I guess my next question is how to tell syslinux which partition to boot from. Is there a way to have syslinux check external information? During a reboot the running image won't be available.
> 

Syslinux always boots inside a partition.  The partition is invoked by
the Master Boot Record (MBR), which in turn selects which partition to
boot by which partition has the active flag set.  See for example the
fdisk command for setting the active flag.

	-hpa




More information about the Syslinux mailing list