LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-15-2007, 09:48 PM   #1
germansailor
LQ Newbie
 
Registered: Dec 2006
Location: india
Distribution: fedora core 6
Posts: 17

Rep: Reputation: 0
Unhappy Grub Help winxp screwed


Hi I have windows Xp and fedora core 6...My win xp is not working so i want to reinstall it now...
So xp as it always does will overwrite the MBR....now wat can i do to install grub in mbr again
My grub file looks like this

1 # grub.conf generated by anaconda
2 #
3 # Note that you do not have to rerun grub after making changes to this file
4 # NOTICE: You do not have a /boot partition. This means that
5 # all kernel and initrd paths are relative to /, eg.
6 # root (hd0,10)
7 # kernel /boot/vmlinuz-version ro root=/dev/hda11
8 # initrd /boot/initrd-version.img
9 #boot=/dev/hda
10 default=2
11 timeout=7
12 splashimage=(hd0,10)/boot/grub/splash.xpm.gz
13 hiddenmenu
14 title Fedora Core (2.6.20-1.2944.fc6)
15 root (hd0,10)
16 kernel /boot/vmlinuz-2.6.20-1.2944.fc6 ro root=LABEL=/ rhgb quiet
17 initrd /boot/initrd-2.6.20-1.2944.fc6.img
18 title Fedora Core (2.6.18-1.2798.fc6)
19 root (hd0,10)
20 kernel /boot/vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet
21 initrd /boot/initrd-2.6.18-1.2798.fc6.img
22 title Windows Xp Sp2
23 rootnoverify (hd0,0)
24 chainloader +1




Please Help
Thanx in advance
 
Old 05-16-2007, 07:01 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Boot from the Installation media into rescue mode; linux rescue
Answer a few questions and follow the on screen message about using chroot
When ready type something like: /sbin/grub-install --recheck /dev/hda
 
Old 05-16-2007, 07:26 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You can make a grub floppy also (not a bad thing to have around).
This might be helpful
 
Old 05-16-2007, 10:01 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
You could also save a copy of the MBR:
Code:
dd if=/dev/hda of=/boot/mbr.01.dd bs=512 count=1
(Assuming "root (hd0,10)" ==> hda11.)


Then, after XP hoses it:
Code:
mount /dev/hda11 /mnt/hda11
dd if=/mnt/hda11/boot/mbr.01.dd of=/dev/hda bs=512 count=1
Of course, you may have to adjust "if=/mnt/hda11/boot/mbr.01.dd", depending on how you boot to do the restore.

And there is nothing magic about my choice of file name.
 
Old 05-18-2007, 11:39 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I once passed these instructions in another thread, did not get a response. I think the poster preferred to have the Vista boot loader and did not try it. But here are the instructions using the FC6 install disc:

Boot from Fedora Core Linux 1st CD or DVD and type the following commands at shell prompt:
Code:
boot: linux rescue
Just follow on screen instructions, when prompted let installer search Linux installation. If the search operation is successful, your Linux installation will be available at special directory called /mnt/sysimage.
Prepare system for GRUB reinstallation
Code:
# chroot /mnt/sysimage
# cd /boot/grub
Install grub to the drive set to boot in the bios (normally the primary drive), if it is the first drive which is a SATA (SCSI) drive, use this command (replace 'sda' with 'hda' for ATA IDE drive):
Code:
# grub-install /dev/sda
If above command returned any error, return with –recheck option to probe a device map even if it already exists:
Code:
# grub-install --recheck /dev/sda
Exit from chrooted enviroment and reboot Linux:
Code:
# sync;sync;exit;exit
# reboot
 
  


Reply



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
Please help me get back into WinXP. I screwed up Grub Boot Loader deived Linux - Newbie 8 10-31-2008 09:23 PM
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
reinstalling winXP on an existing dual boot system with winXP and FC4 grub not workin champion Fedora - Installation 3 02-13-2006 02:37 PM
Help! need to rescue files from RAID array that winXP Pro screwed up!! newellrp1 Linux - Hardware 3 04-30-2004 03:33 PM
i got RH8 & WinXP installed and properly working by GRUB. how can i reinstall WINXP? kublador Linux - Newbie 4 06-23-2003 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:54 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