When attempting to mount an external USB hard drive formatted with NTFS to a WRT600N Linksys router running dd-wrt you might receive a set of errors similar to the below.
Errors from DMESG:
SQUASHFS error: Can’t find a SQUASHFS superblock on sd(8,1)
FAT: Did not find valid FSINFO signature.
Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
The issue is the fact that there is not a NTFS module loaded by the kernel which can be verified by running the lsmod command. This will provide you a list of each module that’s installed such as the list below. You also want to make sure that USB is enabled with all of the support modules which will be located under Services in the dd-wrt web admin GUI under the USB sub navigation tab.
DD-WRT lsmod Output:
- root@DD-WRT:/# lsmod
- Module Size Used by
- ip_nat_pptp 2560 0 (unused)
- ip_conntrack_pptp 3036 1
- ip_nat_proto_gre 1664 0 (unused)
- ip_conntrack_proto_gre 2584 0 [ip_nat_pptp ip_conntrack_pptp]
- cifs 149728 1
- etherip 5104 0 (unused)
- jffs2 97848 1
- printer 10412 0 (unused)
- vfat 12544 0
- fat 38880 0 [vfat]
- ext3 76932 0
- jbd 58280 0 [ext3]
- ext2 43976 0
- usb-storage 40344 0
- sd_mod 13092 0
- scsi_mod 101488 3 [usb-storage sd_mod]
- ehci-hcd 22060 0 (unused)
- usb-ohci 20352 0 (unused)
- usbcore 84576 0 [printer usb-storage ehci-hcd usb-ohci]
- bcm57xxlsys 120016 1
As you can see there is no NTFS module listed so lets load it. First download the NTFS module here. After downloading and unpacking the file with tar make sure that JFFS2 is enabled and place the file in the /jffs2 directory. Use lsmod to install the file such as “insmod /jffs2/ntfs.o” The Module will now be loaded as a kernel module which can be verified by using lsmod which should provide output like the below (only the NTFS line is included).
DD-WRT lsmod Output:
- root@DD-WRT:/# lsmod
- Module Size Used by
- ntfs 65392 0
- etc, etc, etc.
You will also see a new message output to DMESG which can be seen after typing the dmesg command from the CLI. The message will say “NTFS driver v1.1.22 [Flags: R/W MODULE]”
The drive can now be mounted using the below syntax.
DD-WRT mount Drive Command:
- mount /dev/scsi/host1/bus0/target0/lun0/part1 /mnt
The drive will be mounted in read only mode which is shown after typing the “mount” command from the CLI.
DD-WRT mount Output:
- root@DD-WRT:/mnt# mount
- rootfs on / type rootfs (rw)
- /dev/root on / type squashfs (ro)
- none on /dev type devfs (rw)
- proc on /proc type proc (rw)
- ramfs on /tmp type ramfs (rw)
- /dev/mtdblock/4 on /jffs type jffs2 (rw)
- //192.168.1.245/wrt600n on /tmp/smbshare type cifs (rw,mand,nodiratime,unc=\\192.168.1.245\wrt600n,username=alex,domain=,rsize=4100,wsize=4100)
- /dev/scsi/host1/bus0/target0/lun0/part1 on /mnt type vfat (ro)
You can add a -o switch, you would also need to use rw right after -o, to the mount command and the new NTFS mount will show its mounted as rw or read-write but that will not be the case. I even tried umask=0000 as an option but that did not work either. You will pretty much only be able to copy files from this drive to other locations in the network. If you want to have this drive mounted automatically upon boot you can create a custom script.
To create a custom script on dd-wrt visit the web GUI admin. Select Administration from the top navigation and Commands from the sub navigation. The script contents would be similar to the below but may need to be modified depending on the location of the ntfs.o file and the identity of the USB drive. After entering the below click the “Save Custom Script” button.
DD-WRT Custom Script: custom.sh
- #!/bin/sh
- # Load NTFS Driver
- insmod /jffs2/ntfs.o
- # Mount USB Drive
- mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
After creating the script you need to configure it to start at boot so in the same Commands box type “/tmp/custom.sh &” and click the Save Startup button which will load the custom.sh command you created at each boot.
I suggest using a FAT formatted drive instead of NTFS until the support for NTFS is much easier. I also had a 16GB thumb drive laying around so I plugged that up to see what happened. The 16GB thumb drive was immediately recognized and worked in full read/write mode without issue.
You write awsome article, bookmarked
Hello luki,
Thanks for the compliment. I hope to continue writing articles that are useful to you.
Thanks.
alex
I just want to say that your blog is full of interesting articles, keep us posting
Hello teleskopy,
I appreciate the kind words and taking the time to leave feedback. Don’t worry… we will continue posting as long as there are issues to resolve which should be forever!
Thanks.
alex