Support for exFAT and NTFS under CentOS

Source: Internet
Author: User
Tags rpmbuild

ExFAT:

1. Download Fuse-exfat support software:

exFAT support is supported by 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.



You can download the 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).

: 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




2. 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.el6.x86_64.rpm exfat-utils-1.0.1-1.el6.x86_64.rpm

So the installation is complete.


3. Mount:

You can mount the exFAT USB flash drive by using the following command:
$ sudo mount.exfat/dev/sdxn/mnt
where x in SDXN represents your USB drive device name, n represents the partition number, for example:/DEV/SDB1.
In addition, for convenience, you can use the above commands installed under/usr/sbin to make a symbolic link under/sbin:
$ sudo ln-s/usr/sbin/mount.exfat/sbin/mount.exfat
Easy to install directly using mount:
$ sudo mount-t exfat/dev/sdxn/mnt

Ntfs:


First, install the NTFS-3G module


1. Installation method using Yum:

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
Note: If you are using CentOS 5.3 or older, then you need to install Kmod-fuse from ELRepo.


2. How to compile the installation using NTFS-3G official source code:

ntfs-3g download page: http://www.tuxera.com/community/ntfs-3g-download/
Installation steps:
wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz
Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz
cdntfs-3g_ntfsprogs-2011.4.12
./configure
Make
Make install


Choose one of the above two methods two, Yum only applies to redhat systems, compile and install for all Linux distributions


Second, mount the NTFS file system


Assuming your NTFS file system is/DEV/SDA1 and you will mount it in/MNT/WINDOWS/C, follow these steps.

1. Create a mount point. (general recommendations are attached in the MNT directory)

Mkdir/mnt/windows/c


2. Mount the NTFS partition:

Mount-t ntfs-3g/dev/sda1/mnt/windows/c

Note: The sda1 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. If I have a machine:


[Email protected] ~]# fdisk-l
disk/dev/sda:164.6 GB, 164696555520 bytes
255 heads, Sectors/track, 20023 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 2550 20482843+ 7 hpfs/ntfs
/dev/sda2 2551 20022 140343840 f W95 Ext ' d (LBA)
/dev/sda5 5101 8924 30716248+ 7 hpfs/ntfs
/dev/sda6 8925 12748 30716248+ 7 hpfs/ntfs
/dev/sda7 12749 16572 30716248+ 7 hpfs/ntfs
/dev/sda8 16573 20022 27712093+ 7 hpfs/ntfs
/DEV/SDA9 2551 2584 273042-up Linux
/DEV/SDA10 2585 4928 18828148+-up Linux
/dev/sda11 4929 5016 706828+, Linux Swap/solaris
Partition table entries is not in disk order


3. If you want to mount the NTFS partition automatically when the boot system starts, edit the Vim/etc/fstab file, adding something similar to the following:

Read-only mount:/dev/sda1/mnt/windows/c ntfs-3g ro,umask=0222,defaults 0 0
Read-write Mount:/dev/sda1/mnt/windows/c ntfs-3g rw,umask=0000,defaults 0 0
Or:/dev/sda1/mnt/windows/c ntfs-3g defaults 0 0

The/etc/fstab files are as follows:

label=//ext3 Defaults 1 1
Label=/boot/boot ext3 Defaults 1 2
TMPFS/DEV/SHM TMPFS Defaults 0 0
Devpts/dev/pts devpts gid=5,mode=620 0 0
Sysfs/sys Sysfs Defaults 0 0
PROC/PROC proc Defaults 0 0
LABEL=SWAP-SDA11 swap swap defaults 0 0
/dev/sda1/mnt/windows/c ntfs-3g ro,umask=0222,defaults 0 0
/dev/sda5/mnt/windows/e ntfs-3g Defaults 0 0
/dev/sda6/mnt/windows/f ntfs-3g Defaults 0 0
/dev/sda7/mnt/windows/g ntfs-3g Defaults 0 0
/dev/sda8/mnt/windows/h ntfs-3g Defaults 0 0


Other issues to note:

From CentOS 5.4 (2.6.18-164 or newer kernels), the fuse module is already included in the kernel. Therefore, dkms and dkms-fuse are no longer required. If you have previously installed Dkms-fuse, please uninstall it with the Yum Remove Dkms-fuse command. Note that the centos4.x user needs both components.

Users using the Centosplus kernel

Starting with CentOS-5.3, the Centoplus kernel does not have an NTFS module enabled. This is due to the fact that NTFS within 5.3 does not work. Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=481495 for details. If you want to use an NTFS module from the CentOS kernel, you can install Kmod-ntfs from Elrepo. However, this module is not ntfs-3g good and only provides extremely limited write functionality.

Support for exFAT and NTFS under CentOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.