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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI 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?
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
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-Apr-25-2022: In Ubuntu 20.04.1, auto loading of grub modules causes race condition on slow PCs. To keep grub busy in console and give enough time to load video modules, add the following line at top of /boot/grub/grub.cfg
# To resolve race condition when loading video drivers
videoinfo
Or to make the solution permanent, add the following line at top of /etc/grub.d/00_header
echo "videoinfo"
Or you can instead uncomment in /etc/default/grub
GRUB_TERMINAL_OUTPUT=console
Esc
instead of Shift
with Uefi. See askubuntu.com/a/16049/148598
Jan 16, 2020 at 5:05
GRUB_TIMEOUT_STYLE
to menu otherwise I just got a black screen for the duration of the GRUB_TIMEOUT
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) :
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.
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.
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"?
I have encountered a similar problem previously, a blank screen after bios until the Ubuntu login screen appeared, using an older LCD monitor. The monitor displayed "frequency out of range".
You can test to see if this is the case by tapping the "down arrow" key for at least 15 seconds after the bios screen and then pressing "enter".
If Windows loads then grub is working fine, but not being displayed.
This can be resolved by using the 'out-of-range' option in the advanced section of boot repair or editing grub manually.
According to lines 346 to 348 of the boot info script grub should be displayed.
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
So using the command gksu gedit /etc/default/grub
and uncommenting / removing the #
hash from what appears as line 364 in the boot info script as #GRUB_GFXMODE=640x480
should work.
After saving the changes you will need to run sudo update-grub
Have a look at the answers to this question for instructions on using both methods.
I ended up here while searching for a solution for a friend who had the same problem.
What eventually worked for him: hit F2 during boot to go into the BIOS settings (on some machines it's a different key, but usually F2). Check the boot order, and make sure that GRUB is first.
For Ubuntu 20.04.1 enabling console mode by opening /etc/default/grub
with a text editor (with writing permission) and then un-commenting (by removing the #
symbol) the line
GRUB_TERMINAL=console
then finally sudo update-grub
in the terminal worked for me.
For new computers