The Linux-NTFS project is an organization who's purpose is to "develop reliable and full feature access to NTFS by the Linux kernel driver, and by a user space filesystem (ntfsmount), and to provide a wide collection of NTFS utilities (ntfsprogs) and a developer's library (libntfs) for other GPLed programs." Basically, the project allows for an NTFS partition to be mounted on a Linux filesystem. I find it especially useful when I need quick access to an NTFS partition, say, if I have some data file saved on Windows that I need access to in a pinch. Although full implementation of a read/write driver for Linux does not yet exist, the following announcement has recently been made:
On
07/14/2006, Project Member Szabolcs Szakacsits
presented a new version of our ntfsmount
and libntfs,
currently given the project internal title ntfs-3g.
This version has, apart from several rather unlikely cases, full
read/write capabilities and has improved performance. As news spreads
quickly, it has already been downloaded and tested by many users, and
no incident has been reported so far. Despite of that it is
still to be considered beta, and will upon successful testing (in
some way or the other) merge into the
linux-ntfs ntfsprogs
package.
Nice. Very nice.
Most Linux distributions have an NTFS kernel module with full read capabilities enabled with whatever kernel version is currently being shipped in their system. But not RedHat/Fedora distributions — primarily because they are the largest competitor in Linux-land to Microsoft products, and as such, they are deathly afraid of a lawsuit. But, there's an easy fix.
The first step used to be to install the appropriate kernel-module-ntfs rpm from www.linux-ntfs.org, and to repeat the process each time the kernel was updated on your system. But with ntfs-3g now available in Fedora extras, and a kmod-ntfs module available from livna, this is no longer necessary. The ntfs-3g module is still has a few bugs to work out (you can mount an NTFS partition by hand using the mount command, but using /etc/fstab and the netfs service will not work), so in this case, we are going to use livna.
Simply type:
~>
sudo yum install ntfs-kmod-common kmod-ntfs
Press 'y' when
prompted to install the programs. Once
complete, create
a /mnt/windows
directory, where the NTFS filesystem will actually be mounted.~>
sudo mkdir /mnt/windows
Next, create a
mount point by editing /etc/fstab
so that the partition will automatically be mounted at boot time.
Before adding a line, make sure that you know which partition
number your Windows partition is stored on. For example, my
server's first primary partition is a Linux partition for /boot,
followed by my Windows partition (even though the partition is at the
end of the hard drive). Then I have a Logical partition
that contains all of my other Linux partitions except for /boot and /home, and
since /home
resides on a a final primary partition. As a result, my
Windows
partition resides on /dev/sda2.
Once you determine the NTFS partition number, add the
following
line:/dev/[partition
#] /mnt/windows ntfs
umask=077,uid=[user],gid=[user] 0 0
On my laptop, the
Windows partition is the
first one, not the second, so /dev/[partition #]
is /dev/sda1.
The "umask=077"
option sets read-write-execute permissions for all directories
for a single user only, which in this case is supplied by the "uid" (user)
and "gid"
(group) identification names. In other words, I allow myself,
and
only myself, to have full access to the Windows partition.
Save and
exit.Once saved, restart the Network File Systems daemon, netfs:
~> sudo
service netfs restart
You should see
the daemon successfully stop and restart:Unmounting
NFS
filesystems:
[ OK
]
Mounting NFS filesystems: [ OK ]
Mounting other filesystems: [ OK ]
Now change your
directory to /mnt/windows
(cd /mnt/windows)
and list the contents of the directory (ls). You now
have full read access to your Windows partition!Mounting NFS filesystems: [ OK ]
Mounting other filesystems: [ OK ]
As a final note, whenever a new kernel version is installed onto your system (say, with yum) and you boot into it, you will need to repeat the process by installing a new kmod-ntfs kernel module and restarting netfs. To prevent old kernel modules from floating around on your system, you can delete the old one. This is done using rpm. For example, prior to kernel-2.6.19-1.2896, kernel-2.6.18-1.2798 was installed on this Linux server. If you forget the exact kernel module name for an old kernel, perform a search:
~> rpm
-qa |grep kmod-ntfs |sort
You should see
all NTFS kernel modules that are currently installed.
In this case:kmod-ntfs-2.1.27-3.2.6.19_1.2895.fc6
kmod-ntfs-2.1.27-3.2.6.18_1.2798.fc6
The old kernel
module can be deleted typing:kmod-ntfs-2.1.27-3.2.6.18_1.2798.fc6
~> sudo
rpm -e kmod-ntfs-2.1.27-3.2.6.18_1.2798.fc6
That's it. Enjoy reading that Windows
partition!

