15

First of all: Yes, I ran sudo update-grub after changing the value.

After a new install of Ubuntu 18.10 on an empty disk the wait time at the grub menu is of 30 seconds (half an eternity!).

The line GRUB_TIMEOUT in /etc/default/grub had a value of 0. Changing this to 10 did not change the wait time, it was still 30 seconds.

Any ideas?

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
muclux
  • 5,034
  • 4
  • 20
  • 43

1 Answers1

19

Recently a patch has been merged fixing grub timeout menu to 30 seconds for UEFI systems with /boot on lvm or btrfs.

The reason for that in some cases a user can't access boot menu. grub can't write to lvm or btrfs.

If a boot fails, grub can't record it to LVM or btrfs, so there is an unlikely chance that you won't be able to get to grub menu for the safe mode, etc.

See this bug report for more details.

If you look into grub.cfg, you'll see this:

if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
if [ $grub_platform = efi ]; then
  set timeout=30
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
  fi
fi

You can change it manually, but it will be reverted on update-grub.

This can be fixed by setting

GRUB_RECORDFAIL_TIMEOUT=0

in /etc/default/grub followed by sudo update-grub command.

if you are sure you'll be able to access UEFI settings. If not quite sure, set it to 5, or 10.

Another workaround would be to create a separate /boot partition outside of LVM or btrfs.

Pilot6
  • 88,764
  • 91
  • 205
  • 313
  • Thank you for this fast answer. I have EFI and LVM, but /boot is the only partition outside of the Volume Group. So it seems that I have to "suffer" for the benefit of those who have put /boot into LVM (or stop the wait by hitting 'ENTER'). – muclux Mar 05 '19 at 20:00
  • I have to suffer too with boot on btrfs. It makes no sense for me, but this is not my decision. – Pilot6 Mar 05 '19 at 20:01
  • Why the boot menu at all. Why not set an interrupt key if you want to boot into something else? It's a pain. – Ubuntu_enthusiast Sep 09 '19 at 11:28
  • 1
    There is a workaround. i am updating the answer. – Pilot6 Sep 09 '19 at 11:29