LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2004, 06:38 AM   #1
krazibon3
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Rep: Reputation: 0
attempting to dual boot winxp and fc 2?


I've just realised i've installed GRUB on the MBR when i wasn't suppose to after reading a number of threads. Now the thing is that before i installed FC2 i unplugged my sata HD which contained my windows xo pro OS.

When i replaced my sata HD the system booted straight to FC2.

How do i go abouts fixing the MBR back to windows? would having the sata HD not detected by fc2 during installation effect the location of the MBR or is the MBR located somewhere else on the computer say the motherboard?

i've tried running the recovery console in xp and typed "fixmbr" in the command line but nothing actually happed.

Tried following the instructions from a couple of links and had no success because a few of them are assuming that your are doing a fresh install of fc2.

and had no success, because i think this document is assuming that you haven't installed grub on the MBR and your doing a fresh install of fc2

I'm totally confused at the moment, would someone help me clear a couple of things up and fix this problem. I know for some its the hundredth time someone has asked this but i think the scenario i'm in is abit different.
 
Old 08-07-2004, 07:42 AM   #2
vkichu
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: RedHat, Mandrake (trying to)
Posts: 14

Rep: Reputation: 0
krazy bon 3 i had the same issue only difference is that i did not remove my hard disk or anything before i installed FC2, but i have been trying to install different type of bootloaders. I had windows 2000, win xp , FC2 and MDK 10.0 so do not panic. I will work with you to get your MBR fixed and get all the OS that you have come up from your bootloader.

First tell me how many hardrive do you now have. In order to find this out you need to boot from the installation disk (assuming that you have the installation disk with you) and go the rescue mode. go to command line and type fdisk, it it does not recognize fdisk command find where your sbin is located type" /sbin/fdisk -l" you will get the map of your hard drive lets start here.


Once you have this and when we know your hardrive partition information. You can start grub in command line and try to restore your MBR from there and get all the OS working.

there are two links that helped me really understand the way GRUB works

http://www.gnu.org/software/grub/man...ml#GNU%2fLinux
http://www.tldp.org/HOWTO/Linux+Win9...OWTO/proc.html


if you need to hide or unhide a partition use the commands below

grub> unhide (hd0,0) (hd0,0 - your first disk and first partition in machine)
grub> hide (hd0,1) ( hd0,1 - your first disk and second partition )


The following set of commands will let you bring up windows back again if it is installed in your 1st hard disk 1st partition.

grub> rootnoverify (hd0,0)
grub> makeactive
grub> chainloader +1
grub> boot


Hope this gives you a start
kris
 
Old 08-07-2004, 07:42 AM   #3
escargot22026
LQ Newbie
 
Registered: Aug 2004
Location: Virginia
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
Haha, yes. Grub can be one hell of a job to clean up, as I learned a couple days ago. My problem was slightly different, in that I wasn't trying to get rid of grub so that I could use WinXP on that hard drive, but I was trying to get rid of it so that I could install a different boot loader. Try each of the solutions, one is bound to work sooner or later.
http://www.linuxquestions.org/questi...hreadid=213813

Search the website before you ask questions

Good luck,
Edward S. Rice
 
Old 08-07-2004, 09:16 AM   #4
krazibon3
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks kris

I've three HD's 2 IDE's and 1 SATA HD, I'm using 1 hd and 1 sata for windows and the remaining one for linux.

ok i ran fdisk in rescue mode in linux and i got the following:

****************************************************************************

Device Boot Boot Start End Blocks Id
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1532 12201367 83 Linux
/dev/hda3 1533 1662 1044225 82 Linux swap


Device Boot Boot Start End Blocks Id
/dev/sda1 * 1 4865 39078081 c win95 FAT32 (LBA)
/dev/sda2 4866 9729 39070080 f win95 Ext'd
/dev/sda5 4866 9729 39070048 b win9 FAT32 (LBA)

Note: the third ide hd was detected but i don't think it would be relevant.

****************************************************************************

I've also looked in my grub.conf file and i got this:

****************************************************************************

default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.5.1.358smp)
root(hd0,0)
kernel /vmlinuz-2.6.5-1smp ro root=LABEL=/ rhgb quiet
intrd /initrd-2.6.5-1.358smp.img

title Fedora Core (2.6.5-1.358)
root(hd0,0)
kernel /vmlinuz-2.6.5-1smp ro root=LABEL=/ rhgb quiet
intrd /initrd-2.6.5-1.358smp.img

****************************************************************************

ok should i add the following lines into grub config:

title Windows xp Pro
rootnoverify(hd1,0)
makeactive
chainloader +1
boot

i just need confirmation before i cause anything messy

Last edited by krazibon3; 08-07-2004 at 09:22 AM.
 
Old 08-07-2004, 09:17 AM   #5
krazibon3
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
just wondering what do the commands "makeactive" and "boot" do in grub?

never mind i know what they do now just curious about me sata drive
seems like it works with IDE's

Last edited by krazibon3; 08-07-2004 at 09:45 AM.
 
Old 08-07-2004, 11:58 PM   #6
krazibon3
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
anyone?
 
Old 08-08-2004, 10:10 AM   #7
vkichu
LQ Newbie
 
Registered: Aug 2004
Location: USA
Distribution: RedHat, Mandrake (trying to)
Posts: 14

Rep: Reputation: 0
hey make active makes the parition that you set as root active and boot command is to reboot from the command line.

Were you able to bring your winows up,


This is grub.conf to boot windows, fedora and mandrake


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,6)
# kernel /vmlinuz-version ro root=/dev/hdb8
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd1,6)/grub/splash.xpm.gz
title Windows
rootnoverify (hd0,0)
chainloader +1
title Fedora Core 2 (2.6.5-1.358)
root (hd1,6)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img
title Mandrake 10.1
root (hd1,4)
kernel (hd1,4)/boot/vmlinuz-2.6.3-7mdk ro root=/dev/hdb5 quiet devfs=mount acpi=ht
initrd (hd1,4)/boot/initrd-2.6.3-7mdk.img




I think for your sata drive you should be able to start windows with something like this added to your grub.conf

title Windows
rootnoverify (sd0,0)
chainloader +1

did you check the grub website links i sent you, you should find some commands there on how to refer to your drive, for sata drives. I assuming it should be sd0,0 because your fdisk seem to understand the drive as 'sd' rather than 'hd' try either of them and one of them should work for you.

good luck

PS : refer to the grub manual to get a bettter understanding of how grub command works.
 
  


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
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
Need help fixing boot problem on Ubuntu/WinXp dual-boot Ay-Karamba! Linux - General 5 09-06-2005 09:20 PM
Attempting to dual-boot - Scariness Arienna Linux - Newbie 7 12-21-2004 02:48 AM
Need dual boot help...LILO..Winxp wont boot Scrag Linux - Hardware 2 09-01-2004 12:26 AM
Advice (and some) Needed: Dual-HDD, Dual-Boot - Linux, WinXP elnomadkvn Linux - General 1 03-28-2004 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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