So I finally ended up reinstalling Windows XP to get a new start. This meant my current bootloader, grub, would be overwritten by the Windows bootloader which is fine with me because I can easily reinstall grub with the boot CD (grub-install "(hd0,0)"; Note: DO NOT USE THIS COMMAND, ITS INCORRECT!) but this time something else happened. After reinstalling grub Windows XP wouldn’t boot. When I click on the entry it would show a line about not being able to find the partition type and then come back to the grub main menu. Linux was booting fine, so I went into Linux and tried mounting the ntfs partition, but `mount /ntfs` gave the following errors:
mount: wrong fs type, bad option, bad superblock on /dev/discs/disc0/part
1,
missing codepage or other error
In some cases useful info is found in syslog – try
dmesg | tail or so
So I ran `dmesg | tail` as suggested and got the following useful text:
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device hda1): ntfs_fill_super(): Not an NTFS volume.
"Primay boot sector is invalid?" Ooh, that sounds painful! So I have done some quick search on net and didn’t too anything that pointed out the cause but it did say that you can mount using the errors=recover option as pointed out in dmesg. So I went ahead and mounted it as:
mount -t ntfs -o ro,errors=recover /dev/discs/disc0/part1 /ntfs/
…and that seem to mount it correctly. Well, that is half the story. I haven’t rebooted yet to see if that might have fixed the error but I am going to take a break, bring my system up to date and then reboot and see what that might have done. Worst come to worst I can backup my Litestep configuration files that I spent so much time on.
Here is a link to an article might help:
http://forums.gentoo.org/viewtopic-t-346183-highlight-readntfsbootsector.html
2005-10-08 8:00 PM: After trying testdisk for a few times with no luck I have decided to reformat the NTFS partition and reinstall Windows XP.
2005-10-08 10:00 PM: Well, I have finally successfully reinstalled both Windows XP and GRUB! My mistake last time was that I actually told grub to install on the first partition instead of the master boot record. Basically I had to do ‘grub-install hd0’ instead of ‘grub-install "(hd0,0)"’. The four extra characters have costed me quite some time 🙁