linux ntfs chkdsk,科学网—Fix NTFS disk error under 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.

转载本文请联系原作者获取授权,同时请注明本文来自袁曙光科学网博客。

链接地址: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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值