CSDN |
GitHub |
Support for mounting EXFAT and NTFS file systems under CentOS |
Aderxcoding/system/tools/centos_mount_exfat_ntfs |
This work is licensed under the Creative Commons Attribution-NonCommercial use-Share 4.0 International license agreement in the same way, please specify the source, thank you for your cooperation
1 Questions 1.1 Problem Description
To the laboratory of a broken machine installed CentOS 7, today want to copy something from the mobile hard disk to the machine, Mount Mount when found Mount does not go up, prompting unknown file system. Think of it as if CentOS is not supported by default for these Windows file systems. This is still Ubuntu friendly, pack all installed, mobile hard disk inserted automatic mount, no way, CentOS toss it. 1.2 file system under Windows
Common formats for partitioning under Windows are FAT, FAT32, NTFS, and ExFAT
In the early days, most of the formats were FAT and FAT32, but now because a single file is getting larger, more than 4G of files, FAT and FAT32 formats are not supported, so the hard disk format will be converted to NTFS or EXFAT format, 1.3 NTFS and EXFAT partitions The characteristics and differences of the formula
The NTFS (New Technology file system) is a filesystem for WindowsNT and Advanced Server network operating system environments designed to provide higher reliability than FAT32 and to eliminate FAT32 file system capacity limitations. In addition to supporting larger partitions and files and saving hard disk space, it also provides features such as long filenames, compressed partitions, event tracking, file indexing, high fault tolerance, data protection and recovery, and encrypted access that the FAT32 file system cannot provide.
But why are flash disks and various memory cards rarely partitioned with NTFS? Although there are many advantages of NTFS, it is designed for traditional mechanical hard drives. It employs a "journaled" file system that requires frequent recording of disk read-write operations, which can add additional burdens to storage media such as flash disks or SSDs. At the same time, the NTFS file system frequently read and write also affects the performance of the flash disk, resulting in a decrease in transmission rate.
For this reason, Microsoft has developed the exFAT file system (Extended Allocation Table FileSystem) on the basis of the traditional FAT 32 partition, which makes up the limitations and drawbacks of FAT32 without the ability of NTFS to affect flash life. Suitable for a variety of mobile memory cards and flash disk use.
The ExFAT file system has the following advantages:
Partition size and support for a single file size of up to 16EB;
Using the remaining Space allocation table, the space utilization is higher;
The maximum number of files in the same directory can be up to 65,536;
Access control is supported.
Currently, only solid-state drives, flash drives, and memory cards can be formatted as ExFAT, and traditional hard drives cannot be formatted into ExFAT format, so it is a file system specifically for flash memory. 2 mount NTFS file system support
The file system in the exFAT format is a 2.1 installation supported by the fuse (Filesystem in userspace) module Fuse-exfat
EXFAT support is supported through the Fuse module and its project address is:
https://code.google.com/p/exfat/, the current version is: 1.0.1
Currently, EXFAT support is fully functional and supports reading and writing. 2.1.1 Yum source or RPM package installation
Use the following command to install directly from the source
sudo yum install Fuse-exfat
If you are not prompted for a package, you have not added the rpmfusion source, please add the download first rpmfusion-free-release-7.noarch.rpm
After you try to add a source, install
Download Fuse-exfat package (required) and Exfat-utils package to install directly
Download Address fuse-exfat-1.0.1-1.el7.x86_64.rpm
Download Address exfat-utils-1.0.1.el7.x86_64.rpm
Then install directly
sudo rpm-ivh fuse-exfat-1.0.1-1.el7.x86_64.rpm
sudo rpm-ivh exfat-utils-1.0.1-1.el7.x86_64.rpm
2.1.2 SRC. RPM Source Build RPM installation
Although not to say this method, in general, the release version for each RPM or Deb package will provide its source package, convenient for developers to build their own installation package from the source code, Ubuntu and other distributions using Apt-get source download source code, using
Apt-get BUILD-DEP builds its environment, Redhat and other distributions are built using Rpmbuild, and their packages become src.rpm
You can download the ' src.rpm source code package and compile it yourself using scons and GCC, or you can download the source code rpm in Rpmfusion and install it by building the rpm '. Here is the way to build the RPM (this is convenient for loading and unloading).
Download Address:
Http://download1.rpmfusion.org/free/el/updates/6/SRPMS/repoview/index.html
Download separately: fuse-exfat-1.0.1-1-el6.src.rpm and exfat-utils-1.0.1-1.el6.src.rpm
http://download1.rpmfusion.org/free/el/updates/7/x86_64/f/Compile and install:
Before compiling, please check the system, if the system does not have scons and GCC, please install through Yum:
sudo yum install scons gcc
This software is a fuse module, compiling requires Fuse-devel package support:
sudo yum install Fuse-devel
After downloading, install the source code rpm:
RPM-IVH fuse-exfat-1.0.1-1-el6.src.rpm exfat-utils-1.0.1-1.el6.src.rpm
In the home directory, the Rpmbuild directory appears:
CD ~/rpmbuild/specs
rpmbuild-ba fuse-exfat.spec
rpmbuild-ba exfat-utils.spec
After the build is complete, you can find the generated RPM in the ~/rpmbuild/rpms (depending on the system architecture, in the x86_64 or i386 directory, where the package with the Debuginfo in the name does not have to be installed):
CD ~/rpmbuild/rpms/x86_64
sudo rpm-ivh fuse-exfat-1.0.1-1.el7.x86_64.rpm
sudo rpm-ivh exfat-utils-1.0.1-1.el7.x86_64.rpm
So the installation is complete. 2.2 Mounting exFAT
You can mount the exFAT USB flash drive by using the following command:
sudo mount.exfat/dev/sdc1/mnt
OR
sudo mount/dev/sdc1/mnt
3 support for mounting the exFAT file system
The support for the NTFS file system in the RPM source is a 3.1 installation of the NTFS-3G module that is done by the NTFS-3G package 3.1.1 Using the Yum installation method:
Make sure you have the source for the Rpmforge Software library installed.
Please refer to: Rhel/centos 5.5 using a third-party software library
Then install the following components
Yum Install fuse ntfs-3g-y
NFTS-3G and no longer a standard source, if the prompt does not find the package, add the EPEL source first, see CENTOS7/RHEL7 installation EPEL extended warehouse steps in detail
Note: If you are using CentOS 5.3 or older, then you need to install Mod-fuse from ELRepo 3.1.2 using ntfs-3g official source to compile the installation
Currently 2017-04-19, the latest version of NTFS-3G is 2017-03-23
Official website: http://www.tuxera.com/community/open-source-ntfs-3g/
ntfs-3g download page: https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
Installation steps:
wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
Tar zxvf ntfs-3g_ntfsprogs-2017.3.23.tgz
cdntfs-3g_ntfsprogs-2017.3.23
./configure make do
install
Yum applies only to Redhat systems, compile and install for all Linux distributions 3.2 mount NTFS file system
Assuming your NTFS file system is/DEV/SDB1 and you will mount it in/MNT/WINDOWS/C, follow these steps. Creates a mount point. (general recommendations are attached in the MNT directory)
Mkdir/mnt/windows/c
Mount NTFS partitions:
Mount-t ntfs-3g/dev/sdb1/mnt/windows/c
OR
mount/dev/sdb1/mnt/windows/c
Note: The sdb1 here refers to the first partition of SATA or SCSI hard disk, if it is an old-fashioned IDE hard disk, it will be hda1, please check it with fdisk-l.
This work is licensed under the Creative Commons Attribution-NonCommercial use-Share 4.0 International license agreement in the same way, please specify the source, thank you for your cooperation.