VILZ, Julien
2015-Oct-20 16:39 UTC
[syslinux] Syslinux/Extlinux chain : Unexpected change of Extlinux configuration folder after reboot
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
Ady
2015-Oct-20 17:08 UTC
[syslinux] Syslinux/Extlinux chain : Unexpected change of Extlinux configuration folder after reboot
> 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 >
Gene Cumm
2015-Oct-20 19:10 UTC
[syslinux] Syslinux/Extlinux chain : Unexpected change of Extlinux configuration folder after reboot
On Tue, Oct 20, 2015 at 1:08 PM, Ady via Syslinux <syslinux at zytor.com> wrote:> >> 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 partitionPresumably FAT16 at the first (hd0 1; sda1) and EXT4 at second (hd0 2; sda2).>> 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).Quite odd since ldllinux.sys itself is essentially useless without the corresponding VBR.>> 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 ?SYSLINUX won't do this on its own.>> Does syslinux/extlinux bootloader overwrite these values during boot ?No, but may touch the ADV at the end of ldlinux.sys.>> Is there a bootsector recovery mecanism which restore an old bootsector ?If your motherboard or distro does this, that would be why.> 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#CONFIGKeeping the initial config simple is also suggested as it should minimize any impact it may have on subsequent configurations. Some directives are sticky (not reset when loading a new 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?-- -Gene
Seemingly Similar Threads
- Syslinux/Extlinux chain : Unexpected change of Extlinux configuration folder after reboot
- Syslinux/Extlinux chain : Unexpected change of Extlinux configuration folder after reboot
- Structure of VBR in FAT32?
- [patch] 6.03 extlinux/main.c typos
- Structure of VBR in FAT32?