Mount ntfs mobile hard drives to centos
This article only describes how to mount a partition hard disk in ntfs format in linux.
Step 1: Install the ntfs3g Tool
Run the following command:
Wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz
Tar zxf ntfs-3g_ntfsprogs-2011.4.12.tgz
Cd ntfs-3g_ntfsprogs-2011.4.12
./Configure -- prefix =/usr/local/ntf3g
Make & make install
Step 2: mount the mobile hard drive
Method 1, the command is as follows:
Ntfs-3g/dev/sdb1/mnt/windows-o locale = ar_SA.UTF-8
The ar_SA.UTF-8 after locale above can be modified to zh_CN.GBK, which should be noted when strict encoding is required.
Method 2, the command is as follows:
Mount-t ntfs-3g/dev/sdb1/mnt/windows
Note:
In the above example,/dev/sdb1/is a partition of the hard disk to be attached.
You can run the command fdisk-l to view all the partitions of the current mobile hard disk.
Unmount:
Umount/mnt/windows
This is also possible, as shown below:
Umount-t ntfs-3g/mnt/widows
Possible problems:
In windows, the hard disk is formatted as an ntfs partition. After mounting in linux, it is mounted to windows, prompting that it cannot be identified.
The partition attribute is 0 bytes. The file system is in RAW format.
Use the following method to restore data. If the partition is H:, run the following command:
Chkdsk H:/f.
Generally, the ntfs file system can be restored to a normal one, and the data is intact.