Many people coming to Linux for the first time will be dual-booting with a Windows XP installation on their hard drive. Those who use Linux day-to-day might still want to boot into Windows for a specific application they need. For these people some compatibility with NTFS, one of the filesystems Windows uses, is particularly useful.
For many years Linux has supported full read-only support for NTFS. Unlike open filesystems such as ext3 and Reiserfs, NTFS is closed and proprietary and has had to be reverse-engineered. This has meant limited write support, which until relatively recently has been considered too risky for any use besides testing and development. The good news is that things have moved on a lot.
The Linux NTFS project provides a set of tools called ‘ntfsprogs’. The suite includes a tool to clone an NTFS partition, another to check consistency and fix problems, and another to resize an NTFS filesystem. All these tools are completely safe and have been used frequently by many Linux distributions. For example, when you install Linux and have the chance to free up some space from a Windows installation by resizing the partition, behind the scenes it is these tools that perform the checks and the resize.
A later addition to these tools is ‘ntfsmount’, a command that allows you to mount, and therefore access, an NTFS filesystem under Linux. This means there are two methods to mount an NTFS filesystem: the traditional kernel driver, which has been around for years; and the new userspace driver included in ntfsmount. The userspace driver is more up to date than the kernel driver and offers some safe support for writing as well as reading. As the name implies, the userspace driver does not need a driver in the kernel; it uses the ‘fuse’ or Filesystem in Userspace system instead.
Obtaining ntfsprogs
Most Linux distributions include ntfsprogs themselves. If you’re using Ubuntu
6.10 (‘Edgy Eft’) you can install a recent copy with ‘sudo apt-get install
ntfsprogs’ or load the Synaptic GUI for the point-and-click method.
Few, if any, distributions will have the latest version, which might have some big performance or feature enhancements, as well as the usual bug fixes. To compile and install the latest version, head over to the project’s website and download the source code. Regular readers will be familiar with what comes next, the extraction, build and install:
# tar xfvz ntfsprogs.tar.gz
# cd ntfsprogs
# ./configure
# make install
Ensure the fuse development libraries are installed or ‘ntfsmount’ will not be built. On Edgy you can install these with ‘sudo apt-get install libfuse-dev’. For ntfsmount to work you will also need the fuse-utils package.
Once installed you can check everything works by using the ntfsresize command with the -i option. This checks and reports on the filesystem without making any changes. To check the filesystem on /dev/hda2 run:
$ sudo ntfsresize -i /dev/hda2









