Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 05-15-2007, 09:48 PM   #1
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 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
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: 57
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
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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
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:
dd if=/dev/hda of=/boot/mbr.01.dd bs=512 count=1
(Assuming "root (hd0,10)" ==> hda11.)

Then, after XP hoses it:
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:
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
# 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):
# grub-install /dev/sda
If above command returned any error, return with –recheck option to probe a device map even if it already exists:
# grub-install --recheck /dev/sda
Exit from chrooted enviroment and reboot Linux:
# sync;sync;exit;exit
# reboot


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
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 > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 02:30 PM.

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