Homepage: webng.com/linuxhelp


 Writing to Windows from 
Linux (using NTFS-3g)


NTFS-3g, working together with FUSE, allows easy reading from, and writing to, your windows NTFS partitions. NTFS-3g is a fork of the Linux-NTFS project, written by Szabolcs Szakacsits.

It is not clear whether the Linux-NTFS project ever wish to incorporate Szakacsits' work (as it works too well, and too easily). They say they do. They say NTFS-3g works extremely well. But, they are in no hurry. It has been over 6 months, now, and NTFS-3g will only be incorporated when it becomes too obvious that they are really a group, that has been devoted to making sure Linux and NTFS do not work well together.

An interesting side-note: Szakacsits wrote a patch so that Captive (an older, very poor, NTFS writing program) would function better. The author of Captive, Jan Kratochvil, refused to accept the patch (as it might have made Captive work somewhat more like it should).

Installing NTFS-3g and FUSE are a breeze. This compares with, ntfsprogs, from the Linux-NTFS project, which was "accidently" (ie, deliberately) made quite difficult to compile (to see some of the difficulties, go here).

As you can see, there are parties (read Microsoft) that do not want Linux and NTFS working well together. These parties have gone to great lengths, for example, by infiltrating the ranks of Linux developers, in order to achieve their goals.

Download (right click on the red link, and choose Save As)

fuse-2.6.1.tar.gz from http://fuse.sourceforge.net/
ntfs-3g-0.20070102-BETA.tgz from http://www.ntfs-3g.org/

and save them in a directory of your choice. I chose to save them in /src

Make sure that you have the following programs and packages installed:

gcc libgcc glibc glibc-devel glib2 glib2-devel gcc-c++ libstdc++ libstdc++-devel and the kernel source.

If you are installing on a SuSE/Novelle box, the easiest way to check that you have the necessary packages, is to:

1) open the KDE Control Center
2) click on YAST2 Modules
3) click on Software
4) click on Software Management
5) click Administrator Mode
6) enter your root password
7) enter devel (gcc, glib, etc) in the search box
8) click off the checkbox, summary (leave name checked)
9) hit enter or click the search button

If you are missing some packages, choose them (click the checkbox by the package name), and install them by clicking Accept.

It is assumed that you are the root user.

 cd /src
 tar -xzf fuse-2.6.1.tar.gz
 cd fuse-2.6.1
 ./configure

The configuration script, will most likely find that a FUSE module is already present, and will not build a new kernel module.

 make
 make install

Configure and make can be run as a user, but you need to be root to install the FUSE programs.

 cd /src
 tar -xzf ntfs-3g-0.20070102-BETA.tgz
 cd ntfs-3g-0.20070102-BETA

Now we proceed with the usual ./configure, make, make install.

 ./configure
 make
 make install

If your NTFS partitions are mounted at boot with the (essentially read only) ntfs kernel module, your /etc/fstab file will have entries something like:

/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hda2 /windows/D ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0,

then comment them out (add a # at the beginning of the line), or delete them, so that they will not be mounted at boot. The important entry is, ntfs, (the third entry). If they are already mounted, then unmount them with the command:

 umount /windows/C /windows/D

(replace /windows/C, etc, by whatever the second entries of the relevant lines in your /etc/fstab file, are).

Now, you can mount your NTFS partitions with:

 modprobe fuse
 ntfs-3g /dev/hda1 /mnt/windows

(this mounts /dev/hda1 in the directory /mnt/windows). I usually mount windows in the directory /c (due to Microsoft's use of the term C-drive and the fact that it is easier to type /c, than /mnt/windows).

If you wish to see the (hidden) windows system files, use:

 ntfs-3g /dev/hda1 /mnt/windows -o show_sys_files

Of course, if your NTFS partition is not /dev/hda1, you will have to suitably adjust /dev/hda1 (to perhaps /dev/sda7). To display your partitions use the command:

 fdisk -l

To determine their type (reiserfs, ext3, xfs, ntfs, etc) enter:

 blkid

To have your NTFS partitions mounted automatically at boot, add a line, or lines, such as:

/dev/hda1 /mnt/windows ntfs-3g defaults 0 0

to your /etc/fstab file. If you always wish to see the system files, use:

/dev/hda1 /mnt/windows ntfs-3g show_sys_files 0 0

By default, every user has permission to read, write, or execute, the mounted files.

 AS ALWAYS, USE AT OWN RISK.