[syslinux] Syslinux/Extlinux chain : Unexpected change of Extlinux configuration folder after reboot

Ady ady-sf at hotmail.com
Tue Oct 20 10:08:15 PDT 2015


> Hello,
> 
> We are experiencing a strange behaviour on an embedded system (i386 PC board).
> 
> The structure of our disk is the following one :
> - A 2GB fat16 partition with DOS and syslinux
> - A 100GB Ext4 partition with Extlinux an several linux images to boot on ram
> - A swap partition
> 
> The system boot on syslinux to choose among Dos and Linux boot using chain.
> When Linux is chosen, syslinux chains to the boot sector of the Ext4 partition (chain hd0 2)
> 
> The Ext4 partition contains several folders each containing a linux ramdisk image, a kernel and his own extlinux configuration (ldlinux.sys, syslinux.cfg).
> 
> We use the following command to change the linux kernel and image to use at the next boot : extlinux -i /Path_to_the_configuration_folder_of_linux_image_to_launch
> 
> After calling extlinux -i, the first next reboot use the good kernel and image.
> But all the following reboot (without call to extlinux -i), roll back to the previous linux image (the one used before the previous call to extlinux -i).
> 
> I'have check the boot sector content of the Ext4 partition. The pointers (found with offset computed with sect1ptr0, sect1ptr1)  to the extlinux configuration change between reboot without calling extlinux.
> 
> I have backup the Ext4 partition boot sector between each reboot with this command:
> dd if=/dev/sda2 of=$VERSION_DIR/boot/syslinux/bootsector.bak ibs=60928 count=1 conv=notrunc
> The file comparison show an unwanted change of the sector address of the configuration folder (at the offset sect1ptr0=11A and sect1ptr1=120)
> 
> If I call again extlinux -i with the wanted configuration folder, as the first time, all the following reboots finally use the wanted linux image.
> 
> How to prevent unwanted change in partition bootsector between reboot ?
> Does syslinux/extlinux bootloader overwrite these values during boot ?
> Is there a bootsector recovery mecanism which restore an old bootsector ?
> 
> 
> Best regards,
> 
> Julien Vilz
> 
> 
> 
> 
 
The following is a question, but I think it could be read as a 
suggestion too.

Instead of using the extlinux command to install a different boot 
sector each time, is there any reason not to use the CONFIG directive?

The CONFIG directive can load a new configuration file while changing 
the Working Directory at the same time.

 http://www.syslinux.org/wiki/index.php/Config#CONFIG 

Which exact version of SYSLINUX / EXTLINUX are you using? Are both VBRs 
(sda1 and sda2) using the same exact version? Is your chain.c32 using 
the same version too?

Regards,
Ady. 
 
> 
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> 




More information about the Syslinux mailing list