Need help with grub

i currently have FC5 installed on my second harddrive(slave) and windows XP installed on my first harddrive. The BIOS is currently set boot from the second drive. I need help to add Windows XP to the grub bootloader on the second drive because the XP drive was disconnected during the FC5 installation.

Everything Linux 1798 This topic was started by ,


data/avatar/default/avatar24.webp

3 Posts
Location -
Joined 2006-06-11
i currently have FC5 installed on my second harddrive(slave) and windows XP installed on my first harddrive. The BIOS is currently set boot from the second drive. I need help to add Windows XP to the grub bootloader on the second drive because the XP drive was disconnected during the FC5 installation. I want to leave my nt boot loader intect.
 
Here is my current grub setup:
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.15-1.2054_FC5)
root (hd0,0)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5.img
 
could some kindly tell how to add XP to it?
 
Thank you

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
Excuse my frustration with this response, but I have answered this question multiple times on many threads.
 
I really have to compile an article about this and use it for reference.
 
1. There is no need to disconnect the XP drive before installing Fedora. By doing this, you have allowed Grub to install as if this was the only drive in the system. Therefore Grub is configured without adding XP to the mix.
 
2. There are methods to add Linux to be referenced in the Windows boot.ini file, but this requires some knowledge of Linux and command line usage. The easier way to have done this would be to allow Grub to boot both operating systems, as Grub is designed to do this more easily.
 
3. Now you place the Windows drive back into the system and Windows has no way to boot. If you add the usual entries to boot Windows to grub manually, the boot.ini file fails, because you have configured Grub as if there is one drive on the system.
 
The bios boot order is changed to boot from the second drive and when grub goes to boot Windows and invoke the boot.ini it fails. This is because the boot.ini looks for the Windows files on the first drive detected in the bios. You changed this in the bios, so the essentually the first drive sensed is the one that you set the bios to boot first, the Fedora drive.
 
So, you can't expect to change hardware configurations, or remove a drive and replace it, then expect everyting to work, as if you did not change it.
 
How to fix it? Well, how comfortable are you with command line usage in Fedora?

data/avatar/default/avatar24.webp

3 Posts
Location -
Joined 2006-06-11
OP
thank you your reply.
 
I dont care which HDD the PC boots from aslong the XP drive has the NT loader, if i changed the bios to the xp can i use something like bootpart to add GRUB the to NT loader and would fedfora still boot if the boot order was chaged? or can i somehow add the NT loader to GRUB and if i did would XP still boot with the Fedora drive first prefence in the bios? or is there a way to pick whic HDD to boot from without entering to BIOS? I wouldn't normally install Fordora without windows drive but the windows drive was in another computer at the time.
 
Thank you for helping

data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
Quote:I wouldn't normally install Fordora without windows drive but the windows drive was in another computer at the time.

OK, now more information comes out. The XP drive was installed on another system, correct? Then you moved it to the current Fedora system.

Previously, you noted;

Quote:i currently have FC5 installed on my second harddrive(slave) and windows XP installed on my first harddrive. The BIOS is currently set boot from the second drive. I need help to add Windows XP to the grub bootloader on the second drive because the XP drive was disconnected during the FC5 installation. I want to leave my nt boot loader intect.

This led me to believe that you disonnected the XP drive from this system and installed Fedora. Fedora has always been jumpered as the primary slave drive on this system, correct?

So, now the XP drive is primary master, and the Fedora is primary slave.

You can do either of what you suggested. Add an entry for Fedora in the Windows boot.ini after copying the first 512 kb of data from the Fedora drive to the XP drive, as a file reference to the boot.ini. This assumes that you are comfortable with command line usage in Linux and can do the steps necessary. This way, the XP drive is the boot drive and the "NT" bootloader is intact.

The other option is to keep the second (Fedora} drive as the boot drive in the bios and "fake" grub to reverse the drive designations and XP will boot properly.

The latter option also requires that you also make a change to Fedora's /boot/grub/device.lst file, so that it knows that the drive is there and can be referenced in Grub.

There is a possible third option. You can pop in the first installation disk of Fedora, get into rescue mode and "recheck" grub, so that it sees the windows drive and hopefully picks up the XP installation, Making a grub entry to boot Windows.

The last option is to get a boot manager that will see both installations. I think you were referring to this. This option also assumes that the drives are in the correct order on the system. I never needed one myself, so I can't comment totally from experience.

Which is your pleasure?

Also realize, that XP can be a problem when putting a hard drive from one system to another. On most XP installations, XP will not boot if it senses a significant change in system hardware. This is by design. Legal copies of XP do this, as you have only a license for XP on one system. I had this happen to me when I added a hard drive to my system. A real pain in the neck!

I assume that XP is booting OK now if the bios order is changed to make it the primary drive to be booted?

data/avatar/default/avatar24.webp

3 Posts
Location -
Joined 2006-06-11
OP
i got it to work, all i had to do was add the following to grub:
 
title Windows at hdb1
rootnoverify (hd1,0)
chainloader +1
 
The XP drive was used on this computer but was taken out to copy files over to another computer (via a ide to usb converter), during that time i added another drive to my PC and installed FC5 on it and yes the Fedora drive is slave because i dont have a jumper for it and its default setting slave.
 
So now have it working exacly how i want it to, the Fedora drive as the boot device. Leaving the boot.ini intact. both fedora and windows are fully working.
 
with i XP i think u can have 3 major hardware changes before u need to reactivate and all u have to do is ring techsupport and tell them what has happened and they'll give a code.
 
Thank you very much for helping