LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-19-2010, 04:10 PM   #1
FireRaven
Member
 
Registered: Apr 2006
Location: Australia
Distribution: Debian Squeeze
Posts: 135

Rep: Reputation: 18
How to disable GRUB 2 menu, even after server crash.


Just wanted to share this with anyone wanting to know.
If your headless server crashes, GRUB2 (at least on Ubuntu Server) is designed to force the GRUB menu to load up next time it starts up, which means you are locked out of SSH until someone physically makes a kernel selection on the PC.

To prevent this do the following change to your grub.cfg file.

#nano /boot/grub/grub.cfg

You want to find this line and change it:
Code:
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
And change to:
Code:
if [ ${recordfail} = 1 ]; then
  set timeout=3
else
  set timeout=10
fi
Or a number other than -1.

I was looking for a solution for this for a long time and found no hel with google. Let me know if there is a better way.
I aware this file will get overwritten and need reediting if the Kernel gets updated.
 
Old 03-21-2010, 09:14 AM   #2
aus9
LQ Addict
 
Registered: Oct 2003
Location: Australia
Distribution: MX 18/ TC64
Posts: 5,301

Rep: Reputation: Disabled
hi

thanks for posting

I do not run a server or ubuntu

when it is convenient for you....could you post the section for which script grub2 is using to embed to grub.cfg pls?

AFAIK that script does not exist in my /etc/grub.d unless its some kind of ubuntu 40_custom?

thanks
 
Old 08-30-2013, 02:46 AM   #3
sniffski
LQ Newbie
 
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
Just try with "grub-editenv create"

This will clear grub environment file and should boot clearly the next time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub drops to grub prompt on boot, but can use commands to find menu... fix? greenmuzz Linux - Software 7 06-07-2009 04:07 AM
how to disable menu accelerators? stinkymatt Linux - Desktop 2 05-26-2009 10:06 AM
Grub Menu doesn't reflect menu.lst file fatsheep Linux - Software 4 06-11-2007 02:29 PM
/grub/menu.lst file disappeared but computer still boots (grub) rrrssssss Linux - General 5 04-08-2007 10:02 AM
GRUB Boot menu with SuSE9.0 and Windows 2000 Advanced Server SteveK1979 Linux - Newbie 4 02-19-2004 05:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration