I needed to be able to access files on a USB drive formatted with the NTFS filesystem from a CentOS 5.1 Linux system. To do so I used the free open source NTFS driver for Linux, NTFS-3G.
I followed the instructions at
How to Mount an NTFS Filesystem in order to be able to do so.
I issued the command
yum install fuse fuse-ntfs-3g dkms dkms-fuse
to install the required packages (dkms and dkms-fuse install the fuse kernel
The system needs to be configured to use the
RPMforge repository in order for
yum install command to work. See
Installing Wine on CentOS or
RPMForge Packages and Yum Priorites for information on configuring
yum to use the RPMforge repository.
After installing the ntfs-3g driver, I was able to mount the NTFS-formatted drive.
[root@localhost ~]# mkdir /mnt/windrive [root@localhost ~]# mount -t ntfs-3g /dev/sda1 /mnt/windrive
I first created a mount point, which I arbitrarily named "windrive" under
/mnt. Then I needed to specify the file system type with
-t ntfs-3g. This particular drive was an external USB drive,
which Linux identified as
/dev/sda. It had only one partition
on it, so I used
/dev/sda1 to mount it. If you are unsure
how Linux will identify the drive, see
If the NTFS drive contains the Windows operating system for a system and the system was put into hibernation mode when it was shut down, you can only mount it in read-only mode. You will see the following message, which I saw when I tried to mount another drive from a hibernated Windows system, if you don't specify read-only mode for mounting the drive:
# mount -t ntfs-3g /dev/sdc1 /mnt/workdrive Windows is hibernated, refused to mount. Failed to mount '/dev/sdc1': Operation not permitted The NTFS partition is hibernated. Please resume and shutdown Windows properly, or mount the volume read-only with the 'ro' mount option, or mount the volume read-write with the 'remove_hiberfile' mount option. For example type on the command line: mount -t ntfs-3g /dev/sdc1 /mnt/workdrive -o remove_hiberfile
I was able to mount the drive by using the
-r option for
the mount command (you can also use
mount -r -t ntfs-3g /dev/sdc1 /mnt/workdrive
fuse-ntfs-3g package information:
[root@localhost /]# rpm -qi fuse-ntfs-3g Name : fuse-ntfs-3g Relocations: (not relocatable) Version : 1.2712 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ Release : 1.el5.rf Build Date: Mon 14 Jul 2008 04:20:28 PM EDT Install Date: Thu 24 Jul 2008 08:48:39 AM EDT Build Host: lisse.leuven.wieers.com Group : System Environment/Kernel Source RPM: fuse-ntfs-3g-1.2712-1.el5.rf.src.rpm Size : 905700 License: GPL Signature : DSA/SHA1, Mon 14 Jul 2008 05:57:27 PM EDT, Key ID a20e52146b8d79e6 Packager : Dag Wieers <email@example.com> URL : http://www.ntfs-3g.org/ Summary : Linux NTFS userspace driver Description : The ntfs-3g driver is an open source, GPL licensed, third generation Linux NTFS driver. It provides full read-write access to NTFS, excluding access to encrypted files, writing compressed files, changing file ownership, access right. Technically it’s based on and a major improvement to the third generation Linux NTFS driver, ntfsmount. The improvements include functionality, quality and performance enhancements. ntfs-3g features are being merged to ntfsmount. In the meanwhile, ntfs-3g is currently the only free, as in either speech or beer, NTFS driver for Linux that supports unlimited file creation and deletion.
After unmounting the drive with the
umount command, I removed
the directory I created when mounting it.
[root@localhost /]# rmdir /mnt/windrive