[Solved] Grub2 Timeout 30 seconds after today's update

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
joaquimbarreto

Re: Grub2 Timeout 30 seconds after today's update

Post by joaquimbarreto »

gm10 wrote: Thu Jan 31, 2019 9:07 pm
In a terminal window run:

Code: Select all

sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header
followed by

Code: Select all

sudo update-grub
The reason for the change is that the maintainer at Ubuntu doesn't know when to press Shift during boot and only know to bring up the menu via Ctrl+Alt+Del, which won't work with GRUB installed to an LVM partition, so they thought they'd just force 30 seconds of menu on everyone using EFI + LVM. Genius...!
Thank you, this worked for me.
fleamour
Level 2
Level 2
Posts: 73
Joined: Thu May 22, 2008 4:08 pm

Re: Grub2 Timeout 30 seconds after today's update

Post by fleamour »

Pjotr wrote: Sun Feb 03, 2019 5:09 am Everybody who has checked the LVM box (in Ubiquity) during installation of Mint: are you sure that you had a good reason for doing that? If not, you shouldn't have checked that box at all.

In most cases, LVM is just an unnecessary complication with no advantages at all, which can cause serious trouble.
LVM is the future? Surely?!? Live resizing on supported file systems is a pretty good advantage. However with one root partition as default, maybe less so! I never did see the need for separate /home. To me /home & root work in tandem & side hopping to openSUSE while preserving my precious /home partition will not help anyone....
Lenovo ThinkPad X250 i7 ~ Mint 20 Cinnamon
LanceM

Re: [Solved] Grub2 Timeout 30 seconds after today's update

Post by LanceM »

fleamour wrote "LVM is the future? Surely?!?"
Btrfs already has instant snapshots and online resizing. I've had great success with it.
encodedream

Re: [Solved] Grub2 Timeout 30 seconds after today's update

Post by encodedream »

oz42 wrote: Tue Mar 26, 2019 5:01 am I have installed 19.1 twice on the same machine on btrfs. First time in BIOS mode, no problem. Second time in UEFI mode: grub2 delay is fixed at 30 seconds.
After taking a quick look at

Code: Select all

/etc/grub.d/00_header
it appears that their is a check for writeability, which looks at the file system type. It is a function called check_writable. The non writeable file systems are on line 125:

Code: Select all

btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs
I'm using BTRFS as my root file system, and I'm curious if this affects the ability for Grub to remember what OS was last used? The Grub data is stored on the EFI System partition, which is FAT32, so it is totally writeable.

The fix outlined here tells Grub that the recordfail is not broken, i'm wondering if there should be an update submitted to the upstream project to fix the bug they introduced.

Looking more into the bug, https://bugs.launchpad.net/ubuntu/+sour ... ug/1800722, as others have mentioned here it is a fix for EFI+LVM, but when you aren't using LVM, but are using EFI you're forced into this scenario, as is pointed out here, https://bugs.launchpad.net/ubuntu/+sour ... omments/16.

The forced menu is due to the check for EFI that was added, which overrides any user configurations, timeout_style=menu.
pioruns
Level 1
Level 1
Posts: 22
Joined: Tue Mar 17, 2015 4:25 pm

Re: Grub2 Timeout 30 seconds after today's update

Post by pioruns »

gm10 wrote: Thu Jan 31, 2019 9:07 pm
blueocean wrote: Thu Jan 31, 2019 8:38 pm Any fix for this?
In a terminal window run:

Code: Select all

sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header
followed by

Code: Select all

sudo update-grub
The reason for the change is that the maintainer at Ubuntu doesn't know when to press Shift during boot and only know to bring up the menu via Ctrl+Alt+Del, which won't work with GRUB installed to an LVM partition, so they thought they'd just force 30 seconds of menu on everyone using EFI + LVM. Genius...!
This solution doesn't work on Linux Mint 20 x86_64 MATE. UEFI enabled. Partitions:

Code: Select all

$ mount |grep sda
/dev/sda2 on / type btrfs (rw,noatime,nodiratime,ssd,space_cache,subvolid=257,subvol=/@)
/dev/sda2 on /home type btrfs (rw,noatime,nodiratime,ssd,space_cache,subvolid=258,subvol=/@home)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Desktop: AMD Ryzen 7 5800X (16) @ 3.8GHz | 64GB ECC DDR4 RAM @ 3600 MT/s | PowerColor Radeon 6800 XT
Crucial P2 500GB PCIe M.2 2280 SSD NVMe | 2x Crucial MX500 1TB 3D NAND SATA @ RAID1 | OS: Debian GNU/Linux bookworm/sid x86_64
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: [Solved] Grub2 Timeout 30 seconds after today's update

Post by mr_raider »

Same issue with btrfs. Grub can't write the btrfs boot partition so you end up with this.

Add the line

GRUB_RECORDFAIL_TIMEOUT=5

To /etc/default/grub


Then run update-grub
Image
JayJay_seal
Level 1
Level 1
Posts: 17
Joined: Wed Jun 14, 2017 6:50 am

Re: Grub2 Timeout 30 seconds after today's update

Post by JayJay_seal »

gm10 wrote: Thu Jan 31, 2019 9:07 pm
blueocean wrote: Thu Jan 31, 2019 8:38 pm Any fix for this?
In a terminal window run:

Code: Select all

sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header
followed by

Code: Select all

sudo update-grub
Thank you, this solved my issue. and saves me a few seconds of boot time :D
numgi5
Level 1
Level 1
Posts: 2
Joined: Sat Apr 16, 2022 9:35 pm

Re: Grub2 Timeout 30 seconds after today's update

Post by numgi5 »

gm10 wrote: Thu Jan 31, 2019 9:07 pm
In a terminal window run:

Code: Select all

sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header
followed by

Code: Select all

sudo -s update-grub
The reason for the change is that the maintainer at Ubuntu doesn't know when to press Shift during boot and only know to bring up the menu via Ctrl+Alt+Del, which won't work with GRUB installed to an LVM partition, so they thought they'd just force 30 seconds of menu on everyone using EFI + LVM. Genius...!
Wow thank you for this!! Been scratching my head for hours as to why all my settings in grub file are being ignored and stuck with 30 second timer. Tried everything until I found your post, now I can show/hide the menu again, set a timeout, etc. I'm running Cinnamon 20.3 on a EFI based 2008 iMac using BTRFS in case that matters. Thanks again! :D
Locked

Return to “Installation & Boot”