I encountered this error yesterday after trying to fix some Windows bootloader issues in Ubuntu with ms-sys. Needless to say, I just created more issues and eventually couldn’t even mount my Windows partition from Ubuntu, as this would happen:
# mount -t ntfs-3g -o force /dev/sda1 /mnt/win
Unexpected clusters per mft record (-127).
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't have a valid NTFS.
I tried to recover it using a Windows XP disk, but that didn’t work because it wouldn’t recognize my C:\WINDOWS folder! At this point, I was getting pretty worried.
So, back in Ubuntu, I do a bit more reading and find out about the testdisk command (apt-get install testdisk) and a nice post about how to use it on the Ubuntu forums. To summarize, this is what I took out of that post to get mount to actually work after:
After starting testdisk, choose “No log”, choose the correct HDD and “Proceed”, choose “Intel”, choose “Advanced”, select the Windows partition, choose “Boot”, then choose “Rebuild BS”.
If testdisk gives you a warning that the “Extrapolated boot sector and current boot sector are different”, then choose “Write”.
Sure enough, something was messed and it was able to fix it after I selected “Write”.
After all this, mount worked, and when I rebooted, the Windows XP disk detected the installation and I was able to fix my MBR like I wanted.