LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-12-2005, 12:33 PM   #1
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Rep: Reputation: 30
reinstalling windows deleted my grub master boot file; how do I restore it?


Typical microsoft errors forced me to reinstall windows XP. I didn't realize that it would write over my master boot file which allowed me to dual boot into windows and into linux (fedora if it matters). Is there a way to restore this without reinstalling fedora? I have a lot of data on my fedora partition that has not been backed up.

I should mention that I do not have a floppy drive installed on the computer.

Thanks all!

Last edited by sohmc; 01-12-2005 at 12:37 PM.
 
Old 01-12-2005, 12:53 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
You can just reinstall grub on the mbr:
1) Boot with FC CD1 and enter rescue mode by entering "linux rescue" at the "boot:" prompt
2) Once you are in a bash shell you can cahnge to your live partition with "chroot /mnt/sysimage"
3) Reinstall grub with "/sbin/grub-install /dev/hda"
4) Exit and reboot "exit;reboot"
 
Old 01-12-2005, 12:55 PM   #3
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
It's fairly easy to reinstall the grub stage1 to the mbr. You'll need to boot into some sort of linux and run grub. Does fc still support booting into rescue mode from cd 1? Anyway from the bash prompt run:

grub
root (hdn,m)
setup (hd0)
quit

n,m being the appropriate numbers.

root(hdn,m) points to the partion containing the menu.lst/grub.conf you are using.

setup (hd0) writes to the mbr of hd 0.
 
Old 01-12-2005, 01:27 PM   #4
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Original Poster
Rep: Reputation: 30
You guys are fricken' AWESOME!

Thanks guys. LQ is great. I'll let you know if it works.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
restore deleted rc.conf file fraggelfraggel *BSD 7 10-22-2005 11:53 PM
How to remove Linux and restore Windows on Dual boot using Grub TheBaffledKing Linux - Newbie 13 04-14-2004 05:47 AM
Backup/Restore Master Boot Record marktin Linux - General 8 04-05-2004 02:35 PM
How to restore a deleted file satimis Linux - Newbie 1 09-12-2003 04:18 AM
restore back deleted file edreddy Linux - General 4 07-19-2002 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration