![]() |
HowTo.BuildNTFS3G HistoryHide minor edits - Show changes to markup October 23, 2008, at 06:45 AM
by --
Changed line 178 from:
Probably. Look at http://forum.openwrt.org/viewtopic.php?pid=75150#p75150 to:
Probably. Look at http://forum.openwrt.org/viewtopic.php?pid=75156 October 22, 2008, at 07:35 AM
by --
Added lines 177-178:
Probably. Look at http://forum.openwrt.org/viewtopic.php?pid=75150#p75150 October 03, 2008, at 11:38 PM
by -- Update and final thoughts...
Changed lines 134-135 from:
So far, I've had mixed results using the NTFS-3G driver. Occasionally the to:
So far, I've had mixed results using the NTFS-3G driver. Occasionally the Changed line 176 from:
Once I determine if this really fixes the crashing, I'll integrate it into the above instructions... to:
Update: This doesn't appear to do the trick for me... Anyone else have any luck? October 03, 2008, at 11:36 PM
by -- Update...
Changed lines 134-135 from:
So far, I've had pretty good results using the NTFS-3G driver, and I am using it in favor of the Linksys provided driver. However, occasionally the to:
So far, I've had mixed results using the NTFS-3G driver. Occasionally the
For the most part, I am giving up on getting it to be stable. The Unslung kernel is too old (2.4) to run the fuse driver reliably, so I am going to switch to another distro with a 2.6 kernel. I would suggest other Unslung users try this out and see if they get better results. August 24, 2008, at 12:41 PM
by -- added fix for occasional crashing!
Changed lines 154-155 from:
err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0, to:
err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0, August 24, 2008, at 12:40 PM
by -- Added fix for occasional crashing!
Added lines 136-170:
Update to fix crashing?I think I have a patch that fixes the remaining instability issues. Apply the following patch to dev.c in the fuse source code before compiling:
Once I determine if this really fixes the crashing, I'll integrate it into the above instructions... August 17, 2008, at 06:41 PM
by -- Added Troubleshooting section, updated NTFS-3G version number
Changed lines 9-10 from:
Since Unslung runs a 2.4 kernel, we have to use FUSE v2.5.3 and NTFS-3G v1.2531. to:
Since Unslung runs a 2.4 kernel, we have to use FUSE v2.5.3 - Try to use the latest version of NTFS-3G which is v1.2812 as of this writing. Changed line 97 from:
to:
Changed lines 132-135 from:
to:
TroubleshootingSo far, I've had pretty good results using the NTFS-3G driver, and I am using it in favor of the Linksys provided driver. However, occasionally the August 17, 2008, at 06:31 PM
by -- Added proper Usage section
Changed lines 108-111 from:
Okay this is not a good solution for usage yet, as it doesn't work through reboots, but once I have the time to set up a permanent solution, I will update this section
to:
I like to do my custom startup stuff in Changed lines 111-115 from:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o to:
/bin/umount /dev/sdb1 /sbin/insmod fuse /bin/ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 -o rw,noatime Changed lines 118-120 from:
to:
If you are creating your script from scratch, don't forget to make the script executable: Changed line 121 from:
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 to:
chmod a+x /unslung/rc.local Changed lines 124-127 from:
This should mount your NTFS drive using the new NTFS-3G driver. To verify run "mount" and it should say something similar to: to:
Reboot and this should mount your NTFS drive using the new NTFS-3G driver. To verify, run "mount" and it should say something similar to: July 28, 2008, at 01:55 AM
by -- Forget about the width problem...
Changed lines 55-56 from:
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt to:
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt July 28, 2008, at 01:54 AM
by -- Fix for width problem?
Changed lines 55-56 from:
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt to:
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt July 28, 2008, at 01:53 AM
by -- Fix for width problem?
Changed lines 54-56 from:
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt to:
[@
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt July 28, 2008, at 01:52 AM
by -- Fix for width problem?
Changed lines 55-56 from:
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt to:
./configure --with-kernel= /usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt July 28, 2008, at 01:51 AM
by -- Formatting updates
Changed lines 20-21 from:
to:
Added line 27:
Added line 34:
Added line 40:
Added line 47:
Added line 53:
Added line 59:
Added line 71:
Added line 80:
Changed lines 85-86 from:
to:
Changed lines 92-93 from:
--> [@ to:
Changed line 97 from:
to:
Added line 99:
Added line 111:
Added line 118:
Added line 126:
July 28, 2008, at 01:46 AM
by -- Formatting updates
Deleted line 17:
Deleted line 18:
Deleted line 19:
Deleted line 41:
Changed line 57 from:
to:
to
Changed lines 83-84 from:
ipkg install optware-devel to:
-->ipkg install optware-devel Deleted line 87:
Deleted lines 88-96:
./configure
make
make install
UsageOkay this is not a good solution for usage yet, as it doesn't work through reboots, but once I have the time to set up a permanent solution, I will update this section
Changed lines 90-92 from:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o to:
./configure make make install Changed lines 95-97 from:
to:
UsageOkay this is not a good solution for usage yet, as it doesn't work through reboots, but once I have the time to set up a permanent solution, I will update this section
Changed line 101 from:
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 to:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o Changed lines 104-106 from:
This should mount your NTFS drive using the new NTFS-3G driver. To verify run "mount" and it should say something similar to: to:
Changed line 107 from:
/dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) to:
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 Changed lines 110-117 from:
to:
This should mount your NTFS drive using the new NTFS-3G driver. To verify run "mount" and it should say something similar to:
July 28, 2008, at 01:44 AM
by -- Formatting updates
Changed line 24 from:
--> [@ to:
Changed line 61 from:
to to:
July 28, 2008, at 01:43 AM
by -- Formatting updates
Changed lines 23-25 from:
mkdir /usr/local/src to:
-->mkdir /usr/local/src Changed lines 29-31 from:
mkdir /usr/local/src/unslung
cd /usr/local/src/unslung
to:
Changed lines 35-36 from:
wget --cache=off http://www.nslu2-linux.org/Makefile to:
Changed lines 40-46 from:
make setup-host-ubuntu
cd /usr/local/src/fuse-2.5.3/kernel to:
Changed lines 52-53 from:
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt to:
Changed lines 57-58 from:
CC = gcc
LD = ld
to:
Changed lines 62-64 from:
CC = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-gcc
LD = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-ld
to:
Added line 68:
Changed lines 73-74 from:
to:
@] Changed lines 76-79 from:
make
to:
Changed lines 89-90 from:
to:
Changed lines 101-102 from:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o to:
Changed lines 108-109 from:
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 to:
Changed lines 115-117 from:
/dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) to:
July 28, 2008, at 01:38 AM
by -- Formatting updates
Changed lines 24-25 from:
mkdir /usr/local/src to:
mkdir /usr/local/src Changed lines 27-29 from:
mkdir /usr/local/src/unslung
cd /usr/local/src/unslung
to:
mkdir /usr/local/src/unslung
cd /usr/local/src/unslung
Changed lines 31-32 from:
wget --cache=off http://www.nslu2-linux.org/Makefile to:
wget --cache=off http://www.nslu2-linux.org/Makefile Changed lines 34-37 from:
make setup-host-ubuntu
to:
make setup-host-ubuntu
Changed lines 39-40 from:
cd /usr/local/src/fuse-2.5.3/kernel to:
cd /usr/local/src/fuse-2.5.3/kernel Changed lines 42-43 from:
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt to:
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt Changed lines 45-46 from:
CC = gcc
LD = ld
to:
CC = gcc
LD = ld
Changed lines 48-50 from:
CC = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-gcc
LD = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-ld
to:
CC = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-gcc
LD = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-ld
Changed lines 52-56 from:
unsigned ncpy = min(*size, cs->len);
if (val) {
flush_cache_all();
if (cs->write)
to:
unsigned ncpy = min(*size, cs->len);
if (val) {
flush_cache_all();
if (cs->write)
Changed lines 58-61 from:
make
to:
make
Changed lines 67-70 from:
ipkg install optware-devel
to:
ipkg install optware-devel
Changed lines 72-75 from:
./configure
make
make install
to:
./configure
make
make install
Changed lines 81-82 from:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o to:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o Changed lines 86-87 from:
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 to:
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 Changed lines 91-93 from:
/dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) to:
/dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) July 28, 2008, at 12:08 AM
by -- Formatting updates
Added line 18:
Added line 20:
Added line 22:
Changed lines 24-25 from:
mkdir /usr/local/src to:
mkdir /usr/local/src Added line 29:
Added line 32:
Added line 35:
Added line 37:
Added line 40:
Added line 43:
Added line 50:
Added line 56:
Added line 59:
Added line 68:
Added line 70:
Added line 82:
Changed lines 84-85 from:
to:
July 28, 2008, at 12:05 AM
by -- Formatting updates
Changed lines 1-2 from:
Forewordto:
ForewordChanged lines 13-20 from:
Setting up a kernel build environment to build the FUSE kernel moduleWe must first build a kernel module for FUSE. FUSE is a driver that allows filesystems in user space, and is used by the NTFS-3G software. I didn't have much luck getting the module to build properly by compiling natively on the NSLU2 - I would get two unresolved symbols when I tried to insmod it. So what you must do is set up a cross-compiler build environment on an external Linux workstation. I found Sun's VirtualBox? a perfect solution for creating a quick and easy VirtualPC? on my Windows workstation to install Linux on. I used Ubuntu v8.04 as my Linux distro.
to:
Setting up a kernel build environment to build the FUSE kernel moduleWe must first build a kernel module for FUSE. FUSE is a driver that allows filesystems in user space, and is used by the NTFS-3G software. I didn't have much luck getting the module to build properly by compiling natively on the NSLU2 - I would get two unresolved symbols when I tried to insmod it. So what you must do is set up a cross-compiler build environment on an external Linux workstation. I found Sun's VirtualBox a perfect solution for creating a quick and easy VirtualPC on my Windows workstation to install Linux on. I used Ubuntu v8.04 as my Linux distro.
Changed lines 22-36 from:
mkdir /usr/local/src/unslung cd /usr/local/src/unslung
wget --cache=off http://www.nslu2-linux.org/Makefile
make setup-host-ubuntu
cd /usr/local/src/fuse-2.5.3/kernel
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt
CC = gcc LD = ld to:
mkdir /usr/local/src/unslung
cd /usr/local/src/unslung
wget --cache=off http://www.nslu2-linux.org/Makefile
make setup-host-ubuntu
cd /usr/local/src/fuse-2.5.3/kernel
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt
CC = gcc
LD = ld
Changed lines 38-40 from:
CC = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-gcc LD = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-ld
to:
CC = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-gcc
LD = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-ld
Changed lines 45-50 from:
make
Setting up a native build environment for NTFS-3Gto:
make
Setting up a native build environment for NTFS-3GChanged lines 53-62 from:
ipkg install optware-devel
./configure make make install Usageto:
ipkg install optware-devel
./configure
make
make install
UsageChanged lines 65-70 from:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 to:
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 Changed lines 74-76 from:
/dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) to:
/dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) July 27, 2008, at 11:57 PM
by -- Initial page creation...
Added lines 1-76:
ForewordI recently had success in building NTFS-3G and the accompanying FUSE kernel module for Unslung 6.10. The NTFS-3G driver so far appears to provide better performance, and is well tested in the Linux community. It also doesn't suffer from the Linksys proprietary driver bug where the driver locks up under heavy load. As of right now, I haven't had the time to learn how to create an optware package, but I thought I would provide some guidance on how to compile the software yourself. If someone has a place for me to upload the software - particularly the FUSE driver which is tough to build - then I'd be happy to share! Hopefully one day I will have time to create an optware package for easy installation, as I think a lot of people would love to use NTFS-3G. What follows is my best recollection of what I did to set up the proper build environment, and what I did to build the software. There may be some missing details, so if you run into any issues, please speak up. I may also not be doing this in the most efficient way, so if there are extra steps or an easier way to do a step, please share. Since Unslung runs a 2.4 kernel, we have to use FUSE v2.5.3 and NTFS-3G v1.2531. Okay - to the good stuff! Setting up a kernel build environment to build the FUSE kernel moduleWe must first build a kernel module for FUSE. FUSE is a driver that allows filesystems in user space, and is used by the NTFS-3G software. I didn't have much luck getting the module to build properly by compiling natively on the NSLU2 - I would get two unresolved symbols when I tried to insmod it. So what you must do is set up a cross-compiler build environment on an external Linux workstation. I found Sun's VirtualBox? a perfect solution for creating a quick and easy VirtualPC? on my Windows workstation to install Linux on. I used Ubuntu v8.04 as my Linux distro.
mkdir /usr/local/src
mkdir /usr/local/src/unslung cd /usr/local/src/unslung
wget --cache=off http://www.nslu2-linux.org/Makefile
make setup-host-ubuntu
cd /usr/local/src/fuse-2.5.3/kernel
./configure --with-kernel=/usr/local/src/unslung/unslung/tmp/work/unslung-kernel-2.4.22.l2.3r63-r22/linux-2.4.22/ --prefix=/opt
CC = gcc LD = ld to CC = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-gcc LD = /usr/local/src/unslung/unslung/tmp/cross/bin/armeb-linux-ld
unsigned ncpy = min(*size, cs->len);
if (val) {
flush_cache_all();
if (cs->write)
make
Setting up a native build environment for NTFS-3GI don't know if you can build the NTFS-3G user-tools on the Ubuntu machine (I assume you can, but I didn't try it), but you can build it right on your NSLU2 and use it in conjunction with the fuse.o kernel module to mount your NTFS drive.
ipkg install optware-devel
./configure make make install UsageOkay this is not a good solution for usage yet, as it doesn't work through reboots, but once I have the time to set up a permanent solution, I will update this section
/sbin/insmod /lib/modules/2.4.22-xfs/kernel/fs/fuse/fuse.o
ntfs-3g /dev/sdb1 /share/hdd/data/HDD_1_1_1 This should mount your NTFS drive using the new NTFS-3G driver. To verify run "mount" and it should say something similar to: /dev/sdb1 on /share/hdd/data/HDD_1_1_1 type fuse (rw,allow_other) |