Why is Grub menu not shown when starting my computer?

I am a new user of Ubuntu 12.04.

I installed Ubuntu and Windows XP, and I want to use both operating systems. When I restart or boot my PC the GRUB menu does not appear.

How can I solve this problem?


Solution 1:

Hold down the shift key during the boot process this will give you the menu on a one off basis.

You can also modify /etc/default/grub comment out the line by adding a # to the start like:

# GRUB_HIDDEN_TIMEOUT=0

This will cause the grub menu to be displayed for the number of seconds in GRUB_TIMEOUT before selecting the default and booting that.

If you have modified this file then you need to run update-grub for it to take effect. This will automatically be run each time a new kernel is installed by sudo apt full-upgrade

sudo update-grub

Edit-Oct-14-2020: In ubuntu 20.04.1 you have to enable console mode. Open /etc/default/grub with your preferred editor (sudo required) and uncomment the line GRUB_TERMINAL=console. Don't forget to sudo update-grub

Solution 2:

This did the trick for me:

$ sudo gedit /etc/default/grub

I changed these two:

GRUB_TIMEOUT_STYLE=hidden -> GRUB_TIMEOUT_STYLE=menu

GRUB_TIMEOUT=0 -> GRUB_TIMEOUT=10

after changes run $ sudo update-grub

$ reboot

Solution 3:

Note that (at least on some old Ubuntu installs), if installed via USB, it may write the GRUB to the USB instead of the hard drive you've installed to.

This UbuntuForums thread discusses it a bit further, and oldfred's solution for how to fix it there worked for me as well:

To reinstall Grub from an active (not liveCD/DVD/USB only) system - first you need to find the Ubuntu drive (example is sdb, but make sure to use your drive and not a partition). To find it, use

sudo fdisk -l

then, if for example it's "/dev/sdb", just run:

sudo grub-install /dev/sdb

If that returns any errors run:

sudo grub-install --recheck /dev/sdb

sudo update-grub

To see what drive grub2 uses look for the line - grub-pc/install_devices in:

sudo debconf-show grub-pc

sudo grub-probe -t device /boot/grub

To get grub2 to remember where to reinstall on updates:

sudo dpkg-reconfigure grub-pc

From there press enter through the first pages, use spacebar to choose/unchoose the drive, and enter to accept. Again, do not choose partitions but whole drives.

Solution 4:

I assume you tried to install windows XP after Ubuntu installation.Windows loader will replace GRUB loader. so you need to reinstall GRUB.Provided you have not formatted Ubuntu filesystem, while installing Windows XP.

Reinstalling GRUB (GRand Unified Bootloader) :

  1. Boot your system with UBUNTU live dvd/cd*.
  2. Mount the partition in which UBUNTU was installed before i.e. the root partition (old).now it’s like any other normal partition.
  3. After you mounted the partition,which has folders like boot, home, root, usr, bin, tmp. Find the mount point of root partition.It will be in /media (example: /media/disk1 or /media/234efsdfgg5dg435gh) and the device name, default name is /dev/sda .If you have more than one HD, You can find that by typing this command in terminal (applications->accessories ->terminal )“sudo blkid”. It shows all the partitions with its device name, UUID and etc.. Take only /dev/sda or /dev/sdb.
  4. Final step is to open terminal and type this command:

    sudo<space> grub-install<space> --root-directory=/media/<mount name> <space><device name>
    

    Example : sudo grub-install --root-directory=/media/disk1 /dev/sda And continue…. That’s all . Restart, you will have boot menu showing both OS.

*choosing which cd/dvd is important because grub versions are different.Best is to use the same version live cd/dvd.use your ubuntu 12.04 live cd.

Solution 5:

Windows will over-write the boot sector during install and thereby kill Grub. Which means, always install windows first, and then Ubuntu for a dual boot setup.

Else : There are various things that can go wrong with a boot menu of any sort. We will need more information to go on before we can begin to assist.

Something is perturbing me about the way you've worded your question. You say "From the start my desktop does not show the grub menu." What do you mean by "Desktop"?