Deactivate GRUB2 recordfail feature

Last change on 2021-05-07 • Created on 2020-03-13 • ID: RO-BD00A


With GRUB2, there is a recordfail feature. If there is a failed boot attempt, GRUB2 will automatically stop at the boot menu during the next boot.

You may not want this in some situations, so you can change it. Depending on the GRUB version, you either need to change the file /etc/grub.d/00_header or the variable GRUB_RECORDFAIL_TIMEOUT in the file /etc/default/grub.

Deactivate GRUB2 recordfail feature

First, search for the following in the file /etc/grub.d/00_header

if [ ${recordfail} = 1 ]; then
   set timeout=-1
  set timeout=${GRUB_TIMEOUT}

If you find this (the exact wording), then simply add comment characters:

#if [ ${recordfail} = 1 ]; then
#    set timeout=-1
    set timeout=${GRUB_TIMEOUT}

Or, if you find the following,

if [ "${recordfail}" = 1 ]; then
 set timeout=${GRUB_RECORDFAIL_TIMEOUT:--1}
 set timeout=${2}

then edit the file /etc/default/grub and add the line


for a 5 second timeout.

In either case, to update the configuration, run update-grub.

Now GRUB2 will always use the set timeout.

Manual reset the recordfail value

You can manually reset the value for grubenv:

grub-editenv set recordfail=0

Or you can even remove it:

grub-editenv unset recordfail

Table of Contents