Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 29668  / 3 Years ago, wed, may 19, 2021, 12:32:37

I have Ubuntu Server 11.04, but it is headless (no monitor). The only way I want to be able to access it is remotely via SSH. But, sometimes, say after a power loss, when the server restarts, it will get stuck on the Grub boot menu, and it won't count down. It will just hang there waiting for me to choose the first boot entry. This means I have to go there and plug in a monitor and keyboard.



But I can't do that remotely. How can I force it to continue booting to boot entry 1 (default) regardless of power loss or whatever?


More From » server

 Answers
7

The answer to this one can be found in the grub file /etc/grub.d/00_header



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


Setting the timeout value to -1 will stop the count down. Change the value to a value > 0 i.e. set timeout=10



this section of the file would look like



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


Then run



sudo update-grub2

[#44020] Thursday, May 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
scusaper

Total Points: 335
Total Questions: 111
Total Answers: 119

Location: Belize
Member since Mon, Jun 20, 2022
2 Years ago
;