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.

This question already has an answer here:

I installed Windows 8.1 after Ubuntu 12.04.

Now, grub does not shows up any more! It's goes straight to Windows after turning my PC on.

Grub gone after installing Windows 8.1

Please tell me what should I do to turn grub back ?

Any helps would be awesome.

share|improve this question

marked as duplicate by Danatela, Warren Hill, Eric Carvalho, Radu Rădeanu, BuZZ-dEE May 13 at 19:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers 4

up vote 2 down vote accepted

You just need to install grub again with an Live CD. This link could help you

share|improve this answer

use easy.bcd in windows.download easy bcd from Internet run it on your windows now from the side bar select add new entry then go to Linux in upper tabs select grub 2 write name Ubuntu and select add it's done. now whenever you boot from next time you will see two options name windows8 and ubuntu select that one in which you want to go

share|improve this answer
can you include a link in your answer to the program you are recommending? –  Wouter Dec 16 '13 at 10:28
I had this problem too, I booted into BIOs then went to the "Starup Order" tab. There I saw "Windows Boot Loader" as position 1 and "ubuntu" in position 2. Switch the order, save and exit. And you'll see the grub again! :D –  chris Dec 29 '13 at 2:06

You can re-install grub in the Master Boot Record using the LiveCD for you distribution version,

It goes like this:

  1. Boot from LiveCD ⋯ please try to use a LiveCD that has the same version of Grub2 as the installed version

  2. Mount the root of the installed Ubuntu at /mnt

  3. Change root

  4. Update grub

  5. Install grub

  6. Reboot

The above steps are from near the bottom of the Ubuntu Community Documentation of Grub2

After booting from the liveCD ( select "Try Ubuntu" on the opening screen). Then start up a terminal (dash, type-in terminal, … )…

It may be easier to open this web page while running LiveCD. Firefox should allow you to do this.

Type in the terminal run: sudo fdisk -l

⋯ and enter your password if asked. That's a lower case L ⋯ Find the installed Ubuntu partitions, (from mine with other disks snipped ― here):

me@mycomputer:~$sudo fdisk -l

Disk /dev/sde: 300.1 GB, 300089646592 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586112591 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3f5ebeb

Device    Boot      Start         End      Blocks   Id  System
/dev/sde2       138464296   586110975   223823340    5  Extended
/dev/sde3   *        2048   138463231    69230592   83  Linux
/dev/sde5       138464298   313460279    87497991    7  HPFS/NTFS/exFAT
/dev/sde6       313460736   317650943     2095104   82  Linux swap / Solaris
/dev/sde7       317652992   581922815   132134912   83  Linux
/dev/sde8       581924864   586110975     2093056   82  Linux swap / Solaris

Partition table entries are not in disk order.

Find your Linux installation (Id=83, System=Linux0) then type in:

sudo mount /dev/sde3 /mnt

⋯ but use your partition instead of /dev/sde3 (my root partition is sde3, sde7 is my home partition)

This is assuming that you do not have a separate /boot partition. If you do, you will need to also mount it by typing:

sudo mount /dev/sd··/mnt/boot

Where sd·· is the partition where you installed the separate boot directory.

Checking if I got it right:

sudo ls /mnt  

me@mycomputer:~$ sudo mount /dev/sde3 /mnt
me@mycomputer:~$ sudo ls /mnt
bin   cdrom  etc   initrd.img      lib         media  opt   root  sbin     srv  tmp  var      vmlinuz.old
boot  dev    home  initrd.img.old  lost+found  mnt    proc  run   selinux  sys  usr  vmlinuz

You should test to see if the boot directory is properly installed. Type in:

sudo ls /mnt/boot

If it is empty, the boot directory is not installed. It should look something like this:

me@mycomputer:~$ sudo ls /boot
abi-2.6.35-30-generic     initrd.img-2.6.35-30-generic  System.map-2.6.35-31-generic
abi-2.6.35-31-generic     initrd.img-2.6.35-31-generic  vmcoreinfo-2.6.35-30-generic
config-2.6.35-30-generic  memtest86+.bin                vmcoreinfo-2.6.35-31-generic
config-2.6.35-31-generic  memtest86+_multiboot.bin      vmlinuz-2.6.35-30-generic
grub                      System.map-2.6.35-30-generic  vmlinuz-2.6.35-31-generic

Type in:

sudo for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done

Change the root:

sudo chroot /mnt

Now update grub:

sudo update-grub

In my case:

me@mycomputer:~$ sudo for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
me@mycomputer:~$ sudo chroot /mnt
me@mycomputer:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-13-generic
Found initrd image: /boot/initrd.img-3.0.0-13-generic
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdc1

Now to re-install grub in the MBR you will need to know which disk your system boots from, and find it in the fdisk -l listing you have already done. Then type in:

sudo grub-install /dev/sd·

Replacing sd· with the disk you will boot from.

Then type in Crtl-D to exit chroot.

Then type in:

sudo for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done

If you mounted a separate /boot partition, type in:

sudo umount /mnt/boot

Then type in:

sudo umount /mnt

Then to restart the system (remember to remove the LiveCD) type in:

sudo reboot

Hopefully, grub will be installed.

share|improve this answer

There is a much easier method if you don't have a LiveCD on hand. Just go to your Bios settings and put Ubuntu back into the first boot slot. It takes about five seconds. If you have UEFI activated then you'll have to log on to Windows and reboot into the Bios, but it's not hard.

share|improve this answer

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