Science Blog of Dr. Yuan分享 http://blog.sciencenet.cn/u/albumns This blog is mainly on Molecular molecular modelling and simulations

博文

Fix NTFS disk error under linux

已有 3218 次阅读 2014-11-17 22:41 |个人分类:Linux相关|系统分类:科研笔记

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.



https://wap.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
收藏 IP: 212.27.185.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2022-11-30 05:37

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部