NSLU2-Linux
view · edit · print · history

If you install the Optware package ntfs-3g then you can mount NTFS drives on your NSLU2. However it will not do so automatically when you plug them in. You can apply this patch to /etc/udev/scripts/mount.sh to enable that.

--- mount.tph   Thu Jan  1 00:00:00 1970
+++ mount.sh    Fri Jun 19 23:31:44 2009
@@ -8,6 +8,7 @@
 MOUNT="/bin/mount"
 PMOUNT="/usr/bin/pmount"
 UMOUNT="/bin/umount"
+NTFS3GP="/usr/bin/ntfs-3g.probe"
 name="`basename "$DEVNAME"`"

 if ( blkid "$DEVNAME" | grep -q 'TYPE="mdraid"' )
@@ -31,7 +32,25 @@
        if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
        then
                #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
-               rm_dir "/media/$name"
+               if ! test -x $NTFS3GP
+               then
+                       if ! $NTFS3GP --read-only $DEVNAME
+                       then
+                               if ! $MOUNT -t ntfs-3g -o sync,force,quiet,defaults,locale=en_US.utf8,umask=0 $DEVNAME "/media/$name"
+                               then
+                                       logger "mount.sh/automount" "NTFS3G mount of [/media/$name] failed"
+                                       rm_dir "/media/$name"
+                               else
+                                       logger "mount.sh/automount" "NTFS3G mount of [/media/$name] OK"
+                                       touch "/tmp/.automount-$name"
+                               fi
+                       else
+                               rm_dir "/media/$name"
+                       fi
+               else
+                       rm_dir "/media/$name"
+               fi
+
        else
                logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
                touch "/tmp/.automount-$name"
view · edit · print · history · Last edited by Trevor Hemsley.
Originally by Trevor Hemsley.
Page last modified on June 19, 2009, at 10:37 PM