Ubuntu 12.04 Bug High Prio : Grub 2 grub-pc hangs on reboot timeout not working

Prio 1: Set to Prio 1 cause it prevent a remote ubuntu Server from Boot without interactive root access to the Grub 2 Boot Screen !!

Problem: If you do a release upgrade to ubuntu 12.04 use grub-pc and have a seperate /boot partition (sda1) then your server won’t boot without you pressing enter at the grub2 grub-pc menu.

Background: this is a older known bug of a header skript template.

Solution:

  1. for Servers you should remove grub2 and install grub
  2. or make changes with

sudo nano /etc/grub.d/00_header

make_timeout ()
{
cat << EOF
if [ "\${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=${2}
fi
EOF
}

change to:
make_timeout ()
{
cat << EOF
set timeout=0
EOF
}

recreate /boot/grub/grub.cfg with:
sudo grub-mkconfig
sudo update-grub

..now cross fingers and reboot the PC/Server..hope it will boot up!

REMARK: MY published security tip against init destroy by crashes setting at /etc/fstab to mount /boot partition readonly should NOT used on ubuntu 12.04 cause a file named grub-env is updated on every boot for a function named failover stamp, which prevent the timeout to auto boot a crashed server (lost power), cause the root must be manual touch the grub to boot a server to repair mode called “single mode” or “rescue mode”.

Impressum Datenschutz-DSGVO-GDPR

Last Update 08.10.2023 www.linuxonlinehelp.eu - Nonprofit Linux PC & Server Support since 2004 Tags: Linux Online Help, Linuxonlinehelp, Linux Support, Linux Hilfe