DD-WRT on Buffalo WZR-HP-G300NH – USB automount issues on build 22118

In older posts here and here I described my experiences with setting up the official Buffalo DD-WRT build on the Buffalo WZR-HP-G300NH router. It’s been a while and I’ve been wanting to update the DD-WRT version to the latest available build for this router – 22118. Why? Because being a geek, I just can’t stop tinkering – that’s why.

The upgrade itself went fine – I just downloaded the build from here and upgraded using the web UI. Everything went seemingly fine and the router booted back up without issues. I did not do a full reset. Network connectivity (both LAN and WAN) was fine and wireless seemed to be working fine too. However, I noticed that the USB stick that I had provisioned for optware and other data wasn’t mounted properly. The web UI seemed to indicate that it was mounted as expected, but when I looked at the output of mount in a PuTTY console it clearly indicated that none of the partitions other than swap was mounted correctly. dmesg didn’t indicate any issues either – no errors. After scratching my head for a while, I first tried to mount the partitions in the USB stick manually. My first attempt didn’t specify the file system type and failed, but once I specified that the file system type as ext2, it mounted fine.

Still at a loss for why automount wasn’t working, I went back to the web UI and carefully looked at the output and finally figured it out – this build has a bug where automount mounts ext2 partitions as ext4!! To add insult to injury, the mount fails silently.

Now that I had figured out why things weren’t working as expected, now it was time to figure out how to fix it. After a bit of trial and error, this is how I fixed the problem – manually load required modules (mbcache and ext2), manually mount the partitions in my startup script. Note that you still want to leave the option for automount on – this loads a bunch of modules that are required for USB support. Here’s my modified startup script that seems to work:

#!/bin/sh 

insmod mbcache
insmod ext2
sleep 2
mount /dev/sda1 /mnt -t ext2
sleep 5 
if [ -f /mnt/optware.enable ]; then 
mount -o bind /mnt/etc /etc 
mount -o bind /mnt/root /tmp/root 
mount -o bind /mnt/opt /opt
for f in /opt/etc/init.d/S*; do
    [ -x $f ] && $f start
done 
else 
exit 
fi

I haven’t tried the built-in privoxy in this build, but I suspect it will have the same high CPU usage and slow response issues I saw with the optware version when used with fanboy/easylist block lists. My suggestion for anyone thinking of upgrading to this build would be to wait if you can – I’ll post an update after 1 or 2 weeks of use about WiFi stability and any issues.

Update 1/31/2014 – I’ve had the router running this version of the firmware stably for roughly 3 months. Haven’t seen any issues with WiFi connectivity or speed. Looks like it is safe to use this version once you work around the automount bugs.

Update 2/19/2014 – Fixed link to the version of dd-wrt I’m running on this router.

1 Reply to “DD-WRT on Buffalo WZR-HP-G300NH – USB automount issues on build 22118”

  1. Thanks for posting this. I know this is old but I have this version of firmware and was trying to get a USB drive working for the first time. I think i read every guide and forum post but could not get it to work. I was pulling my hair out. I came across your feedback here and solved my problem.
    THANK YOU !

Leave a Reply

Your email address will not be published. Required fields are marked *