Anatol Pomozov
2014-Jul-11 04:55 UTC
[syslinux] Avoid returning to menu if boot error happened
Hi I have a weird early boot bug that most likely happens because of interaction between syslinux (6.03pre18), btrfs and initram generated by Linux Arch installer. For some reason boot fails. Syslinux prints some information and returns back to the menu. Unfortunately it clears all the messages from screen. I really want to know what boot process prints there. Looking at com32/elflink/ldlinux/execute.c (I believe it is where the error handled) I see the comment: /* If this returns, something went bad; return to menu */ Would it be better avoid returning to menu in case of an error? I think syslinux should print message "Press any key to return back to menu". This will preserve the error messages needed during debugging. What do you think?
> Hi > > I have a weird early boot bug that most likely happens because of > interaction between syslinux (6.03pre18), btrfs and initram generated > by Linux Arch installer. > > For some reason boot fails. Syslinux prints some information and > returns back to the menu. Unfortunately it clears all the messages > from screen. I really want to know what boot process prints there. > > Looking at com32/elflink/ldlinux/execute.c (I believe it is where the > error handled) I see the comment: /* If this returns, something went > bad; return to menu */ > > Would it be better avoid returning to menu in case of an error? I > think syslinux should print message "Press any key to return back to > menu". This will preserve the error messages needed during debugging. > What do you think?You don't _have_ to use a menu to boot, and the default behavior is (or should be) not to clear the screen, so probably you can edit your syslinux.cfg so to obtain (and be able to read) the error message (that is, if indeed the error message is generated by Syslinux). For instance: _ avoid the UI directive, _ avoid ONTIMEOUT, _ avoid ONERROR, _ avoid MENU CLEAR _ use a higher TIMEOUT, _ use PROMPT 1, _ use DEFAULT <problematic_label>. These are just basic changes that _might_ help. In some cases, some of the above should not be applied, and sometimes other changes are needed. The main point is that a basic syslinux.cfg (or equivalent) should help you see the error messages. If you need more details, please post your Syslinux configuration file. Regards, Ady.
Anatol Pomozov
2014-Jul-11 19:35 UTC
[syslinux] Avoid returning to menu if boot error happened
Hi On Thu, Jul 10, 2014 at 11:04 PM, Ady <ady-sf at hotmail.com> wrote:> >> Hi >> >> I have a weird early boot bug that most likely happens because of >> interaction between syslinux (6.03pre18), btrfs and initram generated >> by Linux Arch installer. >> >> For some reason boot fails. Syslinux prints some information and >> returns back to the menu. Unfortunately it clears all the messages >> from screen. I really want to know what boot process prints there. >> >> Looking at com32/elflink/ldlinux/execute.c (I believe it is where the >> error handled) I see the comment: /* If this returns, something went >> bad; return to menu */ >> >> Would it be better avoid returning to menu in case of an error? I >> think syslinux should print message "Press any key to return back to >> menu". This will preserve the error messages needed during debugging. >> What do you think? > > You don't _have_ to use a menu to boot, and the default behavior is > (or should be) not to clear the screen, so probably you can edit your > syslinux.cfg so to obtain (and be able to read) the error message > (that is, if indeed the error message is generated by Syslinux). > > For instance: > _ avoid the UI directive, > _ avoid ONTIMEOUT, > _ avoid ONERROR, > _ avoid MENU CLEAR > _ use a higher TIMEOUT, > _ use PROMPT 1, > _ use DEFAULT <problematic_label>. > > These are just basic changes that _might_ help. In some cases, some > of the above should not be applied, and sometimes other changes are > needed.Thanks, it works! For some reason I thought UI option is required and the text menu is the default one. After I removed the UI I am able to see the boot error message. Though I still think that it makes more sense to do pause on a boot error.> The main point is that a basic syslinux.cfg (or equivalent) should > help you see the error messages. > > If you need more details, please post your Syslinux configuration > file.I was using config file template from my distro https://projects.archlinux.org/svntogit/packages.git/tree/trunk/syslinux.cfg?h=packages/syslinux