Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How can I repair grub? (How to get Ubuntu back after installing Windows?)

My system was configured to dual boot Ubuntu 12.04.1 LTS and Windows 7. Today I got my hands on the MSDN release of Windows 8 and I installed it over my Windows 7. Now the computer just boots to Windows 8 directly without loading the GRUB screen.

So I followed the steps as suggested in: Running this command:

    ls -l /dev/disk/by-label/

gives the following output:

    total 0
    lrwxrwxrwx 1 root root 10 Sep 11 07:51 Entertainment -> ../../sda2
    lrwxrwxrwx 1 root root 10 Sep 11 02:45 PENDRIVE -> ../../sdb1

Also fdisk -l command gives this as the output:

    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x1246aa23

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   319582199   159790076    7  HPFS/NTFS/exFAT
    /dev/sda2       319582208   602906623   141662208    7  HPFS/NTFS/exFAT
    /dev/sda3       602908672   625135615    11113472   83  Linux

    Disk /dev/sdb: 1939 MB, 1939865600 bytes
    64 heads, 63 sectors/track, 939 cylinders, total 3788800 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: 0xc3072e18

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        2248     3788799     1893276    c  W95 FAT32 (LBA)

So I assume that I have to run this: sudo grub-install /dev/sda3 to get GRUB up and running. But I am getting this error:

    /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).

Can anyone please guide me in the right direction? The current Ubuntu installation is far too customized to my needs to lose it to a boot manager issue! Any help is much appreciated!

share|improve this question

marked as duplicate by Eliah Kagan, Jorge Castro, fabricator4, stephenmyall, hhlp Jan 11 '13 at 10:50

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.

The GRUB needs to reside in front of all partitions on the device, therefore you should run

sudo grub-install /dev/sda

whereas using /dev/sda3 would install it only to the third partition. See the guide Recovering Ubuntu After Installing Windows you referred to:

From here, find only the drive name, ignore the partition number, that is, for partitions labeled "root", "data2", "fat", "home" and "swap" it's all still just sda. This is due to the fact that GRUB is installed in the MBR of the drive, and not on a partition.

share|improve this answer

You might have to run

sudo grub-install /dev/sda

instead. It will find your /boot/ folder on any of the partitions.

If this does not work, you can try the following (assuming you do not have a separate boot partition, as it should show from your commands):

Boot into the live cd and open a terminal.

sudo mount /dev/sda3 /mnt

This will mount your ubuntu install to /mnt

Then run this command

sudo grub-install /dev/sda --root-directory=/mnt/boot/

This will tell grub that it should install grub to sda, and that it should not look for /boot/, as this is located on sda3.

share|improve this answer
When I try to mount the drive it says I have to specify the filesystem type. Any suggestions? – RyanJM Jul 26 '13 at 18:29

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