Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

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: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows. 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
up vote 1 down vote accepted

Try with the chroot method : (Use all of these commands in root, or with sudo)

mount /dev/sda3 /mnt/
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
cp /proc/mounts /mnt/etc/mtab/
chroot /mnt /bin/bash
grub-install /dev/sda
share|improve this answer

You can always create a dual-boot using Windows boot manager.

Adding an entry for Ubuntu goes like this:

  1. Copy from Ubuntu "/boot/grub/boot.img" to say Windows "c:\" (you can use "ext2fsd" utility in Windows to access Ubuntu file system)
  2. Create in Windows BCD a boot sector loader pointing to c:\boot.img

reference - Dual-boot Windows 7 and Linux or Unix

share|improve this answer

sudo grub-install /dev/sda Since GRUB is installed in the MBR of the drive, and not on a partition.

share|improve this answer
I get the very same error. I am running Linux now from a bootable USB. Could it be the issue?? – sriramn Sep 11 '12 at 8:35
@RazorXsr check your device is right when booting from usb, i.e. it's still sda. You google it with the error msg. – llhuii Sep 11 '12 at 8:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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