USB on Asus Wl500g Premium v2
Enable USB Support from DD-WRT Web Interface
The first step is to enable USB support from the DD-WRT web interface. Open your favorite web browser and type “http://192.168.1.1
” in the address bar and hit “Enter
“. Once you log into the DD-WRT control panel, select “Services
” -> “USB
“. Enable the USB supports that you need. Then hit “Save
” and “Apply Settings
” buttons on the bottom. The router will reboot.

Prepare USB Flash Drive
I used the open-sourced GParted to partition and format my USB flash drive. Initially I planned to make two partitions on my USB drive: one swap
partition and one ext2
partition. After some reading, I found that making a swap
partition on USB flash drives is not a good idea. So I eventually made two partitions on my USB drive and formated them as ext2
file system.
Install Ext2 Module
The DD-WRT firmware (dd-wrt.v24-12714_NEWD_mini_usb.bin) I uploaded to my Asus Wl500gP2 router supports fat
, vfat
, ext3
file systems out of the box. However, it doesn’t support the ext2
file system. Therefore, I need to install an ext2
module on the router. You can check if your firmware supports the ext2
file system by issuing lsmod
command and checking if ext2
is listed as a loaded module.
To install ext2
module, use the following command:
ipkg install kmod-ext2 |
Now use lsmod
command to see if ext2
is loaded.
Enable JFFS from DD-WRT Web Interface
Again open your favorite web browser and log into the router’s DD-WRT control panel.
- Under “
Administration
” -> “Management
“: Enable JFFS2 and Clean JFFS2. - “
Save
” and then “Apply Settings
“. - Reboot the router.
Mount USB Flash Drive
- Insert your partitioned and formatted USB drive into an available USB port and restart the router to force detection.
- Check the
/dev
tree to see if your USB device was detected:root@DD-WRT:~# find /dev/scsi /dev/scsi /dev/scsi/host0 /dev/scsi/host0/bus0 /dev/scsi/host0/bus0/target0 /dev/scsi/host0/bus0/target0/lun0 /dev/scsi/host0/bus0/target0/lun0/disc /dev/scsi/host0/bus0/target0/lun0/part1 /dev/scsi/host0/bus0/target0/lun0/part2
-
You will see a
partN
entry for each detected partition. Use following commands to verify that they can be mounted and written to:cd/ mount -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part1 /mnt echo HELLOWORLD > /mnt/readme umount /mnt
- The above steps should complete without error. Repeat for all partitions.
-
The
noatime
mount option disables the file system from automatically updating the last accessed time stamp, a common tactic to reduce writes on flash media. -
The
nodiratime
mount option disables the file system from automatically updating the directory last accessed time stamp, also a common tactic to reduce writes on flash media.
Automatically Mount USB Flash Drive
-
You can now set them to mount automatically at boot by adding commands to a
usb.startup
script:mkdir -p /jffs/etc/config echo "mount -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part1 /mnt" > /jffs/etc/config/usb.startup echo "mount -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part2 /mmc" >> /jffs/etc/config/usb.startup chmod +x /jffs/etc/config/usb.startup
-
The contents of
usb.startup
will be executed automatically at boot, there is nothing you have to do to enable this, other than create the file and give it execute permissions (shown above). -
Reboot the router and verify that the partitions mount automatically by running the mount command:
root@DD-WRT:~# mount | grep -i part /dev/scsi/host0/bus0/target0/lun0/part1 on /mmc type ext3 (rw,noatime,nodiratime) /dev/scsi/host0/bus0/target0/lun0/part2 on /mnt type ext3 (rw,noatime,nodiratime)
Reference
DD-WRT: USB on ASUS WL500g Premium v2