Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
Sign in to follow this  
bamboccio

Reinstalling Grub on 2010.1 [solved]

Recommended Posts

Hello,

 

I have an installation of 2010.1 and I would like to reinstall grub which has been deleted by mistake while trying to repair a windows install on another HD. Any easy way of doing so?

 

Thanks!

 

 

[moved from Installing Mandriva by spinynorman]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×