Yu Chao yuchao86@gmail.com
First, mount a mobile hard disk in the exFAT format. Recently, a dual-system has been created. One disk is Windows 7 and the hard disk format is exFAT,
If you want to access the files under Windows 7 in Linux, the following error occurs: mount failure.
# Mount-t exfat/dev/sda2/mnt/d
Mount: unknown filesystem type 'exfat'
This is because partitions in exFAT format cannot be recognized on RedHat 6.0.
For a mobile hard drive or USB flash drive, the files supported by FAT32 cannot exceed 4 GB, so they can only be formatted as exFAT,
The following is a record of how to mount various hard disks in exFat format in Linux.
1. Install
Sudo apt-get install subversion scons libfuse-dev gcc
Svn co http://exfat.googlecode.com/svn/trunk/ exfat-read-only
Cd exfat-read-only
Scons
Sudo scons install
Rm-rf exfat-read-only
2. Mount
Sudo mount-t exfat-o iocharset = cp936/dev/sda2/mnt/d
3. Uninstall
Sudo umount/mnt/d
The following is the NTFS format,
Use an Open Source Software NTFS-3g that supports reading and writing NTFS format partitions under Linux. It is fast and secure. It supports Windows 2000, XP, 2003, and Vista, and supports all POSIX-compliant disk operations. Ntfs-3g is designed for continuous development, users of various hardware platforms and operating systems need reliable intercommunication and support ntfs Driver, ntfs-3g provides a trusted, functional, high-performance solution. After more than 12 years of development, ntfs-3g has gradually stabilized. (Translated from the official website)
# Wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz
Compile and install ntfs-3g
# Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz
# Cd ntfs-3g_ntfsprogs-2011.4.12
#./Configure
# Make
# Make install
Mount File
# Fdisk-ll
.......
Device Boot Start End Blocks Id System
/Dev/sda1*1 2600 204800 83 HPFS/NTFS
/Dev/sda2 5223 1459*75272557 + f extFAT
/Dev/sda3 ******** 37544960 83 Linux
/Dev/sda4 700*522*4194304 82 Linux SWAP
.......
From the above view, we know that/dev/sda1 is in NTFS format.
1. Create a directory for the mount point. For example, create a c directory under the/mnt/directory:
# Mkdir/mnt/c
2. Mount/dev/sda1 to/mnt/c, so that if we view the/dev/sda1 disk content, we will find it in/mnt/c.
# Mount-t ntfs-3g-o nls = utf8, umask = 000/dev/sda1/mnt/c
Automatic mounting of boot partitions
Put the following command in/etc/fstab.
/Dev/sda1/mnt/c ntfs-3g umask = 000, iocharset = utf8 0 0
/Dev/sda2/mnt/d exfat umask = 000, iocharset = cp936 0 0
# Cp-r-f srcDir dstDir // copy the directory file.
# Rm-rf dstDir // Delete the directory file.
Unmount a disk: umount command
# Umount/mnt/c
# Umount/mnt/d
Note: mount-t file format-o option parameter disk partition mount point directory name
For example: mount-t vfat-o iocharset = utf8, umask = 000/dev/sda2/mnt/d
For example, mount-t ntfs-o nls = utf8, umask = 000/dev/sda1/mnt/c
-T ntfs indicates that the file system format is ntfs;-o is the option, nls = utf8, meaning Native Language Support (supported by local Language) is utf8, that is, the commonly used language encoding can also be changed to iocharset = utf8;
RedHat Enterprise 6.0 the default language encoding is utf8, which can display Chinese characters. umask = 000 indicates that all user groups can read and write data, but because NTFS is not secure in Linux, therefore, it can only be read and cannot be written.