为了读写一个NTFS分区的数据,挂载的时候出现错误提示如下:
root@tv:/home/xx# mount -t ntfs-3g /dev/sdb1 /media/sxx/硬盘B-临时文件
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Could not mount read-write, trying read-only
ntfs-3g-mount: failed to access mountpoint /media/sx/硬盘B-临时文件: 没有那个文件或目录
当时不能确定有没有ntfsfix,所以先确定安装ntfsfix没有
xx@tv:~$ whereis ntfsfix
ntfsfix: /usr/bin/ntfsfix /usr/share/man/man8/ntfsfix.8.gz
安装了就再用它进行处理
xx@tv:~$ sudo ntfsfix /dev/sdb1
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... 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... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.
之后可以挂载了:
root@tv:/home/xx# mount -t ntfs-3g /dev/sdb1 /mnt/winc
ntfs-3g-mount: failed to access mountpoint /mnt/winc: 没有那个文件或目录
去那里创建一个目录再挂载一次就可以了:
root@tv:/home/xx# mount -t ntfs-3g /dev/sdb1 /mnt/winc
root@tv:/home/xx# cd /mnt/winc
root@tv:/mnt/winc# ls
'$RECYCLE.BIN' BingWallpaper必
‘System Volume Information'
root@tv:/mnt/winc# exit