ExFAT and NTFS are supported in CentOS.

Source: Internet
Author: User
Tags rpmbuild

ExFAT and NTFS are supported in CentOS.

ExFAT:

1. Download the fuse-exfat support software:
Exfat support is supported through the fuse module, its project address is: https://code.google.com/p/exfat/, the current version is: 1.0.1.
Currently, exfat supports all functions and supports reading and writing.
You can download the source code package and compile it using scons and gcc. You can also download the source code RPM in rpmfusion and install it by building the RPM. Here we use the RPM construction method (which is convenient for installation and uninstallation ).
: Http://download1.rpmfusion.org/free/el/updates/6/SRPMS/repoview/index.html
Download: fuse-exfat-1.0.1-1-el6.src.rpm and exfat-utils-1.0.1-1.el6.src.rpm

2. Compile and install:

Check the system before compiling. If scons and gcc are not in the system, install them using yum:
$ Sudo yum install scons gcc
This software is the fuse module, and fuse-devel package is required for compilation:
$ 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
The rpmbuild directory appears in the main directory:
$ Cd ~ /Rpmbuild/SPECS
$ Rpmbuild-ba fuse-exfat.spec
$ Rpmbuild-ba exfat-utils.spec
After the build is complete, you can go ~ Find the generated RPM in/rpmbuild/RPMS (based on the system architecture, in the x86_64 or i386 directories, where the package with debuginfo in the name does not need 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
This completes the installation.

3. Mount:
Run the following command to mount the exfat USB flash drive:
$ Sudo mount. exfat/dev/sdXn/mnt
X in sdXn represents the name of your USB flash drive device, and n represents the Partition Number, for example,/dev/sdb1.
In addition, for convenience, you can create a symbolic link between the commands installed in/usr/sbin and/sbin:
$ Sudo ln-s/usr/sbin/mount. exfat/sbin/mount. exfat
It is easy to directly use mount for installation:
$ Sudo mount-t exfat/dev/sdXn/mnt

NTFS:

1. Install the ntfs-3g Module

1. How to install yum:

Make sure that you have installed the source of the rpmforge software library. Refer to: using third-party software libraries in RHEL/CentOS 5.5

Then install the following components.

Yum install fuse ntfs-3g-y

Note: If you are using CentOS 5.3 or an earlier version, you need to install kmod-fuse from ELRepo.

2. Use ntfs-3g official source code compilation and installation method:

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

Either of the above two methods, yum is only applicable to the Redhat system, and compilation and installation is applicable to all Linux distributions.

Ii. Mount the NTFS file system

Assume that your NTFS file system is/dev/sda1 and you will attach it to/mnt/windows/c. perform the following steps.

1. Create a mount point. (It is generally recommended to store it in the mnt directory)

Mkdir/mnt/windows/c

2. Mount the NTFS partition:

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

Note: sda1 refers to the first partition of the SATA or SCSI hard disk. If it is an old-fashioned IDE hard disk, it will be hda1. For details, see fdisk-l. For example, a single server:

[Root @ CentOS ~] # Fdisk-l

Disk/dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065*512 = 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 83 Linux
/Dev/sda10 2585 4928 18828148 + 83 Linux
/Dev/sda11 4929 5016 706828 + 82 Linux swap/Solaris

Partition table entries are not in disk order

3. If you want to automatically mount the NTFS partition when the system is started, edit the vim/etc/fstab file and add the following content:

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

For example, the/etc/fstab file is as follows:

LABEL = // ext3 defaults 1 1
LABEL =/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 defaults 0 0
LABEL = SWAP-sda11 swap defaults 0 0

/Dev/sda1/mnt/windows/c ntfs-3g ro, umask = 0222, defaults 0 0
/Dev/sda5/mnt/windows/e ntfs-3g default 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 notes:

From CentOS 5.4 (2.6.18-164 or newer kernel), the fuse module is included in the kernel. Therefore, dkms and dkms-fuse are no longer required. If you have installed dkms-fuse before, run the yum remove dkms-fuse command to uninstall it. Note that users of CentOS4.x need these two components.

Users who use centosplus Kernel

Starting from the CentOS-5.3, The centoplus kernel does not enable the NTFS module. This is because NTFS within 5.3 cannot run. See https://bugzilla.redhat.com/show_bug.cgi for details? Id = 481495. If you want to use the NTFS module from the CentOS kernel, you can install kmod-ntfs from ELRepo. But this module does not have a good ntfs-3g and only provides extremely limited write functionality.

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.