Grub not loading after Windows 8 Install

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!

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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

Method 2

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

Method 3

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


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x