LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 02-29-2008, 06:05 AM   #1
satyakb
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?


Hi,

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
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,407

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
google is your all knowing friend... http://www.google.co.uk/search?sourc...e+Search&meta=
 
Old 02-29-2008, 12:46 PM   #3
ernie
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.

HTH,
 
Old 03-11-2008, 08:01 AM   #4
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

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

boot it

open shell

Code:
su
grub
root (hdx,y)
setup (hd0)
quit
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 ....you get the idea

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

Original Poster
Rep: Reputation: 0
Smile

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
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,848

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

http://linuxhelp.blogspot.com/2005/1...-and-boot.html
 
  


Reply


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


All times are GMT -5. The time now is 01:42 PM.

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