2017年1月3日 星期二

[Linux 常見問題] How to mount Windows USB drive onto Centos/RHEL 7 (unknown filesystem type ‘exfat’)

Source From Here 
Preface 
Following are the simple instructions on how to mount Windows USB drive onto Centos/RHEL 7 and also resolve a very common mounting issue which presents itself with error: mount: unknown filesystem type ‘exfat’. 

How-To 
Before we can mount the USB drive, we need to first obtain its file system path. Run following command to do so: 
// -l: List the partition tables for the specified devices and then exit.
# fdisk -l

In the output, you need to look for your USB drive, I’ve found mine by SSD the disk size (120 GB) and SDB denominator. 

Another, perhaps easier way to do this, is to run following command: 
  1. for devlink in /dev/disk/by-id/usb*; do readlink -f ${devlink}; done  
It’ll output something like this: 

Anyhow, as you can see, my USB drive is listed as: /dev/sdb1, and this is all I needed to know in order to mount it onto my CentOS system. Now, let’s create a directory to which we will attach our USB drive: 
# mkdir /mnt/usb

And finally let’s mount the file system to /mnt/usb directory we’ve just created. 
# mount /dev/sdb1 /mnt/usb

Now your USB drive will be accessible by browsing to: /mnt/usb. If you want to un-mount manually, simple use: 
# umount /mnt/usb

If the drive is busy and above command won’t let you un-mount, you can forcefully unmount it by using this command: 
# umount -f /mnt/usb

Now, as far as dealing with error: mount: unknown filesystem type ‘exfat’. You’ll most likely experience this error because you’re trying to mount a drive previously formatted under Windows OS. To resolve the issue, you’ll need to install support for mounting EXFAT drives onto Linux. Do that by installing following two programs: exfat-utils and fuse-exfat 

Normally, these are not present in Centos 7, so before you will run Yum Install command, you’ll first need to add li.nux.ro Epel repository to your system: 
# yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nu...release-0-5.el7.nux.noarch.rpm

Finally, you can install exfat support with this simple command: 
# yum install fuse-exfat exfat-utils

And once this is done, you can run above mounting procedure again – it’ll work without any errors.

沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...