When writting files into a NTFS disk under Linux, errors may occur. For instance, we plug out the disk accidently when the system is still copying files into disk. In this case, there would be some errors of the file system and Linux cannot read the disk correctly next time when we plug into Linux machine. Typically messages would be:
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Normally we can fix this by disk check under windows. Alternatively, we can also do the same job under Linux with two simple commands:
> chkdsk /dev/sda1
If 'chkdsk' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf chkdsk
> ntfsfix /dev/sda1
Mounting volume... $MFTMirr does not match $MFT (record 0).
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... FIXED
NTFS volume version is 3.1.
NTFS partition /dev/sda1 was processed successfully.
After that, Linux will fix the file system error in the NTFS disk automatically and we can mount the disk again.
转载本文请联系原作者获取授权,同时请注明本文来自袁曙光科学网博客。
链接地址:http://blog.sciencenet.cn/blog-355217-844172.html
上一篇:What to expect from btrfs file system on openSUSE 13.2?
下一篇:W6.48 Opens a Gate for a Continuous Intrinsic Water Pathway