Jump to content

Reinstalling Grub on 2010.1 [solved]


bamboccio
 Share

Recommended Posts

Yes, you can boot into rescue mode from a Mandriva CD. You will need to know of course, which partition is your / and also /boot if you have it separately, but probably you have everything under /. Here is an example of how I would do it. Replace my partition in my example with your / partition. In my example, /dev/sda2 is my / partition.

 

mkdir /mnt/mandriva
mount /dev/sda2 /mnt/mandriva
mount -t proc proc /mnt/mandriva/proc
mount -o bind /dev /mnt/mandriva/dev
chroot /mnt/mandriva /bin/bash
source /etc/profile

 

alternatively, if you have a problem with the chroot command I just gave, just change it slightly:

 

chroot /mnt/mandriva
source /etc/profile

 

of course, still mounting all the stuff as previously mentioned. That will get you into an environment for reinstalling grub, then all you need to do:

 

grub
root (hd0,1)
setup (hd0)

 

and that will do the grub part. Grub should be installed to the MBR, and you can now reboot. Remember the hd0,1 is specific to the partition, so for example:

 

/dev/sda1 = hd0,0
/dev/sda2 = hd0,1
/dev/sda3 = hd0,2
/dev/sda5 = hd0,4

 

and so on. You will know if you found it correctly. Maybe / on your system is /dev/sda5 but I cannot be sure of it. You can verify all of this in /boot/grub/menu.lst because it will show the root in there with hd0,1 or whatever.

 

Once you have done that, exit cleanly from the chroot environment.

 

exit
umount /mnt/mandriva/dev /mnt/mandriva/proc /mnt/mandriva

 

and reboot.

Link to comment
Share on other sites

Thank you for the prompt reply!

 

One more question, I have a live CD of 2010.0 (not 2010.1 !), do you think I can use that one, boot in live mode and enter the grub command from there hence avoiding the need to do all the mount stuff? Once I am back in my installationhen I would reinstall grub from 2010.1 .

 

Thank you!

Link to comment
Share on other sites

Yes, you can. It doesn't matter on the CD. It could be Ubuntu, or even Gentoo. Just need to chroot like I mentioned, and you can do all you need.

 

Unfortunately, you will have to type it as I said. You won't be able to do it easily in a GUI way. It's not complicated to type and mount as I mentioned.

Link to comment
Share on other sites

Hello,

 

I managed to reinstall Grub, thank you! I used the install disk and went to the system repair section. In there there is an option to reinstall Grub, I used it and it failed because there where 2 hard disks installed and Linux was on the second one. So I unplugged the first hard disk (the one containing Windows) and repeated the procedure and it worked like a charm!

 

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...