How to mount ntfs/fat32 external USB drive to CentOS/Fedora/RHEL

| Monday, April 30, 2012

First you need ntfs mount. For that you need to install two packages.
This gets your ntfs-3g

wget http://marush.com/wp-content/uploads/2009/03/ntfs-3g-200921-el5i686.rpm
Then run to install ntfs-3g
rpm -ihv  ntfs-3g-200921-el5i686.rpm
Second get this fuse (I do not know why. Without fuse you can not mount ntfs-3g. Please go through fuse sourceforge document.)
wget http://pkgs.fedoraproject.org/repo/pkgs/fuse/fuse-2.6.0.tar.gz/fa6c7b07a0be3a3e30d6cf3a6bad5817/fuse-2.6.0.tar.gz



Then execute the following
tar xvfz fuse-2.6.0.tar.gz
It creates a directory “fuse-2.6.0″
cd fuse-2.6.0
Execute
./configure
make
make install
Then try
fdisk -l
You get

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        9729    78043770   8e  Linux LVM
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       60801   488384001    7  HPFS/NTFS


Mount with following command.
Here you go!
mkdir /500gbmount /dev/sdb1 /500gb -t ntfs-3g -r -o umask=0222
Check your drive now
ls -ltr /500gb
if read only just run this command

mount -o remount rw /mount/point
Automatically mount using fstab:

There’s a file called /etc/fstab in your Linux system. Learn what its contents mean and how it’s used in conjunction with the mount command. When you learn to understand the fstab file, you’ll be able to edit its contents yourself, too.

/dev/sdb1 /usb1 ext2 defaults 1 2
/dev/sdb2 /usb2 ext3 defaults 1 2

0 comments:

Post a Comment