recordfail timeout always forced on FS without writable envblocks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
# What is happening
When `GRUB_TIMEOUT=1` is set in `/etc/default/grub` and `update-grub` is run, the desired grub boot menu timeout of 1 second is not acknowledged.
This is on an EFI system.
The following is the relevant snippet of `/boot/
```
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_
set timeout_
set timeout=1
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 1 ; then
set timeout=0
fi
fi
if [ $grub_platform = efi ]; then
set timeout=30
if [ x$feature_
set timeout_style=menu
fi
fi
```
The issue here is that on an EFI system, the `timeout` is overridden by the later test to 30 seconds.
# What is expected
I expect that when I set `GRUB_TIMEOUT=1` in `/etc/default/grub` that the grub menu will timeout (continue to boot) in 1 second.
# Workaround
The EFI timeout is taken from `GRUB_HIDDEN_
# Possible solutions
As a user I do not see why on an EFI system there should be a separate timeout, or indeed that the timeout should even depend on the system type. i.e As a user I don't care.
Looking at the generated grub config I would expect that the generated output would be:
```
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_
set timeout_
set timeout=1
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 1 ; then
set timeout=0
fi
fi
if [ $grub_platform = efi ]; then
set timeout=1
if [ x$feature_
set timeout_style=menu
fi
fi
```
but am confused as to why the EFI detection is in a separate `if...`
Clearly the code in `/etc/grub.
```
413 if [ \$grub_platform = efi ]; then
414 set timeout=
415 if [ x\$feature_
416 set timeout_style=menu
417 fi
418 fi
```
to
```
413 if [ \$grub_platform = efi ]; then
414 set timeout=
415 if [ x\$feature_
416 set timeout_style=menu
417 fi
418 fi
```
# Additional information
Ubunutu version:
```
lsb_release -r
Release: 20.10
```
Package version
```
dpkg -l grub2-common
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii grub2-common 2.04-1ubuntu35.4 amd64 GRand Unified Bootloader (common files for version 2)
```
This is potentially the same as #1814403