Hacking CentOS For NTFS Support

In deciding between various Linux distributions, a friend recently recommended that I look at CentOS. I duly tested it out for a bit on an old machine then decided to have a play on one of my regular PCs, setting it up to dual-boot with Windows XP.

Update: 19 September 2013: The Linux NTFS project seems to have been discontinued, so I’ve removed the broken links that were on this page previously. Strongly recommend you check out NTFS 3G for mounting partitions under Linux.

Things were going fine until I needed to access my Windows XP partitions which were formatted with NTFS. Apparently due to concerns over licensing and the legally of tapping into the NTFS format, the CentOS developers (or more likely Red Hat) have decided not to build NTFS support in by default.

As with everything Linux, there is a way to work around this. And here it is.

The Linux-NTFS Project

A post in the CentOS Forums pointed me to the Linux-NTFS project website. This is a project dedicated to enabling reliable, full-featured access to NTFS filesystems from Linux. Just what we need!

First off, I’m using the current release of CentOS Linux, version 4.2. Apparently, this requires the same download as RedHat Enterprise 4. Now, before you start downloading stuff, run this quick test to determine your kernel version:

uname -r

You should get 2.6.9-22.EL as your result. If so, download the corrseponding NTFS RPM from the download page. There’s a convoluted Linux-y way to install the RPM file from the command line, but I just double-clicked to install. Haven’t noticed any disturbing side-effects so far….

Anyway, just execute the RPM and it’ll trigger the installation routine. Follow the prompts to the end.

Verifying The Install

The instructions ask us to verify the install before proceeding, so run the command below:

/sbin/modprobe ntfs

If you get errors, you’re got problems. If it all completes silently, run cat /proc/filesystems and check the output for NTFS. If you see NTFS – good – time to mount the drive!

Mounting Your NTFS Volume

Right, before you mount, you have to create a directory in Linux as your Mount Point. This will be the entry point to the NTFS volume, which you’d previously accessed through C: or D:. To create the mount point:

mkdir /mnt/windows

Then you link the NTFS volume to the mount you just created:

mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222

The mount command you just executed will give you access to the drive for your current session. If you want your NTFS drives to always be mounted, then you need to add some entries to the fstab in Linux. You can get more instructions on this from the Linux-NTFS website.

2 thoughts on “Hacking CentOS For NTFS Support

  1. jmanteau

    Hum … you juste have to enable the rpmforge repo and :

    yum install fuse fuse-ntfs-3g dkms dkms-fuse Here is the link :http://wiki.centos.org/TipsAndTricks/NTFSSo I agree with the previous comment : it is NOT a hack !

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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