Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 12.04 installed along side of windows 7.

The grub menu doesn't seem obey GRUB_TIMEOUT=10, I see the grub menu there for a split second and it immediately defaults to the first option.

Grub menu worked fine when I first installed ubuntu. I am not able to pinpoint what exactly broke it(maybe some update?). I did resize my ubuntu partition using gparted but am not sure if that is what caused it. here are my settings from etc/default/grub

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

How do I fix this?

Edit: As suggested by 'kamil' this is what I have tried so far with no luck -

1) hold the shift key while booting

2)

sudo gedit /etc/default/grub
edit GRUB_TIMEOUT to `GRUB_TIMEOUT=10`
sudo update-grub

3)

sudo gedit /etc/default/grub
edit GRUB_TIMEOUT to `GRUB_TIMEOUT=10`
sudo update-grub2

4)

at the end of your /etc/grub.d/00_header file, comment out the if condition except for the regular set timeout line like this:

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

then sudo update-grub and sudo update-grub2

5) install boot repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

boot-repair output -

Boot successfully repaired.

...

The boot files of [The OS now in use - Ubuntu 12.04.1 LTS] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)

http://paste.ubuntu.com/1220468/ - here is the full boot-repair data

Could grub files not being at the start of the disk create such issues?

share|improve this question
1  
I believe the part of the boot config you're pointing to does something like "if the last boot failed, wait indefinitely, else wait 10 sec." -1 usually means "indefinitely". So I think the problem is somewhere else. –  Sergey Sep 22 '12 at 10:51
    
Please post the contents of /boot/grub/grub.cfg file. –  green7 Sep 24 '12 at 8:21
add comment

4 Answers 4

I've solved this very issue by deleting the file /boot/grub/grubenv (which contained the line

set recordfail=1 ) and reissuing

sudo update-grub

afterwards.

share|improve this answer
    
did not work, did not work even after upgrade to 12.10 ... going to re-install from scratch some day... –  Optimus Dec 3 '12 at 7:53
add comment

install boot repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

share|improve this answer
    
did not work :( however it said The boot files of [The OS now in use - Ubuntu 12.04.1 LTS] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition). Could grub not being at the start of the disk cause this? paste.ubuntu.com/1220468 - here is repair data –  Optimus Sep 22 '12 at 13:07
    
yes that make sense. try to create a new boot parition –  user91632 Sep 22 '12 at 13:11
1  
@kamil - please do not keep adding answers. Edit your existing answer with more or different information. Thanks. –  fossfreedom Oct 2 '12 at 7:24
add comment

First, you almost never want (or need) to edit any files in /etc/grub.d/, as doing so is likely to cause problems (at the very least debconf prompts) when you upgrade Ubuntu. Therefore I highly recommend that you revert any changes you have made in this directory. Creating a separate /boot/ partition won't help either (there's no evidence that you have a BIOS which can't properly handle large drives).

Ubuntu hides the grub menu by default unless it detects another OS, overriding the GRUB_TIMEOUT in /etc/default/grub, that's why you're not seeing a grub menu by default. This is Ubuntu specific, upstream grub does not do this.

The fact that you're also not seeing the grub menu when you hold shift suggests that grub isn't getting keypresses at all, and so even if the grub menu were shown you wouldn't be able to interact with it. If that's the case, there are ways that we can try to fix it, just don't be surprised if that happens.

To get grub to show the menu for 10 seconds (overriding Ubuntu's hiding of the menu, and any timeout settings in /etc/default/grub) create a file /boot/grub/custom.cfg with the contents timeout=10. This solution is safe, simple, easy to revert (delete the file) and should not cause any problems on upgrades.

share|improve this answer
add comment

Try replacing the first section in /etc/default/grub file with this one

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

Then execute sudo update-grub in the terminal. Restart your PC and see what happen and let us know this by commenting below the answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.