Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.


  Search this Thread
Old 02-29-2008, 06:05 AM   #1
LQ Newbie
Registered: Nov 2007
Location: Bangalore, India
Distribution: Mandriva 2008
Posts: 13

Rep: Reputation: 0
Question How do I re-install Grub onto the MBR?


My system is a dual boot with Mandriva 2008 and Windows XP. While repairing Windows, the MBR (Master Boot Record) was over-written with the Windows Loader. Although Linux still exists on the disk, the link to it is lost.

Is there a way I can get the link to Linux back? By re-installing Grub perhaps?
Old 02-29-2008, 06:08 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
google is your all knowing friend...
Old 02-29-2008, 12:46 PM   #3
Senior Member
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
Boot the computer from the Mandriva Installation disk. At the first screen (text screen) enter rescue then press the ENTER key. This will start a system rescue session.

As a first attempt select the Repair Boot Loader menu item.

If that fails, select the Mount Your Local Partitions item, then try the repair item again.

If that fails, I'm out of solutions. I use Lilo here because I do not dual boot (Mandriva is the only OS on my system) and I have used it for ever (nearly ten years - since fall 1998) so I am unfamiliar with the grub boot loader.

This part will not help you, but may be useful to someone else:

If Lilo is the boot loader in use, after mounting your local partitions (as above), select the Start a terminal session menu item.

Run the following command: (assumes the system partition is mounted at /media/hda1)

chroot /media/hda1

Run the lilo command to rebuild your lilo boot loader.

Close the chroot session with the CTRL+D key combination.

Remove the disk and run the reboot command to restart the computer.

Old 03-11-2008, 08:01 AM   #4
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,283

Rep: Reputation: Disabled
the best way is to always have a live cd....

boot it

open shell

root (hdx,y)
setup (hd0)
you need to know your x,y as per my signature.

windows is likely to be on first partition which is (hd0,0) so linux is on something else.

if you do not remember how you partitioned.....the live cds have partition tools included
gparted qtparted fdisk cfdisk sfdisk get the idea

and for beginners qtparted will give a graphical view....but do not click on apply button...which makes go in and have a look ...write down details and post back pls
Old 03-12-2008, 01:27 AM   #5
LQ Newbie
Registered: Nov 2007
Location: Bangalore, India
Distribution: Mandriva 2008
Posts: 13

Original Poster
Rep: Reputation: 0

Thank you all for the replies. I've been caught up with work since some time and haven't had a chance to implement any of the solutions. Will do so ASAP and update the thread.

Thanks once again.
Old 04-11-2008, 10:50 AM   #6
LQ Guru
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,163

Rep: Reputation: 522Reputation: 522Reputation: 522Reputation: 522Reputation: 522Reputation: 522
Here is a nice write up on how to recover.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
re-install grub to mbr nomb Fedora 1 11-19-2007 10:09 AM
Grub won't install in MBR PB0711 Linux - Software 4 05-02-2007 01:12 AM
How to install Grub other than MBR? terryxela Ubuntu 1 04-08-2007 04:31 PM
how do i install grub in the mbr? spyghost Linux - Newbie 2 11-07-2003 09:52 AM
GRUB Install on MBR JakeFarley Linux - Newbie 3 10-22-2002 07:16 AM > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration