Jump to content

Recommended Posts

Posted

Ok, this is probably a dead easy one, but it got me a bit :confused:

 

With a fresh, default install of Ubuntu Karmic I get a copy of Grub 1.97~beta4. It has a load of memtest and kernal choices, I don't need em, but nor do I care that they are there. The problem is, that this install unlike other installs of the same version I have done, doesnt have a countdown before using the default. It just sits there forevermore, until you pick one.

 

I've worked out that the old /boot/grub/menu.lst has gone in favour of /etc/default/grub. Below is what the file contains:

 

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="0"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="vga=775"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"

 

 

The only difference with this install to all my previous ones that have the coundown is that it is virtual (hosted with VMWare on Windows XP) - would this make any difference? I can't imagine it would but maybe I'm missing something...

 

Or of course I might just be being daft with the config file above.

 

Thoughts anyone?

 

Cheers,

 

Paul

Posted

Just checked my dual-boot laptop which works with a 10s countdown. Try changing the line:

GRUB_TIMEOUT="0"

to

GRUB_TIMEOUT=10

Note: no quotes.

  • Thanks 1
Posted

Hi Gerry,

 

Huh, I didn't notice the quotes - that is odd, all my other default installs are the same as yours, can't imagine why it's different...

 

However I've changed it as you've suggested and it still just sits there, waiting for user entry...

 

So weird...

Posted (edited)

Don't you need to run update-grub (or similar, as root) to enforce the new settings after you've made changes?

 

The same sort of thing used to catch me out in the lilo days/ you'd edit lilo.conf but then had to run lilo to apply the new settings.

 

ETA:

Ooops, just noticed the file you've pasted above says to do that, so you've likely tried that already. Not sure what the cause is, but I think I've an Ubuntu VM at home I can try and reproduce it on.

Edited by Chad
  • Thanks 1
Posted

Yeah I was forgetting that to begin with, but I did it these last few times. It says it works ok, but makes no difference unfortunately.

 

I'm glad it's not just me that this doesn't make sense to!!! :)

Posted

I've got 9.10 on my laptop at home, but it's an upgrade from 8.04 (I think) via the intermediate releases so may not be as pure as yours.

 

I'll have a play tonight and see what's what. I can't remember ever changing it manually, but I think I hid some of the old kernel options from the Admin GUI - have you tried that route rather than editing the files directly?

Posted

Not tried that - would have to google that to work it out, I've never had to bother doing that before!!!

 

I'll take a shot at it this afternoon and keep you posted ;)

Posted

Its pretty easy to remove the old kernels from grub2.

 

Just uninstall the old kernels (and kernel headers) from synaptic package manager and then run

sudo update-grub

to remove them.

 

You will need to search for 'linux-' in synaptic as when i typed linux-headers nothing was found on my system. Just make sure that you don't remove all the kernels at it will mess up the system (you can find the kernel you're running by typing 'uname -r' at the terminal - do not remove the kernel/kernel headers from the version displayed in the terminal)

  • Thanks 1
Posted
I've been snowed under so far this afternoon, so it might be tomorrow before I get to play with it. I'll let you know what happens when I do it - don't think I'm ignoring your help :)
  • Thanks 1
Posted

Hi,

 

Right, well I deleted the extra linux-headers as suggested by computer_expert, but I still have the recovery mode and memory test options, so I can't seem to get it down to a single choice. So unfortunately the problem remains. Looking through the link to Grub 2 posted by Gerry, I have made my /etc/default/grub file look identical to theirs and it still doesn't work!!!

 

Interestingly it claims to be grub2, is configured the way grub2 is supposed to be configured (no /boot/grub/menu.lst etc) BUT the version is 1.97~beta4. Which to me implies that its a beta version of grub1??

 

Waaay confused now, I'm totally out of ideas...

Posted

Interestingly it claims to be grub2, is configured the way grub2 is supposed to be configured (no /boot/grub/menu.lst etc) BUT the version is 1.97~beta4. Which to me implies that its a beta version of grub1??

 

 

That is Grub2. Grub 1 (legacy) has a version number of 0.97.

 

The section here, named 'Removing Entries from Grub 2' should help you remove the memtest/recovery options from the menu. Its about halfway down the page.

Posted

I could cry....

 

I have now removed all entries to grub except the one I want and what does it do??? It just flippin sits there waiting for me to select option 1 of 1!!!!

 

Such a simple program is causing way too much trouble. And the thing is, it doesn't matter that much, it's just hugely irritating :mad:

Posted

Is your

 

#GRUB_HIDDEN_TIMEOUT=0

 

line still commented? Removing the # should make grub boot the default without displaying the menu. You can still specify a timeout value which will enable you to press ESC to display the menu.

Posted

here's the header in mine (I just set the timeout to '0'):

 

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
 have_grubenv=true
 load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
 saved_entry=${prev_saved_entry}
 save_env saved_entry
 prev_saved_entry=
 save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set c8505d7f-fbef-4ad9-b49b-1959927e9afc
if loadfont /usr/share/grub/unicode.pf2 ; then
 set gfxmode=640x480
 insmod gfxterm
 insmod vbe
 if terminal_output gfxterm ; then true ; else
   # For backward compatibility with versions of terminal.mod that don't
   # understand terminal_output
   terminal gfxterm
 fi
fi
if [ ${recordfail} = 1 ]; then
 set timeout=-1
else
 set timeout=0
fi
### END /etc/grub.d/00_header ###

  • Thanks 1
Posted
Is your

 

#GRUB_HIDDEN_TIMEOUT=0

 

line still commented? Removing the # should make grub boot the default without displaying the menu. You can still specify a timeout value which will enable you to press ESC to display the menu.

 

It was indeed still commented. I uncommented as you suggested, but it hasn't made any difference...

 

I run update-grub after every change and it always says it works - although since all the suggestions you have all come up with for me and all the ones I have thought up on my own have made little difference I started to wonder if it was actually updating grub.cfg at all! But I changed something, updated and checked the config file and it had made the change! It just doesn't actually make any difference!!

 

I altered the file to match Mark's posting, but the same stroy applies I'm afraid - it was identical except for the timeout value - when I change it in /etc/default/grub and update, or when I changed it in the grub.cfg directley as you suggested, it does the same thing: totally ignore it!!

 

I really have nothing left to give on this one, I can't think of anything that hasn't been changed, changed back, commented, and changed again!!

Posted

For those who care...

 

I have fixed this problem. Well, for "fixed" read "cheated". Basically I think that the reason it wasn't booting was some sort of error wasmaking ${recordfail} true, and therefore throwing out the timeout feature as per the if statement in /boot/grub/grub.cfg shown below:

 

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

 

So by commenting out the if statement, and just leaving the timeout statement (as below) it works a treat.

 

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

 

Of course I'm sure there's an excellent reason grub check this and now it doesn't I've no doubt its going to come round and bite me in the ass one of these days. But hey, that's a problem for another day :D

 

Thanks to those who have helped out - and if anyone does have any ideas as to what the error that actually causes this to happen is, please shout!!!

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...