How to repair grub2 in MBR? win7/10.10 dual boot.
Hi everyone, I apologize for re-posting what seems to be a common problem. I have a win7/10.10 dual-boot set up, more or less following the lifehacker.com tutorial (I know, I know). I had to reinstall windows, and its taken over the MBR so that only win7 boots now. My shared drive and the ubuntu filesystem are still there, I just can't get to them without a boot cd. So, I tried to follow the tutorials, which all basically say to reinstall grub or grub2. I tried one method, but ubuntu told me that installing grub2 anywhere but the MBR was a bad idea. Ok...so how do I do this so that ubuntu and win7 stay happy, but I get my grub menu back? Thanks in advance.
|
Have you tried
"sudo os-prober" and "sudo update-grub" ? Is your ubuntu desktop or server edition? |
You have reinstalled Win 7 , so Grub is gone I assume .
So you do not have a other option than reinstalling GRUB . After that if windows does not appear run the command susdo update-grub If windows 7 is capable of booting UBUNTU than you can install GRUB on the root partition UBUNTU and let WIndows do the booting . But do not ask me how , I do not use windows,. |
boot ur ubuntu cd/dvd then select the rescue mode (there should be something like that)..
if the disk image is mounted under some other path then #chroot "path" eg. #chroot /mnt/sysimage #grub grub> root (hdX,Y).... this is where ur linux is (hd0,0) for 1st part. (hd0,1) for 2nd part and so on grub> setup (hdX) ..... usually (hd0) exit and reboot |
Quote:
Code:
grub-install /dev/sda3 Code:
grub-install /dev/sda |
Hi all,
Thanks for your responses. I've tried a lot different tutorials, and I'm not sure what I'm doing wrong. Here are the results of os-prober, and just trying to update grub. Code:
ubuntu@ubuntu:~$ sudo os-prober Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes Code:
sudo mount /dev/sda thanks again from the n00b PS...only win7 loads... |
Ok...
so...I ran this code successfully sudo grub-install --root-directory=/mnt /dev/sda this now borked the system completely as win7 now does not load either and I just get a black screen where the boot menu would have been |
forget it, went nuclear and just re-did the linux install, all seems to be well. I really wanted to fix it though...
|
Have a read of this.
For future reference take particular note of section 12 - of the options presented, I prefer method 3, the chroot. Note that you mount partitions (or directories), not device(s). |
Solution for newbie's
This might help someone who come across this thread ,,
ssatish.wordpress.com/2013/01/11/how-to-re-install-grub-2-in-mbr-from-ubuntu-live-disk/ |
All times are GMT -5. The time now is 10:41 AM. |