Deactivate GRUB2 recordfail feature

Introduction

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
else
  set timeout=${GRUB_TIMEOUT}
fi

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

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

Or, if you find the following,

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

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

GRUB_RECORDFAIL_TIMEOUT=5

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

  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

cPanel

Introduction cPanel is a web hosting control panel. This article provides basic information on...

EFI system partition

Introduction The EFI system partition (or ESP) is an OS independent partition formatted in...

Hang Up with Realtek r8169-r8168 NIC

Description of the problem The system loses the network connection because the network card...

Installimage

installimage Script The installimage script provided by Progressive Robot is an easy and fast...

Installing custom images

Introduction This article explains three methods for installing images that are not available on...

Powered by WHMCompleteSolution