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

VILZ, Julien j.vilz at evs.com
Tue Oct 20 09:39:26 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







More information about the Syslinux mailing list