Mount an exfat and FAT32 USB flash drive to CentOS

Source: Internet
Author: User
Tags rpmbuild

Mount an exfat and FAT32 USB flash drive to CentOS

This article describes how to mount exfat format U. If you want to mount the file in the FAT32 format, you can directly view section 4th.

Let's talk about the mounting of exfat, which is a little complicated and requires some compilation technology. If you do not want to compile the file, download the attachment and install it.

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-ivhfuse-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:

Use fdisk-l to view the device name of the USB flash drive:

$ Fdisk-l

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

This completes the installation.

4. Mount FAT32:

1: view the storage location

Root @ wgods ~] # Fdisk-l | grep FAT32
/Dev/sdb1*56 640 3580928 c W95 FAT32 (LBA)

2: Create a usb directory under the mnt directory (other locations are acceptable)

[Root @ wgods ~] # Cd/mnt/
[Root @ wgods mnt] # mkdir usb

3: mount a USB flash drive
[Root @ wgods mnt] # mount-t vfat/dev/sdb1/mnt/usb

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.