{"id":121,"date":"2013-11-28T02:10:13","date_gmt":"2013-11-28T10:10:13","guid":{"rendered":"http:\/\/nramkumar.org\/tech\/?p=121"},"modified":"2014-02-19T10:12:19","modified_gmt":"2014-02-19T18:12:19","slug":"dd-wrt-on-buffalo-wzr-hp-g300nh-usb-automount-issues-on-build-22118","status":"publish","type":"post","link":"https:\/\/nramkumar.org\/tech\/blog\/2013\/11\/28\/dd-wrt-on-buffalo-wzr-hp-g300nh-usb-automount-issues-on-build-22118\/","title":{"rendered":"DD-WRT on Buffalo WZR-HP-G300NH &#8211; USB automount issues on build 22118"},"content":{"rendered":"<p>In older posts <a title=\"DD-WRT on the Buffalo WZR-HP-G300NH \u2013 Jump in, the water is fine\" href=\"https:\/\/nramkumar.org\/tech\/blog\/2013\/04\/02\/dd-wrt-on-the-buffalo-wzr-hp-g300nh\/\" target=\"_blank\">here<\/a>\u00a0and <a title=\"DD-WRT on the Buffalo WZR-HP-G300NH \u2013 Adding USB storage and optware\" href=\"https:\/\/nramkumar.org\/tech\/blog\/2013\/04\/07\/dd-wrt-on-the-buffalo-wzr-hp-g300nh-adding-usb-storage-and-optware\/\" target=\"_blank\">here<\/a> I described my experiences with setting up the official Buffalo DD-WRT build on the Buffalo WZR-HP-G300NH router. It&#8217;s been a while and I&#8217;ve been wanting to update the DD-WRT version to the latest available build for this router &#8211; 22118. Why? Because being a geek, I just can&#8217;t stop tinkering &#8211; that&#8217;s why.<\/p>\n<p>The upgrade itself went fine &#8211; I just downloaded the build from <a title=\"22118\" href=\"ftp:\/\/ftp.dd-wrt.com\/betas\/2013\/07-24-2013-r22118\/buffalo_wzr-hp-g300nh\/buffalo_to_ddwrt_webflash-MULTI.bin\" target=\"_blank\">here<\/a> 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&#8217;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&#8217;t indicate any issues either &#8211; 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&#8217;t specify the file system type and failed, but once I specified that the file system type as ext2, it mounted fine.<\/p>\n<p>Still at a loss for why automount wasn&#8217;t working, I went back to the web UI and carefully looked at the output and finally figured it out &#8211; this build has a bug where automount mounts ext2 partitions as ext4!! To add insult to injury, the mount fails silently.<\/p>\n<p>Now that I had figured out why things weren&#8217;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 &#8211; 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 &#8211; this loads a bunch of modules that are required for USB support. Here&#8217;s my modified startup script that seems to work:<\/p>\n<pre>#!\/bin\/sh \r\n\r\ninsmod mbcache\r\ninsmod ext2\r\nsleep 2\r\nmount \/dev\/sda1 \/mnt -t ext2\r\nsleep 5 \r\nif [ -f \/mnt\/optware.enable ]; then \r\nmount -o bind \/mnt\/etc \/etc \r\nmount -o bind \/mnt\/root \/tmp\/root \r\nmount -o bind \/mnt\/opt \/opt\r\nfor f in \/opt\/etc\/init.d\/S*; do\r\n    [ -x $f ] &amp;&amp; $f start\r\ndone \r\nelse \r\nexit \r\nfi<\/pre>\n<p>I haven&#8217;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 &#8211; I&#8217;ll post an update after 1 or 2 weeks of use about WiFi stability and any issues.<\/p>\n<p>Update 1\/31\/2014 &#8211; I&#8217;ve had the router running this version of the firmware stably for roughly 3 months. Haven&#8217;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.<\/p>\n<p>Update 2\/19\/2014 &#8211; Fixed link to the version of dd-wrt I&#8217;m running on this router.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In older posts here\u00a0and here I described my experiences with setting up the official Buffalo DD-WRT build on the Buffalo WZR-HP-G300NH router. It&#8217;s been a while and I&#8217;ve been wanting to update the DD-WRT version to the latest available build for this router &#8211; 22118. Why? Because being a geek, I just can&#8217;t stop tinkering&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13,71,12],"tags":[],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-buffalo","category-dd-wrt","category-usb","category-wzr-hp-g300nh"],"_links":{"self":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/comments?post=121"}],"version-history":[{"count":4,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/121\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/media?parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/categories?post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/tags?post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}