||
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.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-25 20:33
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社