Hi Folks, I've got what I hope is a clueless newbie question for you. I couldn't find much about it in the last 8 or so months or achives, or anywhere else, so I'm asking before settling down to read the fine source code ;-) I'm working on a system derived from ARCH linux, running what they call version 6.02-4 of the syslinux package (which would be your version 6.02 plus their/our patches). I've got a syslinux.cfg with several named menu options, and the right things happen if I set the DEFAULT option in syslinux.cfg, or select one of the options at the console during boot. What I want to do is reboot into a particular menu option once, and if that fails, reboot back on the usual default, without requiring anyone to interact with the console. This appears to be the purpose of --once. The best example of its usage I could find was at https://bbs.archlinux.org/viewtopic.php?id=140049 comment #4 I modified this to be suitable to a linux system. Unfortunately, the results did not work. Perhaps I don't understand the correct syntax? Or perhaps I'm hitting a bug? In my syslinux.cfg I have several menu options, simplified here. DEFAULT up LABEL up MENU LABEL Generic LINUX ../vmlinuz-linux APPEND root=/disk/a INITRD ../pxe-linux.img Label updebug MENU LABEL Debug LINUX ../vmlinuz-linux APPEND root=/disk/a debug INITRD ../pxe-linux.img So I do $ sudo extlinux --once updebug /boot/syslinux The file /boot/debug/ldlinux.sys changes, and part of the change is 2 copies of the characters u p d e b u g But when I reboot, it comes up from the first option. And if I sit at the console, I see that option showing as gthe default, just as if I hadn't been using --once to change it. However, the modifications _are_ removed from /boot/debug/ldlinux.sys So part of the desired effect of --once is happening on boot up Perhaps I don't understand what is meant by "command" in the man page: -o, --once=command Execute a command once upon boot. Any help would be greatly appreciated. Thank-you. -- Arlie (Arlie Stephens arlie at worldash.org)
On 06/04/2014 03:42 PM, Arlie Stephens wrote:> > I'm working on a system derived from ARCH linux, running what they > call version 6.02-4 of the syslinux package (which would be your > version 6.02 plus their/our patches). I've got a syslinux.cfg > with several named menu options, and the right things happen if I set > the DEFAULT option in syslinux.cfg, or select one of the options at > the console during boot. > > What I want to do is reboot into a particular menu option once, and if > that fails, reboot back on the usual default, without requiring anyone > to interact with the console. > > This appears to be the purpose of --once. >I believe --once is simply broken in 6.02. I can't remember if it has been fixed in 6.03-pre13; need to check this. -hpa
On Jun 04 2014, H. Peter Anvin wrote:> On 06/04/2014 03:42 PM, Arlie Stephens wrote: > > > > I'm working on a system derived from ARCH linux, running what they > > call version 6.02-4 of the syslinux package (which would be your > > version 6.02 plus their/our patches). I've got a syslinux.cfg > > with several named menu options, and the right things happen if I set > > the DEFAULT option in syslinux.cfg, or select one of the options at > > the console during boot. > > > > What I want to do is reboot into a particular menu option once, and if > > that fails, reboot back on the usual default, without requiring anyone > > to interact with the console. > > > > This appears to be the purpose of --once. > > > > I believe --once is simply broken in 6.02. I can't remember if it has > been fixed in 6.03-pre13; need to check this.Do you know what version it last worked at? If it's not fixed at 6.03-pre13 perhaps I could go backwards instead of forward?> > -hpa-- Arlie
> Hi Folks, > > I've got what I hope is a clueless newbie question for you. I couldn't > find much about it in the last 8 or so months or achives, or anywhere > else, so I'm asking before settling down to read the fine source code > ;-) > > I'm working on a system derived from ARCH linux, running what they > call version 6.02-4 of the syslinux package (which would be your > version 6.02 plus their/our patches). I've got a syslinux.cfgArchLinux currently is already using 6.03-pre12 or newer, so I would suggest for you to update.> with several named menu options, and the right things happen if I set > the DEFAULT option in syslinux.cfg, or select one of the options at > the console during boot. > > What I want to do is reboot into a particular menu option once, and if > that fails, reboot back on the usual default, without requiring anyone > to interact with the console. > > This appears to be the purpose of --once. > > The best example of its usage I could find was at > https://bbs.archlinux.org/viewtopic.php?id=140049 comment #4 > > I modified this to be suitable to a linux system. Unfortunately, the > results did not work. Perhaps I don't understand the correct syntax? > Or perhaps I'm hitting a bug? > > In my syslinux.cfg I have several menu options, simplified here. > > DEFAULT up > > LABEL up > MENU LABEL Generic > LINUX ../vmlinuz-linux > APPEND root=/disk/a > INITRD ../pxe-linux.img > > Label updebug > MENU LABEL Debug > LINUX ../vmlinuz-linux > APPEND root=/disk/a debug > INITRD ../pxe-linux.img > > > So I do $ sudo extlinux --once updebug /boot/syslinux > > The file /boot/debug/ldlinux.sys changes, and part of the change is 2 > copies of the characters u p d e b u gI would guess you are not using "/boot/debug/" but actually "/boot/syslinux/" as installation path, right? Where is your ldlinux.sys really located?> > But when I reboot, it comes up from the first option. And if I sit at > the console, I see that option showing as gthe default, just as if I > hadn't been using --once to change it. > > However, the modifications _are_ removed from /boot/debug/ldlinux.sys > So part of the desired effect of --once is happening on boot up > > Perhaps I don't understand what is meant by "command" in the man page: > > -o, --once=command > Execute a command once upon boot.The command should (better) be label in your cfg file. FWIW, labels shall not include space characters and shall be unique. According to your report (and you are not the first one), there seems to be some partial success but the desired result is not achieved. Have you tried using the "=" sign and the "--install" option too? For instance: $ sudo extlinux --once=updebug --install /boot/syslinux where "updebug" is a unique label in your syslinux.cfg file and "/boot/syslinux/" is the mounted point where SYSLINUX will be re-installed.> > Any help would be greatly appreciated. > > Thank-you. > > -- > Arlie >Regards, Ady.
On Jun 05 2014, Ady wrote:> > I'm working on a system derived from ARCH linux, running what they > > call version 6.02-4 of the syslinux package (which would be your > > version 6.02 plus their/our patches). I've got a syslinux.cfg > > ArchLinux currently is already using 6.03-pre12 or newer, so I would > suggest for you to update.I want to keep the affected machines more-or-less stable, i.e. we're not tracking arch closely. But we'll happily pick up a fixed version of syslinux, or a specific patch for the problem we've been hitting.> > In my syslinux.cfg I have several menu options, simplified here. > > > > DEFAULT up > > > > LABEL up > > MENU LABEL Generic > > LINUX ../vmlinuz-linux > > APPEND root=/disk/a > > INITRD ../pxe-linux.img > > > > Label updebug > > MENU LABEL Debug > > LINUX ../vmlinuz-linux > > APPEND root=/disk/a debug > > INITRD ../pxe-linux.img > > > > > > So I do $ sudo extlinux --once updebug /boot/syslinux > > > > The file /boot/debug/ldlinux.sys changes, and part of the change is 2 > > copies of the characters u p d e b u g > > I would guess you are not using "/boot/debug/" but actually > "/boot/syslinux/" as installation path, right? Where is your > ldlinux.sys really located?Yes, that was a typo. It's /boot/syslinux/ldlinux.sys> > But when I reboot, it comes up from the first option. And if I sit at > > the console, I see that option showing as gthe default, just as if I > > hadn't been using --once to change it. > > > > However, the modifications _are_ removed from /boot/debug/ldlinux.sys > > So part of the desired effect of --once is happening on boot up > > > > Perhaps I don't understand what is meant by "command" in the man page: > > > > -o, --once=command > > Execute a command once upon boot. > > The command should (better) be label in your cfg file. FWIW, labels > shall not include space characters and shall be unique.Good, that part is right then. Though I see I had another typo above. Label updebug is really LABEL updebug when I look at the actual file on my test machine. I have no spaces in the LABEL lines. I *do* have spaces in the MENU LABEL lines, but I believe that's OK.> According to your report (and you are not the first one), there seems > to be some partial success but the desired result is not achieved. > Have you tried using the "=" sign and the "--install" option too? For > instance: > > $ sudo extlinux --once=updebug --install /boot/syslinux > > where "updebug" is a unique label in your syslinux.cfg file and > "/boot/syslinux/" is the mounted point where SYSLINUX will be > re-installed.Same wrong effect at a gross level - I still boot off the default label, not the one named with --once. Some differences in the effects on ldlinux.sys - the post-boot version is not identical to the one I had in place before running "sudo extlinux --once=updebug --install /boot/syslinux" -- Arlie