Archive for May, 2011

Mounting ntfs drive in Linux

May 14, 2011

Debian System

The process has two dependencies, ntfs-3g and libfuse 2. You will need these two packages installed before you begin the process. Ntfs-3g is a third party package that allows reading and writing to ntfs drives, which is the holy grail for me right now!

apt-get install libfuse2
apt-get install ntfs-3g

The first step is to ensure your Debian system ‘sees’ the ntfs drive. You’re not going to be able to mount anything if Linux can’t see it.
fdisk -l | grep NTFS

You should then see something like;
/dev/hda1   *           1       14387   156288421+    7  HPFS/NTFS

So now we know your ntfs drive is located on hda1. Check it isn’t mounted already by typing;


Now to manually mount the drive use the following approach –

mkdir /media/windows

mount –t ntfs-3g /dev/hda1 /media/windows

This last command mounts hda1 with ntfs-3g in the /media/windows directory.

Now here is a very important step that had me stumped for ages. Unmounting the ntfs drive.
umount /dev/hda1

Here is another little trick to auto mount it whenever the system starts. To do this we have to modify a file called fstab. Be very careful!!!! If you damage this file it will not boot.

Modify the file in your text editor of choice and add the line;
/dev/hda1 /media/windows ntfs-3g defaults 0 0

Redhat system

Open yum.conf with any editor and Scroll down and enter the following in yum.conf:

# Linux-NTFS-Repository


name=Linux-NTFS Install



save and exit from the file.
Next Install the linux-ntfs driver by typing “sudo yum install linux-ntfs” in the terminal


install the ntfs-3g package which will give you the NTFS support. Type “yum install fuse-ntfs-3g” and give the answer “Yes” if you are prompted for an encryption key or to install package.
Restart the system by typing “/sbin/shutdown -r now” in the console.

Check the new partition list by typing “sfdisk -l” and looking for a partition type that says “NTFS.”