HOW TO MOUNT NTFS PARTITION IN RHEL/CENTOS 7
Now a days, most of Linux technology automatically detects windows partition. When we have dual boot system (Linux + Windows), in this case users try to mount Windows partition(ntfs partition), but they fail to mount partition. This tutorial teaches you how to mount NTFS partition in CentOS 7.
STEP-1: ENABLE EPEL (EXTRA PACKAGES FOR ENTERPRISE LINUX) REPOSITORY.
Download the epel-release-7-5.noarch.rpm file using wget command and install it using RPM in your system. Now, open terminal and enter following commands(Refer Screenshot-1),
RHEL/CENTOS 7 64 BIT
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -ivh epel-release-7-5.noarch.rpm
STEP-2: INSTALL NTFS3G
ntfs-3g is an NTFS driver, which can create, remove, rename, move files, directories, hard links, and streams. It can read and write files, including streams, sparse files and transparently compressed files.
Note: FUSE module is included in the kernel itself in version 2.6.18-164 or Newer.
Now we need to install ntfs-3g, use the following command to install ntfs-3g file.
# yum -y install ntfs-3g
Now, we need to identify NTFS Partition, use following command, (Refer screenshot-2)
# fdisk -l
STEP-3: MOUNT NTFS PARTITION
Now, we need to create mount point to mount NTFS partition. Enter the following command to create directory,
# mkdir /mnt/wntfs
Run the following command to mount the partition. Replace sda5 with your actual partition found
# mount -t ntfs-3g /dev/sda5 /mnt/wntfs
Now, check the mounted partition on /mnt/wntfs, enter the following command to list the content of mounted filesystem.
# ls -l
Sample Output
[root@ewt wntfs]# ls -l total 935236 drwxrwxrwx. 1 root root 28672 Sep 13 2013 Amazing Virtual Tours -rwxrwxrwx. 1 root root 81826 Jan 15 2014 amcat-test-syllabus.pdf drwxrwxrwx. 1 root root 98304 Jul 3 2013 Android -rwxrwxrwx. 1 root root 800624 May 2 2013 Arch XFCE.png drwxrwxrwx. 1 root root 4096 Jul 20 14:21 ASN Technology drwxrwxrwx. 1 root root 4096 Feb 28 2014 BACK drwxrwxrwx. 1 root root 4096 Jun 22 17:50 BackUp New drwxrwxrwx. 1 root root 32768 Jul 26 19:01 BOOKS
Add following entry in /etc/fstab file to mount partition permanent at the time of boot. Replace sda5 with your actual partition found
/dev/sda5 /mnt/wntfs ntfs-3g defaults 0 0
STEP-4: UMOUNT NTFS PARTITION
Use following command in terminal to unmount partition,
# umount /mnt/wntfs
That’s it.