a few days ago I had to replace my motherboard because it was acting up and not letting my Lenovo laptop boot. When replacing the motherboard I took out the HDD and connected it to my friend's laptop to salvage important files. In doing so, I had to change some of the admin/user permission settings on the HDD so that it would allow me to copy the files over. After doing so, I put the HDD back to my Lenovo and after seeing the normal dual boot menu show up, I selected Windows only to find out that when entering the user password it would say the password's incorrect. I tried entering the PIN and doing a finger scan but nothing works. What I find odd is that the left-click and right-click buttons also don't work on my trackpad when trying to log onto Windows (they work fine in Ubuntu).

After that, I went on Ubuntu and tried to access my Windows filesystem through there but got the following error: "Error mounting system-managed device /dev/sda2: Command-line `mount "/mnt/16B0BB6AB0BB4ECD"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda2': Operation not permitted The NTFS partition is in an unsafe state." but I managed to fix the issue by going to disks, selecting 'Mount Options' on the Windows partition, and suffixing ',ro' at the end of 'nosuid,nodevnofail,x-gvfs-show'.

However, despite being able to access my Windows files through Linux I still encountered the same problems when booting into Windows. I tried booting into Ubuntu and running chntpw -l SAM to reset the password but got the error "root@sam:/media/sda2/Windows/System32/config# chntpw -i SAM chntpw version 1.00 140201, (c) Petter N Hagen openHive(SAM) failed: Read-only file system, trying read-only openHive(): read error: : Read-only file system chntpw: Unable to open/read a hive, exiting.."

I'm guessing I've corrupted my NTFS partition. Any advice on what I should do next to boot into Windows would be greatly appreciated.


Preferred approach: In general, an ntfs partition should be checked and repaired by the MS Windows disk checking tools. If anyway possible, connect your SSD to another working Windows install, and have it checked there.

Backup approach: If you do not have the possibility to connect the SSD to another Windows system, you may try checking and repairing it in your linux session. This may either work or make matters worse, so make sure you safeguard your personal data before attempting this. If mounted, then unmount the partition first. Then use the ntfsfix utility:

sudo ntfsfix /dev/###

where /dev/### should be replaced by the actual device name of the ntfs partition. You can find the name of that partition in the output of


This might be enough to make your Windows system bootable again, after which you can check the volume again using the Windows tools. It might, however, not work, or even make the situation worse. Thus, before doing that, make certain your backup of the data is up to date.

  • Don't use ntfsfix, use chkdsk from a Windows platform. – heynnema Oct 22 '18 at 14:06
  • @heynnema That is what I recommend i n my answer as the first and best/safest option indeed. – vanadium Oct 22 '18 at 16:48
  • I wasn't clear enough... ntfsfix can do more damage than good. It does nothing for directory/file structure repairs, but only wipes the hibernation/page file, and when returning to Windows, the current state of Windows is not restored, and as such, you can loose data/edits. – heynnema Oct 22 '18 at 16:52
  • Loosing data is not the issue: that is why the user should, as he did, safeguard personal data. At least there is a chance that with a semi-fixed system he can get into Windows again, and then further check the disk from within Windows. I fully agree that connecting the disk to a Windows system is by far preferred, and that ntfsfix might make things worse rather than better. I will emphasize this more in my answer. – vanadium Oct 22 '18 at 17:01
  • thanks for the feedback. I saved all my data and would like to reformat windows/reset it through Ubuntu if possible. is there any way I can do this? – Todd D. Oct 24 '18 at 19:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.