1

I have an NTFS partition used by both Windows and Ubuntu. However, mounting sometimes fails, and I need to run ntfsfix. Is there a way to automatically run ntfsfix if that partition fails to mount?

  • I don't think it is the best idea. ntfsfix should be used in rare circumstances. It's probably better to solve the issue at its root. Does the mounting fail after you have used Windows? And What Windows version are you using? – Andrea Lazzarotto May 27 '16 at 10:36
  • 1
    The mounting only fails after using windows, and it's windows 10 home 64 bit. I've been told ntfsfix is perfectly fine as long as it isnt used on partition containing a windows install. – Taylor Rose May 27 '16 at 22:49
0

Since nobody's suggested an answer, I kinda came up with one on my own. Running a bash script on startup containing the following should work:

if [ `ls /media/user/drive` = "ls: cannot access 'drive': No such file or directory" ]; then
    ntfsfix /media/user/drive
fi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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