Announcement

Collapse
No announcement yet.

Grub header lsefi not working causing delayed grub menu

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Grub header lsefi not working causing delayed grub menu

    This morning I rebooted and casually noticed my boot time out for the grub menu was 30 seconds - a number I have set at 3. A couple minutes looking and I discovered (or at least it appears) that grub is defaulting to the "recordfail" timeout time which is 30 seconds. That means - or should mean - that grubenv has recordfail set to "true".

    I have re-created the grubenv several times, compared the current one to another I have which does not do this, and verified the variable is not set. Nothing seems to change it.

    Anyone else seeing this?

    EDIT: See later posts. Turns out to be related to a function in grub 00_header file
    Last edited by oshunluvr; Feb 02, 2019, 02:49 PM.

    Please Read Me

    #2
    Never gave grubenv much thought until reading your post. Checked my /boot/grub/grubenv and it is this:

    Code:
    # GRUB Environment Block
    #######################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
    Googled this, and got the following, although many older posts but some might indicate diagnostic ideas:
    https://www.google.com/search?client...utf-8&oe=utf-8

    Sorry, I'm not much help here.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Yeah, I've gone through most of those. I know I can shorten the recordfail timeout in default/grub but I was hoping to just make it work right again.

      Could be a bug, but if no one else is seeing it, more likely something here.

      Please Read Me

      Comment


        #4
        I've got the same issue. It affects any 18.04 based install, and seems to have been introduced by arecent grub update.

        Comment


          #5
          A little more research here. After trying several different recordfail settings in grubenv, I pulled the grub.cfg from my older 16.04 install and compared it to my current one. I discovered a paragraph in 00_header in 18.04 that is not in 16.04:

          Code:
          [FONT=monospace][COLOR=#000000]if lsefi; then[/COLOR]
            set timeout=30 
            if [ x$feature_timeout_style = xy ] ; then
              set timeout_style=menu
            fi
          fi[/FONT]
          Note "timeout=30" which is the same as the recordfail timeout. As a test, I edited /boot/grub/grub.cfg and changed the 30 to 17 and sure enough, that's the source of the log timeout.

          Here's the paragraph from 00_header:
          Code:
          if lsefi; then  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
            if [ x\$feature_timeout_style = xy ] ; then
              set timeout_style=menu
            fi
          fi
          One odd thing is the 00_header file is from Jan 9th but this bug has just appeared so it must be related to grub-common not the the header file.

          Still looking for answers...

          Please Read Me

          Comment


            #6
            You can go here and click "This bug effects you"

            Please Read Me

            Comment


              #7
              Bug identified and squashed.

              https://bugs.launchpad.net/ubuntu/+s...2/+bug/1814403

              Please Read Me

              Comment


                #8
                Yeah, that was quick. Very nice of them!
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  It seems to have solved nothing for me on my installs. I still get a 30 second countdown unless I put a GRUB_RECORDFAIL_TIMEOUT value in /etc/default/grub

                  Am I missing something?

                  Comment


                    #10
                    Did you run sudo update-grub after updating the package?

                    Please Read Me

                    Comment


                      #11
                      You should have this package version:

                      stuart@Precision7730:~$ dpkg -l |grep grub-common | awk '{ print $3 }'
                      2.02-2ubuntu8.12

                      Please Read Me

                      Comment


                        #12
                        Originally posted by oshunluvr View Post
                        Did you run sudo update-grub after updating the package?
                        Yes.

                        No go.

                        Comment


                          #13
                          Originally posted by mr_raider View Post
                          Yes.

                          No go.
                          Are you using EFI boot? This bug was specific to non-EFI environment.

                          Please Read Me

                          Comment


                            #14
                            Yes I'm using EFI. The bug appears on EFI too.

                            Sent from my ONEPLUS A6003 using Tapatalk

                            Comment


                              #15
                              Originally posted by mr_raider View Post
                              Yes I'm using EFI. The bug appears on EFI too.
                              At this point, I don't necessarily agree - at least not with what info you've provided. While what you're seeing on the screen in front of you appears the same, that does not necessarily mean the cause is the same. The bug I reported and was addressed was specific to a non-EFI, GPT, non-LVM, environment. It may have also been related to BTRFS. Reading the bug report and all the comments should reveal this.

                              The appearance of the 30 second boot menu was due to a function called 'lsefi' that is missing from non-EFI installations of grub, but was referenced by a section in the 00_header file, which has now been fixed - it no longer appears in my grub.cfg.

                              It's possible you're encountering a different cause or even that the fix produced the problem. I suggest you go through the steps to validate what you're seeing, then log into the bug report and comment. Maybe it will get addressed immediately.

                              If I were you, I'd first verify that your grubenv is correct and reboot. Then edit grub.cfg and change the 30 seconds in the section I addressed to some other number and reboot. If the timer changes, that proves it's that section causing the problem, then go and report your findings. If not, the issue lies elsewhere.

                              Also, you can edit 00_header and change the 30 seconds in line 387 to something more to your liking. Then at least you don't have to look at it until another update to 00_header is released.

                              Please Read Me

                              Comment

                              Working...
                              X