Mount a Windows NTFS Disk in Linux

Almost all of the Windows OS disks use NTFS as a filesystem. It has been there since long time. However it is proprietary to Microsoft and is therefore not open sourced. By default, you’ll not be able to mount NTFS disk in the linux distributions like CentOS, RHEL etc. However it is possible to install a driver that allows us to do this so that we can read and write data to an NTFS disk.

In this blog post, we’ll see how to do the same. For the demo purpose we’ll be mounting a NTFS disk, inside CentOS.

When we run fdisk -l we can see that the disk is recognized, however it is not yet mounted for us to access the data. We can see the primary disk for the Linux system /dev/sda, while /dev/sdb is our 50GB NTFS disk which has the /dev/sdb1 NTFS partition:

unrecognized ntfs disk in the linux

However, if we try to mount the disk, it will give an error:

error while creating mount point

In order to perform the mount, we need to install the ntfs-3g package, which is a Linux NTFS userspace driver. This package comes from EPEL if you’re using CentOS/RHEL, so if you have not yet configured your system to use the EPEL repository, run the below command:

$ yum install epel-release -y 

Install epel release package

Once its done, we can install the ntfs-3g package:

$ yum install ntfs-3g -y 

Install ntfs-3g package

Above packages should directly be available in Ubuntu distributions. Once above driver is installed, we should be able to successfully mount:

mount ntfs disk - success

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s