After much frustration and searching (thats another story) I was able to get the live fedora 9 CD to boot and installed the OS that way. Apparently I wasn't paying attention and told it to install grub on the boot sector for the second drive. So when I restarted it booted directly into windows as if nothing had happened. I was able to press F12 and use the BIOS's built-in boot manager to select the second hard drive and boot into linux that way. For a while that was fine but then I decided that I would load grub into the MBR so that I could easily select which OS to boot. I did it using the grub-install command
grub-install /dev/sda1
Oops! I just overwrote the boot sector of the windows partition. Consequently this also made it impossible to mount the ntfs partition or boot at all. When trying to boot the MBR all that was displayed was 'GRUB'.At this point I was pretty sure that I had lost everything on the windows drive and would have to re-install Windows. I just happened to stumble across a post by a guy who had a similar problem and he described how he fixed it using the Windows 98 SE boot disk. This gave me the idea to use the Windows install CD and the recovery console.
Solution
Step 1: | Insert the Windows XP install CD and restart the computer. If your computer uses SATA with AHCI you will either need to set it to compatability mode in the BIOS or create a slipstream disk with the SATA drivers |
Step 2: | When the setup finishes loading drivers it will ask you if you want install the Windows XP operating system or if you want to use the Recovery console. Press R to enter the recovery console. |
Step 3: | Use the fixmbr command to fix the master boot record. fixmbr |
Step 4: | Use the fixboot command to fix the boot sector of the drive. fixboot c: |
Step 5: | Exit the Recover console to restart the computer. exit If you set the SATA to compatability don't forget to set it back in the BIOS. |
Step 6: | Boot into Linux and bring up the terminal. Run the grub console. grub |
Step 7: | Set the root linux partition using the root command. The root partition is set using the hard drive number. For my system linux was installed on the second hard drive (hd1) and the first partition on that hard drive (0). root (hd1,0) You'll know you selected the correct partition when the grub console responds telling you it found the filesystem ext2fs. |
Step 8: | Tell grub to setup the MBR. setup (hd0) |
Step 9: | The /etc/grub/grub.conf file will probably need to be edited to reflect the correct hard drives and paths. I am not going to get into this here because there are plenty of tutorials on the internet about how to do this. |
1 comment:
wow i am glad you are off breaking my laptop.
Post a Comment