<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=NTFS-3G</id>
	<title>NTFS-3G - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=NTFS-3G"/>
	<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=NTFS-3G&amp;action=history"/>
	<updated>2026-04-08T14:24:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.slackwiki.com/index.php?title=NTFS-3G&amp;diff=145&amp;oldid=prev</id>
		<title>Erik: Copy from old</title>
		<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=NTFS-3G&amp;diff=145&amp;oldid=prev"/>
		<updated>2009-06-04T05:26:59Z</updated>

		<summary type="html">&lt;p&gt;Copy from old&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[http://www.ntfs-3g.org/ NTFS-3G] is a fully functional NTFS writer/reader built as a userspace filesystem, thanks to the magic of [http://fuse.sourceforge.net/ FUSE]. For another way to get read/write support of NTFS filesystem, see [[Captive NTFS]].&lt;br /&gt;
&lt;br /&gt;
Please note that the following instructions are made in such a way that it should be easy to [[SlackBuild Scripts|create a SlackBuild script]] or [[Building A Package|make a package]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing FUSE ==&lt;br /&gt;
Since [http://www.ntfs-3g.org/ NTFS-3G] is not implemented as a kernel module, it has to find ways to communicate with the kernel and make its services as a filesytem available to any other process.&lt;br /&gt;
To do this, it uses a library called [http://fuse.sourceforge.net/ FUSE] (which stands for Filesystem in Userspace).&lt;br /&gt;
&lt;br /&gt;
Slackware 11.0's 2.6.17.13 kernel already has FUSE support compiled, but the version which comes with this kernel lacks a few features (such as proper block devices handling) and that seems to annoy NTFS-3G, so we'll begin by installing a newer FUSE.&lt;br /&gt;
&lt;br /&gt;
If you have FUSE already installed, please check that it is at least 2.6.0 with &lt;br /&gt;
this command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   $ sudo /sbin/modprobe fuse&lt;br /&gt;
   $ dmesg | grep fuse&lt;br /&gt;
   kernel: fuse init (API version 7.8)&lt;br /&gt;
   kernel: fuse distribution version: '''2.6.0'''&lt;br /&gt;
&lt;br /&gt;
If it doesn't print the ''distribution version'' line then you have a version older than 2.6.&lt;br /&gt;
&lt;br /&gt;
=== Getting FUSE to work ===&lt;br /&gt;
You have to make sure that the version of FUSE you're downloading is &amp;amp;ge; 2.6.0 and &amp;amp;ne; 2.6.2, unless you like annoying warnings and malfunctioning filesystems.&lt;br /&gt;
&lt;br /&gt;
I prefer to do my building in a /tmp folder, so I'll start with this:&lt;br /&gt;
&lt;br /&gt;
   mkdir  /tmp/fusebuild&lt;br /&gt;
   cd /tmp/fusebuild&lt;br /&gt;
&lt;br /&gt;
First, you have to get the most recent version (at the time of writing, 2.6.3):&lt;br /&gt;
&lt;br /&gt;
   wget http://superb-west.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.3.tar.gz&lt;br /&gt;
&lt;br /&gt;
(There are several other mirrors. You can go to [http://sourceforge.net/project/showfiles.php?group_id=121684&amp;amp;package_id=132802 SF.net's download page] to find another mirror.)&lt;br /&gt;
&lt;br /&gt;
Then you can extract the source.&lt;br /&gt;
&lt;br /&gt;
   tar zxf fuse-2.6.3.tar.gz&lt;br /&gt;
   cd fuse-2.6.3&lt;br /&gt;
&lt;br /&gt;
Before compiling, you have to make sure that your kernel sources and .config matches your running kernel. If you've build your own kernel (and haven't touched the source since then) then you should be fine. Otherwise, if you're running Slack's binary kernels, you'll have to install [http://packages.slackware.it/search.php?v=11.0&amp;amp;t=1&amp;amp;q=%22kernel-source%22 the kernel source]. Usually, that's enough. Should you have some other kernel-related trouble, check out the [http://fuse.sourceforge.net/ FUSE homepage].&lt;br /&gt;
&lt;br /&gt;
Now, you can compile your fuse library/tools/module&lt;br /&gt;
&lt;br /&gt;
   # You might want to change the CFLAGS or the --with-kernel path&lt;br /&gt;
   # Also, take note of the --exec-prefix=/ this allows you to have&lt;br /&gt;
   # /usr mounted later (or even as an NTFS partition, but why would&lt;br /&gt;
   # you want that?) and still mount NTFS drives. You may as well&lt;br /&gt;
   # remove it, and everything will get in /usr/*&lt;br /&gt;
   CFLAGS=&amp;quot;-O2 -march=i486 -mtune=i686&amp;quot; ./configure \&lt;br /&gt;
   --enable-kernel-module \&lt;br /&gt;
   --with-kernel=/lib/modules/$(uname -r)/build \&lt;br /&gt;
   --enable-lib \&lt;br /&gt;
   --enable-util \&lt;br /&gt;
   --enable-example \&lt;br /&gt;
   --localstatedir=/var \&lt;br /&gt;
   --sysconfdir=/etc \&lt;br /&gt;
   --prefix=/usr \&lt;br /&gt;
   --exec-prefix=/ \&lt;br /&gt;
   --program-prefix= \&lt;br /&gt;
   --profram-suffix= \&lt;br /&gt;
   i486-slackware-linux&lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   # Do the following steps as root:&lt;br /&gt;
   make install&lt;br /&gt;
   &lt;br /&gt;
   # This is only necesary if you didn't change/remove&lt;br /&gt;
   # the --exec-prefix option at configure time.&lt;br /&gt;
   mv /lib/pkgconfig/* /usr/lib/pkgconfig/&lt;br /&gt;
   rmdir /lib/pkgconfig&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;gt; /etc/udev/rules.d/99-fuse.rules &amp;lt;&amp;lt;_EOF_&lt;br /&gt;
   KERNEL==&amp;quot;fuse&amp;quot;, MODE=&amp;quot;0666&amp;quot;&lt;br /&gt;
   _EOF_&lt;br /&gt;
   &lt;br /&gt;
   # Note that fuse will also put some stuff in /etc/init.d, let's&lt;br /&gt;
   # put it where it belongs.&lt;br /&gt;
   mv /etc/init.d/fuse /etc/rc.d/rc.fuse&lt;br /&gt;
   rmdir /etc/init.d&lt;br /&gt;
   &lt;br /&gt;
   # You might also want to add this at the bottom of&lt;br /&gt;
   # /etc/rc.d/rc.modules:&lt;br /&gt;
   # [ -x /etc/rc.d/rc.fuse ] &amp;amp;&amp;amp; /etc/rc.d/rc.fuse start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you're making a slackbuild or building a package, instead issue:&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p /tmp/tmproot&lt;br /&gt;
   make install DESTDIR=/tmp/tmproot&lt;br /&gt;
   &lt;br /&gt;
   # Also prepend /tmp/tmproot to the paths references which come after&lt;br /&gt;
   # that. You may have to actually create some of those paths.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
To make sure that everything is working so far, let's run a simple test (as root):&lt;br /&gt;
&lt;br /&gt;
   cd example&lt;br /&gt;
   mkdir /tmp/mntpoint&lt;br /&gt;
   &lt;br /&gt;
   # Run this as root.&lt;br /&gt;
   ./hello /tmp/mntpoint &amp;amp; #you can add a &amp;quot;-d&amp;quot; flag if you want to see what's goinng on.&lt;br /&gt;
   &lt;br /&gt;
   ls -l /tmp/mntpoint&lt;br /&gt;
   # You should see something like this:&lt;br /&gt;
   # total 0&lt;br /&gt;
   # -r--r--r--   1 root root 13 Jan  1 1970 hello&lt;br /&gt;
   &lt;br /&gt;
   cat /tmp/mntpoint/hello&lt;br /&gt;
   # It should print the famous &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
   # If it did, then FUSE is working as it  should.&lt;br /&gt;
   &lt;br /&gt;
   # Run this also as root.&lt;br /&gt;
   fusermount -u /tmp/mntpoint&lt;br /&gt;
   &lt;br /&gt;
   rmdir /tmp/mntpoint&lt;br /&gt;
   cd ..&lt;br /&gt;
&lt;br /&gt;
If everything is fine so-far, you can  delete the cruft left behind:&lt;br /&gt;
&lt;br /&gt;
   cd&lt;br /&gt;
   rm -rf /tmp/fusebuild&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing NTFS-3G ==&lt;br /&gt;
Now you should be ready to install NTFS-3G.&lt;br /&gt;
Again, let's begin by making a build directory:&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/ntfs-3gbuild&lt;br /&gt;
   cd /tmp/ntfs-3gbuild&lt;br /&gt;
&lt;br /&gt;
=== Getting the greatest &amp;amp; latest ===&lt;br /&gt;
Then we can get the latest NTFS-3G. Note that there are usually two or three releases per month, so make sure to check [http://www.ntfs-3g.org/ the homepage] to get the latest version.&lt;br /&gt;
&lt;br /&gt;
   wget http://www.ntfs-3g.org/ntfs-3g-0.20070207-RC1.tgz&lt;br /&gt;
&lt;br /&gt;
=== Configuring and compiling ===&lt;br /&gt;
Compiling NTFS-3G is actually quite easy, it is one of those programs were compiling &amp;quot;just works&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
First, you have to untar the source:&lt;br /&gt;
&lt;br /&gt;
  tar zxf ntfs-3g-0.20070207-RC1.tgz&lt;br /&gt;
  cd ntfs-3g-0.20070207-RC1&lt;br /&gt;
&lt;br /&gt;
Next, let's configure the sources:&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -march=i486 -mtune=i686&amp;quot; ./configure \&lt;br /&gt;
  --prefix=/usr \&lt;br /&gt;
  --exec-prefix= \&lt;br /&gt;
  --program-prefix= \&lt;br /&gt;
  --program-suffix= \&lt;br /&gt;
  i486-slackware-linux&lt;br /&gt;
&lt;br /&gt;
That usually works without problems, unless you are missing libfuse. If so, you  must see the above steps on configuring FUSE.&lt;br /&gt;
&lt;br /&gt;
Now compile and install.&lt;br /&gt;
&lt;br /&gt;
  make&lt;br /&gt;
  &lt;br /&gt;
  make install&lt;br /&gt;
  &lt;br /&gt;
  # If you're making a package or a slackbuild, you will have to issue the next trick to avoid some st*pid error:&lt;br /&gt;
  #&lt;br /&gt;
  # make install LDCONFIG=/bin/true DESTDIR=$YOUR_ROOT_DIR&lt;br /&gt;
  #&lt;br /&gt;
  # also, you'll have to make sure that the mount.ntfs-3g.8 symlink points to the right (maybe gzipped) ntfs-3g.8 file.&lt;br /&gt;
&lt;br /&gt;
And that's pretty much it.&lt;br /&gt;
&lt;br /&gt;
== Mounting with NTFS-3G ==&lt;br /&gt;
So, how to mount something? NTFS makes mounting NTFS filesystems as easy as with other filesystems:&lt;br /&gt;
&lt;br /&gt;
  root@damned-02# mount -t ntfs-3g /dev/sda1 /mnt/pendrive&lt;br /&gt;
&lt;br /&gt;
If you fail to see some files which you know are there, you should try using&lt;br /&gt;
the locale option, specially if that partition is used by a non-english&lt;br /&gt;
Windos.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
:For some reason I don't know, My WinXP in Spanish uses en_US for character encoding (not even en_US.utf8),  to see my files with &amp;quot;special&amp;quot; chars (mostly &amp;amp;aacute;, &amp;amp;eacute;, &amp;amp;iacute;, &amp;amp;oacute;, &amp;amp;uacute; and &amp;amp;ntilde;) I have to use:&lt;br /&gt;
&lt;br /&gt;
  root@damned-02# mount -t ntfs-3g -o '''locale=en_US''' /dev/sda1 /mnt/pendrive&lt;br /&gt;
&lt;br /&gt;
The only way I know to find the right locale is to do some trial and error.&lt;br /&gt;
If when you mount without locale, it shows all your files, then your correct&lt;br /&gt;
locale is the one printed by&lt;br /&gt;
&lt;br /&gt;
  echo $LANG&lt;br /&gt;
&lt;br /&gt;
To see which locales you have support for (there are 342 in Slack 11.0), type&lt;br /&gt;
&lt;br /&gt;
  locale -a | less&lt;br /&gt;
&lt;br /&gt;
=== Using /etc/fstab ===&lt;br /&gt;
You can use /etc/fstab to mount ntfs partitions at boot time. For example,&lt;br /&gt;
my laptop's fstab looks like this:&lt;br /&gt;
&lt;br /&gt;
    /dev/hda1        swap             swap        defaults         0   0&lt;br /&gt;
    /dev/hda3        /                jfs         defaults         1   1&lt;br /&gt;
    /dev/hda4        /home            jfs         noatime          1   2&lt;br /&gt;
    /dev/hda2        /mnt/win         ntfs-3g     dmask=0007,fmask=0117,gid=6,locale=en_US  1   0&lt;br /&gt;
    /dev/cdrom       /mnt/cdrom       auto        noauto,group,ro  0   0&lt;br /&gt;
    devpts           /dev/pts         devpts      gid=5,mode=620   0   0&lt;br /&gt;
    proc             /proc            proc        defaults         0   0&lt;br /&gt;
&lt;br /&gt;
This gives read/write access to anyone in the disk group (gid=6) to the&lt;br /&gt;
NTFS partition at hda2 mounted in /mnt/win.&lt;br /&gt;
&lt;br /&gt;
Note, though, that &amp;quot;mount&amp;quot; reports the filesystem as &amp;quot;fuseblk&amp;quot; (unless you have&lt;br /&gt;
a version of fuse &amp;amp;lt; 2.6 which won't allow you to mount block devices anyway).&lt;br /&gt;
&lt;br /&gt;
=== Allowing users ===&lt;br /&gt;
NTFS-3G can let users other than root mount NTFS filesystems, but you'll have to&lt;br /&gt;
set the suid flag in /bin/ntfs-3g. This applies &amp;lt;b&amp;gt;even when using fstab&amp;lt;/b&amp;gt; with the ''users'' option.&lt;br /&gt;
&lt;br /&gt;
So for this to work:&lt;br /&gt;
&lt;br /&gt;
   /dev/sda1        /mnt/pendrive   ntfs-3g     noauto,users       0   0&lt;br /&gt;
&lt;br /&gt;
You have to do (as root):&lt;br /&gt;
&lt;br /&gt;
   # chmod 4755 /bin/ntfs-3g&lt;br /&gt;
&lt;br /&gt;
== RTFMs ==&lt;br /&gt;
If you have any problems or doubts:&lt;br /&gt;
&lt;br /&gt;
*http://www.ntfs-3g.org/&lt;br /&gt;
*:spec. http://www.ntfs-3g.org/support.html&lt;br /&gt;
*http://www.linux-ntfs.org&lt;br /&gt;
*http://fuse.sourceforge.net&lt;br /&gt;
&lt;br /&gt;
If you find any error in this tutorial, don't forget this is a wiki and don't hesitate fixing or updating or improving or ...&lt;/div&gt;</summary>
		<author><name>Erik</name></author>
	</entry>
</feed>