corrupted NTFS partition. could it be GRUB?
I have a problem mounting my windows ntfs partition (/dev/hda1, c:).
I just installed Fedore Core 5, wiping out FC4 installation, as I planned. Before that my motherboard crashed, so I put in a new one. My FC5 is on a sata disk (/dev/sda1). The partition just won't mount in FC5, nor on a 3.9 or 4.0 Knoppix. GRUB chainloader also displays blank screen when trying to boot from that partition, then returing to boot menu. Windows recovery console doesn't recognise the partition too. As i do "mount -t ntfs /dev/hda1 /mnt/win_c/", with "dmesg|tail" i get: Code:
NTFS-fs warning (device hda1): is_boot_sector_ntfs(): Invalid boot sector checksum. Could have GRUB "setup (hdx,x)" done any damage? How to fix the partition? |
NTFS access problem after motherboard crash & FC5 install
What sounds very suspicious to me is the crash .. which you say happened before the install after which U replaced motherboard .
I doubt that GRUB overwrote the partition table but AFAIK Linux still has some problems on SATA disks ... so cant rule that out . Cant help lot but recommend testdisk to recover any partitions ... (never exec DOS fdisk/mbr for than once !!! - it ate my table :D) ... . |
If you forcibly do a Grub "setup (hdx,x)" with the Windows NTFS partition you then ask Grub to install itself into the first 512 byte of that partition. In so doing you could have destroyed part of the Windows boot loader rendering its boot sector imcompatible with the partition content (A Linux's boot loader at the front with NTFS data following).
Such partition cannot be mounted because the boot sector (also called the superblock) is regarded as corrupted since the information from the area occupied by Grub does not match the partition interior and no OS would know what to do. I am not entirely sure if it works but if you boot up the Windows installation CD and drop into the recovery console the "fixboot" command is supposed to fix this problem. |
fixboot has a very poor record if grub has overlaid the boot sector record. Try it though. Perhaps try also try the following from a Knoppix terminal, and post the output (info only, won't solve anything);
Code:
dd if=/dev/hda1 bs=512 count=1 | hd |
It worked.
I repaired my partition with: Code:
# dd if=/dev/hda5 of=/dev/hda1 bs=512 count=1 Code:
# dd if=/dev/hda1 of=/root/backupA1.pbr bs=512 count=1 first 512 bytes of ntfs boot partition (MBR was ok, GRUB on it). Windows's fixboot did not work, because it wanted to repair some G: instead of C: partition. Thank you very much to all. I now also know about testdisk. Now I have a working windows partition and it boots (btw. i've had to reboot 5 times just to get the new motherboard drivers to install :). And for anyone looking at this thread with similar problem... The corrupted hda1 sector looked (before repair): Code:
# dd if=/dev/hda1 bs=512 count=1 |
alesz,
Good reply. I didn't realise you have a duplicate of the XP boot sector in hda5 for transferring to hda1. As a matter of interest hda5, for being the 5th partition, is a logical partition. Did you install XP in a logical partition? |
saikee,
I have main Windows XP installation on hda1, but keep my document files on hda5, by soft linking to them (linux's ln=windows's junction.exe, third party download). Both are ntfs partitions, hda5 being on a logical hda2 partition: Code:
Device Boot Start End Blocks Id System Unfortunately (for me to completely answer your question) after doing that I was not sure wether hda1 will boot right away, so I repaired the hda1 partition with the suggested testdisk, as it was so easy to install testdisk under my FC5. After dd+testdisk, windows was able to boot normally. But I am not sure if dd repaired the boot problem totally or if the testdisk helped anyhow. At this time (after being rebooted to windows and back to linux), my hda1 and hda5 headers differ only in first few bytes: beggining of hda1: Code:
0000000 52eb 4e90 4654 2053 2020 0020 0802 0000 Code:
0000000 52eb 4e90 4654 2053 2020 0020 0802 0000 Code:
diff a1d a5d - wheter the Windows boot or new driver install changed those 8 bytes or - testdisk changed the hda1 header before the Windows boot (now I belive it's this option). So probbably it was like that: dd made my partition mountable, testdisk made it bootable. |
Whoa ... I'm surprised that worked.
I'd have been tempted to run a fixboot after the copy back to hda1. Still, it's bootable, and that was the desired result. |
All times are GMT -5. The time now is 06:18 PM. |