To repair the bootloader:
To restore Grub to your system, if you have removed, or part-done another installatiob, installed Windows, etc:
sudo grub-install /dev/sdX
Where sdX
gives your hard disk entry under /dev
. Usually this is /dev/sda
, but it can vary if it is on an external drive or something. You can find the disk entry in:
sudo fdisk -l
After, that run this (May not be required, but it should not hurt:)
sudo update-grub
You can check with:
sudo grub-install --recheck /dev/sdX
To make Grub nor show on boot:
Edit/etc/default/grub
:
sudo nano /etc/default/grub
and add/change this line:
GRUB_TIMEOUT=0
then run this to update the changes:
sudo update-grub
When it is runnning you will get something like this:
USERNAME@HOSTNAME:~$ sudo update-grub
[sudo] password for USERNAME:
Generating grub.cfg ... Found linux image:
/boot/vmlinuz-3.11.0-15-generic Found initrd image:
/boot/initrd.img-3.11.0-15-generic Found linux image:
/boot/vmlinuz-3.11.0-12-generic Found initrd image:
/boot/initrd.img-3.11.0-12-generic Found memtest86+ image:
/boot/memtest86+.bin
Found Fedora release 20 (Heisenbug) on /dev/sda2
done USERNAME@HOSTNAME:~$
The Ubuntu kernels would likely be the linux
and and initrd
entries, other Operating Systems should appear after Found ...
Manual on configuring grub here
Other useful stuff:
You can also set this in /etc/default/grub
:
GRUB_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT=3
Which would mean that it would not display the selection menu for 3 seconds, allowing you to use it if you need to by pressing Any Key, and then it would boot.
If you want the kernel that is selected in the menu to always be the default selection, add/change these lines:
GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved
Remember to run sudo update-grub
to update the changes (or it won't do anything), and there is the manual for more options.
For easier and more advancded configuration of Grub, you may want to use Grub Customizer
If you did remove grub
, you may need to reinstall it with apt-get
. Grub is the bootloader for most Linux systems, this problem likely would of been caused by the Debian Grub overwriting the Ubuntu Grub.
GRUB_TIMEOUT=0
. I may have just answered it for you :-) – Wilf Jan 28 '14 at 21:28