Kristian Klausen
2017-Sep-24 20:44 UTC
[syslinux] Fallback to second menu entry, ONERROR looping forever
Hello I want to fallback to a second boot entry, if the kernel is missing for the first entry. So I through I could use ONERROR, but syslinux just continue to try starting the first entry. Am I doing something wrong? or can't this be done with syslinux? default menu.c32 prompt 0 MENU HIDDEN MENU AUTOBOOT TIMEOUT 2 ONERROR live-generic label grub ??? menu label ^Grub ??? menu default ??? linux /boot/grub/lnxboot.img ??? initrd /boot/grub/core.img label live-generic ??? menu label ^Live (generic) ??? linux /live/vmlinuz ??? initrd /live/initrd.img ??? append boot=live quiet splash nonetworking - Kristian Klausen
Gene Cumm
2017-Sep-27 10:36 UTC
[syslinux] Fallback to second menu entry, ONERROR looping forever
On Sun, Sep 24, 2017 at 4:44 PM, Kristian Klausen via Syslinux <syslinux at zytor.com> wrote:> Hello > > I want to fallback to a second boot entry, if the kernel is missing for > the first entry. > > So I through I could use ONERROR, but syslinux just continue to try > starting the first entry. > > Am I doing something wrong? or can't this be done with syslinux?I snipped the config to later.> - Kristian KlausenWhat version of Syslinux from what build/source is being used? On Wed, Sep 27, 2017 at 12:43 AM, TorgeirW via Syslinux <syslinux at zytor.com> wrote:> Hi! > > I think thats the whole point with ONERROR. > We use it in PXELINUX with a reload label. > > So we can reload pxelinux (ONERROR) if someone types something wrong ?intall? instead of ?install?. > > ? > TorgeirIt is the point of ONERROR however, the menu might be adding to confusion. I personally try to use uppercase on the directives as it makes knowing what is or is not directives a little easier. Let's look at the emailed config:> default menu.c32This should be: DEFAULT grub UI menu.c32 Though to see what's wrong, I'd suggest commenting out the "UI" line.> prompt 0For diagnostics, let's use "PROMPT 1".> MENU HIDDEN > MENU AUTOBOOT > TIMEOUT 2For testing, I'd suggest increasing TIMEOUT to a human value of say 600 (60 seconds) or set to 0 (around 13 years).> ONERROR live-generic > > label grub > menu label ^Grub > menu default > linux /boot/grub/lnxboot.img > initrd /boot/grub/core.img > > label live-generic > menu label ^Live (generic) > linux /live/vmlinuz > initrd /live/initrd.img > append boot=live quiet splash nonetworkingYour LABELs are clean names and non-ambiguous in the first character. You've used MENU LABEL for human descriptions with special characters like spaces and parentheses. With the change to DEFAULT, there's almost no need for MENU DEFAULT though it shouldn't be hurting anything. I seem to recall something about error-like conditions not triggering a proper error state and using ONERROR but at least these changes should show more of what's going on underneath. -- -Gene
Kristian Klausen
2017-Sep-27 21:06 UTC
[syslinux] Fallback to second menu entry, ONERROR looping forever
Hello Gene On 27-09-2017 12:36, Gene Cumm wrote:> On Sun, Sep 24, 2017 at 4:44 PM, Kristian Klausen via Syslinux > <syslinux at zytor.com> wrote: >> Hello >> >> I want to fallback to a second boot entry, if the kernel is missing for >> the first entry. >> >> So I through I could use ONERROR, but syslinux just continue to try >> starting the first entry. >> >> Am I doing something wrong? or can't this be done with syslinux? > I snipped the config to later. > >> - Kristian Klausen > What version of Syslinux from what build/source is being used?I have no idea really. They was added to the Git repo on June 18th 2015, so they "old". I tried strings *.c32, to look for a version string but couldn't find any. I have attached the file, if you have any idea how I can figure out the version.> > On Wed, Sep 27, 2017 at 12:43 AM, TorgeirW via Syslinux > <syslinux at zytor.com> wrote: >> Hi! >> >> I think thats the whole point with ONERROR. >> We use it in PXELINUX with a reload label. >> >> So we can reload pxelinux (ONERROR) if someone types something wrong ?intall? instead of ?install?. >> >> ? >> Torgeir > It is the point of ONERROR however, the menu might be adding to confusion. > > I personally try to use uppercase on the directives as it makes > knowing what is or is not directives a little easier. > > Let's look at the emailed config: > >> default menu.c32 > This should be: > > DEFAULT grub > UI menu.c32 > > Though to see what's wrong, I'd suggest commenting out the "UI" line. > >> prompt 0 > For diagnostics, let's use "PROMPT 1".I just tried that, but it didn't really change anything. I still just get about that syslinux can't find the kernel, and it then just retries forever.> >> MENU HIDDEN >> MENU AUTOBOOT >> TIMEOUT 2 > For testing, I'd suggest increasing TIMEOUT to a human value of say > 600 (60 seconds) or set to 0 (around 13 years). > >> ONERROR live-generic >> >> label grub >> menu label ^Grub >> menu default >> linux /boot/grub/lnxboot.img >> initrd /boot/grub/core.img >> >> label live-generic >> menu label ^Live (generic) >> linux /live/vmlinuz >> initrd /live/initrd.img >> append boot=live quiet splash nonetworking > Your LABELs are clean names and non-ambiguous in the first character. > You've used MENU LABEL for human descriptions with special characters > like spaces and parentheses. With the change to DEFAULT, there's > almost no need for MENU DEFAULT though it shouldn't be hurting > anything. > > I seem to recall something about error-like conditions not triggering > a proper error state and using ONERROR but at least these changes > should show more of what's going on underneath. >-------------- next part -------------- A non-text attachment was scrubbed... Name: syslinux.tar.xz Type: application/x-xz Size: 184208 bytes Desc: syslinux.tar.xz URL: <http://www.zytor.com/pipermail/syslinux/attachments/20170927/9b82c220/attachment-0001.xz>
Ady Ady
2017-Oct-04 15:11 UTC
[syslinux] Fallback to second menu entry, ONERROR looping forever
> On Sun, Sep 24, 2017 at 4:44 PM, Kristian Klausen via Syslinux > <syslinux at zytor.com> wrote: > > Hello > > > > I want to fallback to a second boot entry, if the kernel is missing for > > the first entry. > > > > So I through I could use ONERROR, but syslinux just continue to try > > starting the first entry. > > > > Am I doing something wrong? or can't this be done with syslinux? > > I snipped the config to later. > > > - Kristian Klausen > > What version of Syslinux from what build/source is being used? > > > On Wed, Sep 27, 2017 at 12:43 AM, TorgeirW via Syslinux > <syslinux at zytor.com> wrote: > > Hi! > > > > I think thats the whole point with ONERROR. > > We use it in PXELINUX with a reload label. > > > > So we can reload pxelinux (ONERROR) if someone types something wrong ?intall? instead of ?install?. > > > > ? > > Torgeir > > It is the point of ONERROR however, the menu might be adding to confusion.The practical use-cases of ONERROR are very limited. Naturally, users tend to think that when the selected item fails to launch, then Syslinux would simply try to load whatever is specified after ONERROR. Unfortunately, this is not how it works. Regards, Ady.
Apparently Analagous Threads
- Fallback to second menu entry, ONERROR looping forever
- Fallback to second menu entry, ONERROR looping Syslinux Digest, Vol 174, Issue 3
- ONERROR not triggered in PXELINUX 3.31 when ramdisk missing
- which should I use: TIMEOUT, ONTIMEOUT, or ONERROR ?
- How to replace slashes with back slashes