Fix “Unexpected clusters per mft record (-127)”
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.


April 24th, 2009 16:05
wow, thank you so much! I thought all my save games were lost :)
April 25th, 2009 15:37
Haha, I’m glad I could help. =]
May 1st, 2009 05:26
Unbelievable!
I’ve been messing around with testdisk for hours and finally decided to format the partition then I’ve stumbled on your post and you pointed out the right direction !
and now I’m able to get the recovery consul thanks to you.
July 2nd, 2009 16:27
Thanks, man
Testdisk+your micro-howto do wonderful things!!!
July 6th, 2009 15:03
Fantastic! Saved my ass right when I thought all my data was lost.
THANKS MAN!
January 16th, 2010 17:24
fixed my problem of “Unexpected clusters per mft record (-127)” when i was trying to mount my vista under linux. I had previously messed up the partitioning with bootitNG. Thanks.
April 4th, 2010 07:40
Thanks, Ryan — after installing a new SSD disk and some adventures in GRUB I managed to render my NTFS partition unmountable, probably by running “grub-install /dev/sda1″ rather than /dev/sda.
Using testdisk as described above helped.
September 6th, 2010 21:59
really thank for this helping tips!! it works and now my ntfs got mounted!!
October 11th, 2011 22:33
I had a serious mishap after doing grub-install /dev/sda1. I thought I’d have to start from scratch. I’ve been using Testdisk to salvage a few things, but I never knew about what you wrote about…
Thanks a lot! You really saved me.
October 19th, 2011 20:10
Thank you a lot, you really helped me :)
October 23rd, 2011 12:08
Thanks a lot dudee!
you really save my windows and most important data in it, :)
January 23rd, 2012 15:31
I was just about reinstall windows and crying because of losing data, and then…… You made my day! Thank you!