0

I have windows 7 installed on C drive and Ubuntu 14.04 on another one. When I boot I got into grub rescue. Luckily I've found the solution ( somewhere on stackoverflow) to "mount" drive manually by

grub rescue > ls (hd1,msdos5) # let's assume this is the linux partition
grub rescue > set root=(hd1,msdos5)
grub rescue > set prefix=(hd1,msdos5)/boot/grub # or wherever grub is installed
grub rescue > insmod normal # if this produced an error, reset root and prefix to    something else ..
grub rescue > normal

and then I am able to boot either in Windows or Ubuntu. From my research I suspect that boot loader cannot find boot files from Ubuntu drive, but I am unsure how to fix this. I also tried grub repair but to no avail.

My question is what can I do to make computer locate correct boot files for ubuntu ?

Thanks in advance!

Gnattuha
  • 105
  • have you tried to run sudo update-grub after signing into Ubuntu? – mchid Jan 13 '15 at 03:17
  • I tried but the problem persists... – Gnattuha Jan 13 '15 at 03:37
  • what does the output from update-grub display when you run the command – mchid Jan 13 '15 at 03:49
  • Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.13.0-44-generic Found initrd image: /boot/initrd.img-3.13.0-44-generic
    Found linux image: /boot/vmlinuz-3.13.0-43-generic
    Found initrd image: /boot/initrd.img-3.13.0-43-generic
    Found linux image: /boot/vmlinuz-3.13.0-32-generic
    Found initrd image: /boot/initrd.img-3.13.0-32-generic
    Found Windows 7 (loader) on /dev/sda2
    Found Windows 7 (loader) on /dev/sda3
    done
    – Gnattuha Jan 13 '15 at 04:02
  • 1
    If you have multiple physical drivers, could it be that grub is installed on both drives, but you are booting into the one that is on the windows drive (and thus sudo update-grub can't update it)? – T0xicCode Jan 13 '15 at 05:54
  • That would be a very logical explanation. Any ideas how to make sure correct grub is used during boot? – Gnattuha Jan 13 '15 at 09:18

1 Answers1

0

So then I would like to direct your attention to this post: repair-grub

It is a very popular question (not the same problem as you, but...) where somebody answers in detail how to repair a destroyed GRUB installation. He therefore updates the config files and rewrites GRUB into the disc's bootsector. Maybe this is something you should try too, though it looks like you have to spend a nice amount of time for it and net a live-cd.

Let me know if this finally helped you, it is my last idea for the moment. Greetings and good luck!

Byte Commander
  • 107,489