After Windows XP installed on 2nd drive can no longer boot Fedora core 4
I have a PC with 2 drives. Drive /dev/hda is 80 GB and has, or at least used to have, Fedora Core 4 installed on it. Drive /dev/hdb is a 180 GB drive that used to be a data storage drive mount as /data under linux. I needed to install Windows XP so I opted to install it on the 2nd, larger drive (/dev/hdb). After doing so Windows XP runs fine (or at least as good as one can expect) but I can no longer boot into linux.
While installing XP a comment (which I neglected to write down) came on the screen saying something about the boot partition. I suspect it was warning me that Windows was about to have its way with my computer (i.e. screw up my linux installation). Now I cannot boot into linux any more and I suspect the Windows XP installation took over the boot process, possibly wiping out my grub boot loader (or some such thing).
I booted the system with a Fedora Core 4 CD (rescue mode) and was able to run fdisk. Here is what I get (summarized):
/dev/hda1 Dell ID="de"
/dev/hda2 * W95FAT32 ID="b"
/dev/hda3 Linux ID="83"
/dev/hda4 Extended ID="5"
/dev/hda5 Linux LVM ID="8e"
The setting of /dev/hdb seems reasonable as I specified that Window XP create a single large partition. The settings of /dev/hda are puzzling, at least to me. When I do a "ls" of /dev/hda3, which is mounted on /mnt/sysimage/boot I see the vmlinuz files and other files that make me suspect it is the original linux boot partition. However, as is seen above, the 2nd partition (/dev/hda2) is marked as the bootable partition and is of type W95 FAT32.
I tried mounting some of the other partitions on /dev/hda but the mount command fails with Input/ouput errors. I was tempted to change the partition IDs (to linux/83) to see if I could then mount them but I'm concerned that doing so may corrupt the partitions and cause me to loose my linux file system.
Any recommendations for recovering from this state will be much appreciated.
Thanks in advance!
Grub reinstall, MBR and bootable disk partition help
Thanks for the inputs received thus far. I have a few more questions as follows:
1. If I execute grub-reinstall /dev/hda my understanding is that it will replace the MBR. How does this interact with the partition /dev/hda2 that is marked as the bootable partition?
2. Since my linux boot files (e.g. vmlinuz*) are in /dev/hda3, should I make hda3 the bootable partition? More generally, does it really matter what paritition is marked bootable when grub is installed in the MBR? I ask this because if the MBR code is executed first, and it contains grub, and grub is designed to allow booting of one of multiple OS's, then it would seem that whether a partition is marked bootable or not is irrelevant.
Problems solved - Thank you!
My system is functioning properly again (i.e. able to dual boot between Fedora Core 4 and Windows XP). I tried reinstalling grub on the MBR of the first drive (/dev/hda) but upon reboot I was getting a kernel panic (I think there were problems due to the fact that my root partition is located on a logical volume but who knows). So I finally gave up and ran the install process again with the "upgrade" option. After this the system would boot into linux but not Windows. I figured out that I needed to edit the grub.conf file so that for Windows booting it would point to the 2nd (FAT32) parition on my first drive (/dev/hda) which is marked as a bootable partition even though XP is installed on my 2nd drive (/dev/hdb). I'm guessing that grub's "chainloader +1" command causes grub to redirect booting to the FAT32 bootable partition on /dev/hda which in turn redirects the Windows boot process to the second drive (/dev/hdb).
Anyway, my problems are solved. Thanks to everyone who weighed in with helpful comments and suggestions!