Forums
New posts
Search forums
What's new
New posts
Latest activity
Feedback
View Statistics
Members
Current visitors
Buy Sell Trade
WTB
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Technology
Home Automation & Networking
Asus RT-N13U B1 - DD-wrt thread
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dinjo" data-source="post: 1388570" data-attributes="member: 29804"><p>Just checked that B1 now has dd-wrt support time to get rid of filthy Asus Software</p><p></p><p><a href="http://www.dd-wrt.com/site/support/router-database" target="_blank">Router Database | www.dd-wrt.com</a></p><p></p><p>Source - <a href="http://www.dd-wrt.com/wiki/index.php/Asus_RT-N13U" target="_blank">Asus RT-N13U - DD-WRT Wiki</a></p><p></p><p>So its finally here –</p><p></p><p>Most of the contents have been taken from DD-WRT Wiki and added/modified some info to improve the information flow.</p><p></p><p><strong><u>Guide to Install DD-WRT on Asus RT-N13U </u></strong></p><p></p><p><strong>Reasons why you should opt for DD-WRT over shitty Asus Firmware </strong></p><p></p><ul> <li data-xf-list-type="ul">Almost all Linux Kernel Fixes done in dd-wrt.</li> </ul><p></p><ul> <li data-xf-list-type="ul">Allows freedom to go about install any apps which linux supports(Most probably all of them)</li> </ul><p></p><ul> <li data-xf-list-type="ul">Very good for people who intend to use in cybercafes as it allows tighter control and improved security and proper logging of events</li> </ul><p></p><ul> <li data-xf-list-type="ul">DD-WRT is far superior compared to other open Firmware like Tomato and Open WRT and DD-WRT community is best in the recent times.</li> </ul><p></p><ul> <li data-xf-list-type="ul">Install Transmission to get all download on your USB without keeping the PC turned on[Yes it supports full resume downloads never break now]</li> </ul><p></p><p><strong><u>You should not do this if you dont understand much of it.[SERIOUSLY]</u></strong></p><p><strong></strong></p><p><strong><strong>Flashing Process </strong></strong></p><p></p><p>First and foremost you must take care that you have Asus Original Firmware with you just in case anything goes wrong while flashing[Dont hold me responsible]</p><p></p><ul> <li data-xf-list-type="ul">Download latest DD-WRT Firmware Image[This is the custom firmware]<br /> <br /> Browse to firmware repository and select/open most current directory, Ex. 12-24-10-r15962/<br /> <br /> Open 'Asus-RTN13U' directory and download 'asus-to-ddwrt.trx'[Choose the router model appropriately if its B1 then select from 'Asus-RTN13UB1' ]<br /> <br /> Recommended is to get 16804.</li> <li data-xf-list-type="ul">Download latest version of the Asus Utility[This is just in case of rolling back]<br /> <br /> Browse to <a href="http://support.asus.com/download" target="_blank">ASUSTeK Computer Inc. -Support- Drivers and Download</a><br /> <br /> In the three dropdown menus, select 'Wireless', 'AP/Router', 'RT-N13U', and click 'Search'<br /> <br /> Select OS in popup menu<br /> <br /> Click '+' next to 'Utilities' and skip down to your version (Also see next step, download firmware.)<br /> <br /> Within that zip file, navigate to the UT4063/Utility folder and run 'setup' to install.<br /> <br /> Be sure there is access to the Firmware Restoration utility</li> <li data-xf-list-type="ul">Download safety copy of Asus firmware<br /> <br /> Do same as previous step, except click '+' next to 'Firmware' and download latest version of your model<br /> <br /> Note that this file should not be needed; use only to restore Asus FW to router if later desired.</li> <li data-xf-list-type="ul">Last few checks<br /> <br /> If not already directly wired, connect Ethernet cable from one of the router's LAN ports to client PC.<br /> <br /> Be sure router's other three LAN ports and WAN port are open (nothing connected)[Very Very Important]<br /> <br /> On PC, disable all other network adapters: wireless, modem, etc.[Another very important step ignoring it might brick the router]<br /> <br /> On PC, disable any firewall (Ex. Windows Firewall)<br /> <br /> Optional: Set PC to use a static IP, Ex. 192.168.1.2, netmask 255.255.255.0, gateway 192.168.1.1[I recommend this to be done]<br /> <br /> If possible, use uninterruptable power supply (UPS) for both PC and router. A power failure while flashing, though not likely, will probably brick the router.<br /> <br /> Note: Early on, some had problems using Firefox. Consider using Internet Explorer or Chrome.</li> </ul><p></p><p><strong><u>Flash to DD-WRT</u></strong></p><p></p><ul> <li data-xf-list-type="ul">Place router in Recovery mode<br /> <br /> Disconnect power adapter plug from the RT-N13U<br /> <br /> Push and hold the Restore button located on bottom panel[use a pen point to press the button properly]. While continuing to hold down the Restore button, plug the power adapter back into router.<br /> <br /> After five seconds, LED on front panel starts to blink, release the button.</li> <li data-xf-list-type="ul">Upload firmware image<br /> <br /> On PC, open Asus' Firmware Restoration utility (installed earlier)<br /> <br /> In Firmware Restoration window, click 'Browse' and select the DD-WRT image file, asus-to-ddwrt.trx (downloaded earlier)<br /> <br /> Click 'Upload' to begin flash process that can take up to four minutes. Brick warning: Do not interrupt!<br /> <br /> When message that router is rebooting appears, close Firmware Restoration utility.</li> <li data-xf-list-type="ul">Reboot, launch DD-WRT web interface, and cleanup<br /> <br /> After a minute or two, disconnect power adapter plug from the RT-N13U<br /> <br /> Wait at least ten seconds, then reconnect to power<br /> <br /> If optional step of setting static IP was followed earlier, can reset to automatic<br /> <br /> Browse to 192.168.1.1 should bring up the DD-WRT web interface; set name/password for first access<br /> <br /> Configure router as desired. Default connection is DHCP; for DSL check DSL with DD-WRT.<br /> <br /> When satisfied that factory firmware will not be used again, uninstall Asus Utility from PC and delete Asus files.[I wont recommend removing this]</li> </ul><p></p><p><strong><u>Configure USB </u></strong></p><p></p><p>Once this is done CFW [DD-WRT] is installed on your router now you need to get other utilities installed.</p><p></p><p>Firstly need to configure a USB where we would be installing the apps</p><p></p><p>The software we will install needs to be saved on the usb disk and, while we could actually save it on the same partition we will use for the data, it is highly discouraged.</p><p></p><p>DD-WRT support Ext2, Ext3,FAT32,FAT,NTFS but i have gone with EXT3 since its gives best performance NTFS seriously hampers down the downloads if you do it via Transmission if you are not using router for downloads you can use NTFS as well</p><p></p><p>For this we will create 2 different partition Ii have Ext3 – 512MB [Acting like a C:] and a 12GB Ext3 partition acting as D: to store the data.</p><p></p><p>How to create partition on USB – Get Gparted from here <a href="http://gparted.sourceforge.net/download.php" target="_blank">GParted -- Download</a></p><p></p><p>There are also tools like Easeus Partition manager and Minti Tool Partion Manager</p><p></p><p>Burn it as iso and boot pc from CD</p><p></p><p>Follow the steps shown in the pics to see the procedure</p><p></p><p>Make sure you <strong>select proper drive and NOT Accidentaly your hard drive</strong></p><p></p><p><img src="http://i.imgur.com/UYDu6.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><img src="http://i.imgur.com/NSDtA.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><img src="http://i.imgur.com/2r0bn.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><img src="http://i.imgur.com/JqC2f.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><img src="http://i.imgur.com/SRhml.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><img src="http://i.imgur.com/kxjVK.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><img src="http://i.imgur.com/3tK32.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>Above steps are shown for Ext3 and NTFS but you can always create 2 different EXT3 Partition.</p><p></p><p>Once done re-start pc by clicking Exit option.</p><p></p><p></p><p></p><ul> <li data-xf-list-type="ul">Just paste the following into the text box in Administration -> Commands and click Save Startup<br /> <br /> [NOTE: configuration of filesystem support and partitions can be easy set at first line, NTFS needs aditional driver, that can be installed after you pass Optware guide by ipkg install ntfs-3g]</li> </ul><p></p><p>Read comments beside the line to understand what it does</p><p></p><p>[CODE]</p><p>mkdir /tmp/etc/config #Create a dir /tmp/etc/config</p><p>echo "wget http://home.karneval.cz/10102207/fs.gz -P /tmp/root" >> /tmp/etc/config/fs.wanup #Get the tar file which has fs drivers and store in /tmp/root</p><p>echo "tar -xvzf /tmp/root/fs.gz -C /tmp/root" >> /tmp/etc/config/fs.wanup #Build a shell script by appending to output using >> , command to extract the tar file.</p><p>echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup #Add ext3 to run it</p><p>echo "mount -o rw -t ext3 /dev/discs/disc0/part1 /opt" >> /tmp/etc/config/fs.wanup #Add mount to 1st partition</p><p>echo "mount -o rw -t ext3 /dev/discs/disc0/part2 /mnt" >> /tmp/etc/config/fs.wanup #Add mount to 2nd partition</p><p>echo "rm /tmp/root/*.ko /tmp/root/fs.gz /tmp/root/ext3" >> /tmp/etc/config/fs.wanup #Clean up the traces</p><p>chmod +x /tmp/etc/config/fs.wanup # Provide Exec permissions and run the above commands</p><p>echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd # Add nobody for samba share</p><p>sleep 60 # Wait for 1 minute</p><p></p><p>echo 1 > /sys/class/scsi_disk/0:0:0:0/allow_restart # To avoid HDD spindown</p><p></p><p>wget [URL]http://www.3iii.dk/linux/optware/settings.json[/URL] -O /mnt/data/torrents/.config/transmission-daemon/settings.json # Get the settings.json from internet just in case local file gets corrupted can you remove this if u dont want</p><p></p><p>/opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon #Start Transmission - Can remove this if you keep S99trans file keep either of them.</p><p></p><p>[/CODE]</p><p></p><ul> <li data-xf-list-type="ul">Enable the following under Services -> USB</li> <li data-xf-list-type="ul">Core USB Support</li> <li data-xf-list-type="ul">USB 2.0 Support</li> <li data-xf-list-type="ul">USB Storage Support</li> <li data-xf-list-type="ul">Automatic Drive Mount</li> </ul><p></p><ul> <li data-xf-list-type="ul">Reboot router with an ext3 formatted USB drive plugged in</li> </ul><p></p><p>If the drive was successfully mounted (which may take some time), try another filesystems by editing 1st line of script.</p><p></p><p>[NOTE: check mounts thru putty by df -h because in dd-wrt gui is is shown only after repluging drive]</p><p></p><p>You might see something like this.</p><p></p><p><img src="http://i.imgur.com/jkrAP.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>If you dont see /opt as mounted default go to Services->USB and change the mount to /opt Save and Apply Settings and then re-boot the router again Admin->Management go bottom Re-boot router</p><p></p><p><strong><u>Installing Optware</u></strong></p><p></p><p>Now we will be installing Optware which helps installing every other apps.</p><p></p><p>Before that get Putty</p><p></p><p>Telnet to 192.168.1.1 with root username and password which you had set and run mount command to see whether the drives have mounted correctly or not your drives have to be mounted correctlty to get move ahead</p><p></p><p>[code]</p><p></p><p>root@DD-WRT:/tmp# mount</p><p></p><p>rootfs on / type rootfs (rw)</p><p></p><p>/dev/root on / type squashfs (ro)</p><p></p><p>none on /dev type devfs (rw)</p><p></p><p>proc on /proc type proc (rw)</p><p></p><p>sysfs on /sys type sysfs (rw)</p><p></p><p>ramfs on /tmp type ramfs (rw)</p><p></p><p>devpts on /dev/pts type devpts (rw)</p><p></p><p>devpts on /proc/bus/usb type usbfs (rw)</p><p></p><p>/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime,nodiratime,data=ordered)</p><p></p><p>/dev/discs/disc0/part2 on /mnt type ext3 (rw,noatime,nodiratime,data=ordered)</p><p></p><p>root@DD-WRT:/tmp#</p><p></p><p>[/code]</p><p></p><p><img src="http://www.luminaria.cc/blog/wp-content/uploads/2010/09/Putty-Config.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>Host Name: 192.168.1.1</p><p></p><p>Connection type: Telnet</p><p></p><p><strong><u>Installing Optware (only to an ext3 partition; /opt MUST be empty)</u></strong></p><p></p><p>[code]</p><p></p><p>wget [URL]http://home.karneval.cz/10102207/optware-install.sh[/URL] -O - | tr -d '\r' > /tmp/optware-install.sh</p><p></p><p>sh /tmp/optware-install.sh; ipkg update; ipkg upgrade</p><p></p><p>wget [URL]http://home.karneval.cz/10102207/sort[/URL] -P /opt/bin; chmod +x /opt/bin/sort[/code]</p><p></p><p>[NOTE: gateway is hard set to 192.168.1.1, if u have problem with this replace in optware-install.sh by vi or sed]</p><p></p><p>Now you can install another Optware packabe from <a href="http://www.dd-wrt.com/wiki/index.php/Tutorials" target="_blank">Tutorials - DD-WRT Wiki</a> or if u like:</p><p></p><p>Recommend change to ipkg to track the download status while install pkg unhash the verbose-wget line</p><p></p><p>[code]</p><p></p><p>root@DD-WRT:/opt/etc# more ipkg.conf</p><p></p><p>#Uncomment the following line for native packages feed (if any)</p><p></p><p>#src/gz native [URL]http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/native/stable[/URL]</p><p></p><p>src/gz optware [URL]http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable[/URL]</p><p></p><p>dest /opt/ /</p><p></p><p>option verbose-wget ##################This line will have a # prefix to it , remove it</p><p></p><p>[/code]</p><p></p><p><strong>Install xinetd, vsftpd, samba, webserver, pxe boot server, wget, nano, htop, dlq rapget</strong></p><p></p><p>[I havent installed nano since i dont needed it vi does the job for me ;-) and dont install samba 3.5 samba 2 provide best transfer speeds]</p><p></p><p>[code]</p><p></p><p>ipkg install xinetd htop nano samba2 vsftpd tftp-hpa wget; killall xinetd smbd nmbd</p><p></p><p>rm /opt/etc/samba/smb.conf /opt/etc/vsftpd.conf /opt/etc/init.d/S80samba /opt/etc/xinetd.d/tftp</p><p></p><p>wget [URL]http://home.karneval.cz/10102207/opt.gz[/URL] -P /opt; tar -xvzf /opt/opt.gz -C /opt</p><p></p><p>sh /opt/etc/init.d/S10httpd; sh /opt/etc/init.d/S10xinetd; rm /opt/opt.gz[/code]</p><p></p><ul> <li data-xf-list-type="ul">Well done, RT-N13u is ready for basic usage, u can acces by</li> </ul><p></p><p>samba: \\192.168.1.1</p><p></p><p>rem to add as hardrive in W7/XP run in command line</p><p></p><p>net use a: \\192.168.1.1\www</p><p></p><p>net use b: \\192.168.1.1\dlq </p><p></p><p>web: <a href="http://192.168.1.1:8080" target="_blank">http://192.168.1.1:8080</a></p><p></p><p>ftp: <a href="ftp://192.168.1.1" target="_blank">ftp://192.168.1.1</a></p><p></p><ul> <li data-xf-list-type="ul">Open to the world (paste to Administrations -> Commands and Save Firewall)<br /> <br /> [code]<br /> <br /> iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 80 -j DNAT --to 192.168.1.1:8080<br /> <br /> iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 22 -j DNAT --to 192.168.1.1:22<br /> <br /> iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 21 -j DNAT --to 192.168.1.1:21<br /> <br /> iptables -I INPUT -p tcp -d 192.168.1.1 --dport 8080 -j logaccept<br /> <br /> iptables -I INPUT -p tcp -d 192.168.1.1 --dport 22 -j logaccept<br /> <br /> iptables -I INPUT -p tcp -d 192.168.1.1 --dport 21 -j logaccept[/code]<br /> <br /> Now the reason why i bought this router<br /> <br /> <strong><u>Installing a Transmission-daemon</u></strong><br /> <br /> Make the following folders<br /> <br /> [code]<br /> <br /> cd /mnt<br /> <br /> mkdir -p /mnt/data/torrents # -p to make both directories at the same time[/code]<br /> <br /> The plan is to have everything torrent go to the folder /mnt/data/torrents.So torrent data would be under Partition 2<br /> <br /> Installing Transmission<br /> <br /> [code]<br /> <br /> /opt/bin/ipkg-opt -verbose_wget install transmission[/code]<br /> <br /> Started and stopped Transmission to get the basic work folders<br /> <br /> [code]<br /> <br /> /opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon<br /> <br /> killall transmission-daemon<br /> <br /> [/code]<br /> <br /> With the command above you get the basic folder structure of:<br /> <br /> [code]<br /> <br /> /mnt/data/torrents/.config/<br /> <br /> /mnt/data/torrents/.config/transmission-daemon<br /> <br /> /mnt/data/torrents/.config/transmission-daemon/settings.json #file<br /> <br /> /mnt/data/torrents/.config/transmission-daemon/stats.json #file<br /> <br /> /mnt/data/torrents/.config/transmission-daemon/blocklists<br /> <br /> /mnt/data/torrents/.config/transmission-daemon/resume <br /> <br /> /mnt/data/torrents/.config/transmission-daemon/torrents<br /> <br /> [/code]<br /> <br /> Edit settings.json to contain the following<br /> <br /> [code]<br /> <br /> vi /mnt/data/torrents/.config/transmission-daemon/settings.json<br /> <br /> {<br /> <br /> "blocklist-enabled": 1,<br /> <br /> "download-dir": "/mnt/data/torrents",<br /> <br /> "download-limit": 100,<br /> <br /> "download-limit-enabled": 1,<br /> <br /> "dht-enabled": false,<br /> <br /> "encryption": 2,<br /> <br /> "lpd-enabled": false,<br /> <br /> "max-peers-global": 35,<br /> <br /> "peer-port": 25000,<br /> <br /> "pex-enabled": 1,<br /> <br /> "port-forwarding-enabled": 1,<br /> <br /> "rpc-authentication-required": 0,<br /> <br /> "rpc-password": "",<br /> <br /> "rpc-port": 9091,<br /> <br /> "rpc-username": "",<br /> <br /> "rpc-whitelist": "192.168.1.*",<br /> <br /> "umask": 0,<br /> <br /> "upload-limit": 200,<br /> <br /> "upload-limit-enabled": 1,<br /> <br /> "utp-enabled": true<br /> <br /> }<br /> <br /> [/code]<br /> <br /> The file settings.json can also be downloaded from here (the wget command is one line):<br /> <br /> [code]wget [URL]http://www.3iii.dk/linux/optware/settings.json[/URL] -O /mnt/data/torrents/.config/transmission-daemon/settings.json[/code]<br /> <br /> Open the port<br /> <br /> [code]<br /> <br /> /usr/sbin/iptables -I INPUT 1 -p tcp --dport 25000 -j logaccept[/code]<br /> <br /> Run again<br /> <br /> [code]/opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon[/code]<br /> <br /> <strong>Accessing Transmission web interface</strong><br /> <br /> Now you get web access to the Transmission page by going to <a href="http://192.168.1.1:9091" target="_blank">http://192.168.1.1:9091</a>. That is, if your routers IP is 192.168.1.1<br /> <br /> <br /> <br /> The downloaded file will turn up in the /mnt/data/torrents folder.<br /> <br /> The full space of the file will be reserved from the start, so in a FTP, WinSCP or Explorer via Samba it may seem like the file is all there immediately, but it is not! It is fully downloaded when the line turns green in the Transmission web interface at 192.168.1.1:9091.<br /> <br /> You can see details about any of the torrent files by clicking the Inspector button on the right in the Transmission web interface.<br /> <br /> I personally prefer Transmission Remote GUI, nice uTorrent kind of interface just enter IP as 192.168.1.1 and port as 9091[Or whatever you have confired]<br /> <br /> <a href="http://code.google.com/p/transmisson-remote-gui/" target="_blank">http://code.google.c...son-remote-gui/</a><br /> <br /> <u><strong>Wanna Share the Data of the Mounted Drive via Wi-Fi run the below command</strong></u><br /> <br /> [code]ln -s /mnt/data /opt/share/www/data[/code]<br /> <br /> Change the smb.conf file to /mnt/data<br /> <br /> Or just simply change the samba file.<br /> <br /> [code]<br /> <br /> root@DD-WRT:/opt/etc/samba# vi smb.conf<br /> <br /> [global]<br /> <br /> server string = dd-wrt<br /> <br /> workgroup = dd-wrt<br /> <br /> netbios name = dd-wrt<br /> <br /> interfaces = 192.168.1.1/255.255.255.0<br /> <br /> security = share<br /> <br /> encrypt passwords = yes<br /> <br /> smb passwd file = /opt/etc/samba/smbpasswd<br /> <br /> null passwords = Yes<br /> <br /> client code page = 850<br /> <br /> character set = ISO8859-1<br /> <br /> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192<br /> <br /> log file = /opt/var/samba/log.*<br /> <br /> max log size = 100<br /> <br /> load printers = No<br /> <br /> dns proxy = No<br /> <br /> hosts allow = 192.168. 127.<br /> <br /> remote announce = 192.168.1.255<br /> <br /> [www]<br /> <br /> [B]path = /mnt/data[/B] #######This is where you change<br /> <br /> read only = no<br /> <br /> guest ok = yes<br /> <br /> [dlq]<br /> <br /> path = /opt/share/dlq<br /> <br /> read only = no<br /> <br /> guest ok = yes<br /> <br /> [/code]<br /> <br /> <span style="font-size: 15px">Having problems mounting the drive</span><br /> <br /> Read the guide again , you have definitely missed something, most people do the incorrect partitioning causing all the trouble and do not add the startup script.<br /> <br /> If still not provide the output of following commands in the thread<br /> <br /> [code]<br /> <br /> dmesg<br /> <br /> lsmod<br /> <br /> cd /dev/discs/disc0;ls -lrt<br /> <br /> mount<br /> <br /> [/code]<br /> <br /> <span style="font-size: 15px">To recognize ext3 partition in Windows get Ext2FSD install and run the service then you can read write on Ext3 partition too on windows.</span><br /> <br /> <a href="http://www.ext2fsd.com/" target="_blank">Ext2Fsd Project</a><br /> <br /> <strong>Hard disk spin down issue fix [recommended for Portable HDD]</strong><br /> <br /> [code]<br /> <br /> echo 1 > /sys/class/scsi_disk/0:0:0:0/allow_restart<br /> <br /> [/code]<br /> <br /> <strong>USB Getting unmounted / readonly with below error in dmesg</strong><br /> <br /> <br /> <br /> Run this<br /> <br /> [CODE]<br /> <br /> echo 128 > /sys/block/sda/device/max_sectors<br /> <br /> [/CODE]<br /> <br /> Add this to your startup<br /> <br /> How many torrents can it handle ?<br /> <br /> <img src="http://i.imgur.com/pW8ky.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /><br /> <br /> If you cant get the drive mounted make sure you had the startup script set up correctly and partitions are created in correct order and if you are on ADSL make sure the modem is connected to internet.<br /> <br /> Reverting to Asus Firmware<br /> <br /> [code]<br /> <br /> First: download the right firmware from the ASUS website ([URL]http://support.asus.com/download/download.aspx?SLanguage=en-us[/URL])<br /> <br /> Second: Setup your computer as you did to flash to DD-WRT (static IP address, disable other networking adapters, and use a wired LAN connection, disable your firewall).<br /> <br /> Third: Install and open the Asus Firmware Restoration utility in windows. Once this is all ready to go, unplug the router. Wait a few seconds, then hold the restore button on the underside of the router. While holding the restore button plug the router back in and keep holding the button until the power light flashes slowly. It will then be in recovery mode waiting for the utility to upload the firmware.<br /> <br /> Fourth: With the router in recovery mode, select the downloaded firmware with the Firmware Restoration utility. Then click the button to start the upload. The utility will guide you from there.<br /> <br /> Once done Reset all of the settings to default and started from scratch.<br /> <br /> [/code]<br /> <br /> <strong><span style="font-size: 15px">P.S - I have sold my device so i wont able to help much as if now</span></strong></li> </ul></blockquote><p></p>
[QUOTE="dinjo, post: 1388570, member: 29804"] Just checked that B1 now has dd-wrt support time to get rid of filthy Asus Software [URL="http://www.dd-wrt.com/site/support/router-database"]Router Database | www.dd-wrt.com[/URL] Source - [URL="http://www.dd-wrt.com/wiki/index.php/Asus_RT-N13U"]Asus RT-N13U - DD-WRT Wiki[/URL] So its finally here – Most of the contents have been taken from DD-WRT Wiki and added/modified some info to improve the information flow. [B][U]Guide to Install DD-WRT on Asus RT-N13U [/U][/B] [B]Reasons why you should opt for DD-WRT over shitty Asus Firmware [/B] [LIST] [*]Almost all Linux Kernel Fixes done in dd-wrt. [/LIST] [LIST] [*]Allows freedom to go about install any apps which linux supports(Most probably all of them) [/LIST] [LIST] [*]Very good for people who intend to use in cybercafes as it allows tighter control and improved security and proper logging of events [/LIST] [LIST] [*]DD-WRT is far superior compared to other open Firmware like Tomato and Open WRT and DD-WRT community is best in the recent times. [/LIST] [LIST] [*]Install Transmission to get all download on your USB without keeping the PC turned on[Yes it supports full resume downloads never break now] [/LIST] [B][U]You should not do this if you dont understand much of it.[SERIOUSLY][/U] [B]Flashing Process [/B][/B] First and foremost you must take care that you have Asus Original Firmware with you just in case anything goes wrong while flashing[Dont hold me responsible] [LIST] [*]Download latest DD-WRT Firmware Image[This is the custom firmware] Browse to firmware repository and select/open most current directory, Ex. 12-24-10-r15962/ Open 'Asus-RTN13U' directory and download 'asus-to-ddwrt.trx'[Choose the router model appropriately if its B1 then select from 'Asus-RTN13UB1' ] Recommended is to get 16804. [*]Download latest version of the Asus Utility[This is just in case of rolling back] Browse to [URL="http://support.asus.com/download"]ASUSTeK Computer Inc. -Support- Drivers and Download[/URL] In the three dropdown menus, select 'Wireless', 'AP/Router', 'RT-N13U', and click 'Search' Select OS in popup menu Click '+' next to 'Utilities' and skip down to your version (Also see next step, download firmware.) Within that zip file, navigate to the UT4063/Utility folder and run 'setup' to install. Be sure there is access to the Firmware Restoration utility [*]Download safety copy of Asus firmware Do same as previous step, except click '+' next to 'Firmware' and download latest version of your model Note that this file should not be needed; use only to restore Asus FW to router if later desired. [*]Last few checks If not already directly wired, connect Ethernet cable from one of the router's LAN ports to client PC. Be sure router's other three LAN ports and WAN port are open (nothing connected)[Very Very Important] On PC, disable all other network adapters: wireless, modem, etc.[Another very important step ignoring it might brick the router] On PC, disable any firewall (Ex. Windows Firewall) Optional: Set PC to use a static IP, Ex. 192.168.1.2, netmask 255.255.255.0, gateway 192.168.1.1[I recommend this to be done] If possible, use uninterruptable power supply (UPS) for both PC and router. A power failure while flashing, though not likely, will probably brick the router. Note: Early on, some had problems using Firefox. Consider using Internet Explorer or Chrome. [/LIST] [B][U]Flash to DD-WRT[/U][/B] [LIST] [*]Place router in Recovery mode Disconnect power adapter plug from the RT-N13U Push and hold the Restore button located on bottom panel[use a pen point to press the button properly]. While continuing to hold down the Restore button, plug the power adapter back into router. After five seconds, LED on front panel starts to blink, release the button. [*]Upload firmware image On PC, open Asus' Firmware Restoration utility (installed earlier) In Firmware Restoration window, click 'Browse' and select the DD-WRT image file, asus-to-ddwrt.trx (downloaded earlier) Click 'Upload' to begin flash process that can take up to four minutes. Brick warning: Do not interrupt! When message that router is rebooting appears, close Firmware Restoration utility. [*]Reboot, launch DD-WRT web interface, and cleanup After a minute or two, disconnect power adapter plug from the RT-N13U Wait at least ten seconds, then reconnect to power If optional step of setting static IP was followed earlier, can reset to automatic Browse to 192.168.1.1 should bring up the DD-WRT web interface; set name/password for first access Configure router as desired. Default connection is DHCP; for DSL check DSL with DD-WRT. When satisfied that factory firmware will not be used again, uninstall Asus Utility from PC and delete Asus files.[I wont recommend removing this] [/LIST] [B][U]Configure USB [/U][/B] Once this is done CFW [DD-WRT] is installed on your router now you need to get other utilities installed. Firstly need to configure a USB where we would be installing the apps The software we will install needs to be saved on the usb disk and, while we could actually save it on the same partition we will use for the data, it is highly discouraged. DD-WRT support Ext2, Ext3,FAT32,FAT,NTFS but i have gone with EXT3 since its gives best performance NTFS seriously hampers down the downloads if you do it via Transmission if you are not using router for downloads you can use NTFS as well For this we will create 2 different partition Ii have Ext3 – 512MB [Acting like a C:] and a 12GB Ext3 partition acting as D: to store the data. How to create partition on USB – Get Gparted from here [URL="http://gparted.sourceforge.net/download.php"]GParted -- Download[/URL] There are also tools like Easeus Partition manager and Minti Tool Partion Manager Burn it as iso and boot pc from CD Follow the steps shown in the pics to see the procedure Make sure you [B]select proper drive and NOT Accidentaly your hard drive[/B] [IMG]http://i.imgur.com/UYDu6.png[/IMG] [IMG]http://i.imgur.com/NSDtA.png[/IMG] [IMG]http://i.imgur.com/2r0bn.png[/IMG] [IMG]http://i.imgur.com/JqC2f.png[/IMG] [IMG]http://i.imgur.com/SRhml.png[/IMG] [IMG]http://i.imgur.com/kxjVK.png[/IMG] [IMG]http://i.imgur.com/3tK32.png[/IMG] Above steps are shown for Ext3 and NTFS but you can always create 2 different EXT3 Partition. Once done re-start pc by clicking Exit option. [LIST] [*]Just paste the following into the text box in Administration -> Commands and click Save Startup [NOTE: configuration of filesystem support and partitions can be easy set at first line, NTFS needs aditional driver, that can be installed after you pass Optware guide by ipkg install ntfs-3g] [/LIST] Read comments beside the line to understand what it does [CODE] mkdir /tmp/etc/config #Create a dir /tmp/etc/config echo "wget http://home.karneval.cz/10102207/fs.gz -P /tmp/root" >> /tmp/etc/config/fs.wanup #Get the tar file which has fs drivers and store in /tmp/root echo "tar -xvzf /tmp/root/fs.gz -C /tmp/root" >> /tmp/etc/config/fs.wanup #Build a shell script by appending to output using >> , command to extract the tar file. echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup #Add ext3 to run it echo "mount -o rw -t ext3 /dev/discs/disc0/part1 /opt" >> /tmp/etc/config/fs.wanup #Add mount to 1st partition echo "mount -o rw -t ext3 /dev/discs/disc0/part2 /mnt" >> /tmp/etc/config/fs.wanup #Add mount to 2nd partition echo "rm /tmp/root/*.ko /tmp/root/fs.gz /tmp/root/ext3" >> /tmp/etc/config/fs.wanup #Clean up the traces chmod +x /tmp/etc/config/fs.wanup # Provide Exec permissions and run the above commands echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd # Add nobody for samba share sleep 60 # Wait for 1 minute echo 1 > /sys/class/scsi_disk/0:0:0:0/allow_restart # To avoid HDD spindown wget [URL]http://www.3iii.dk/linux/optware/settings.json[/URL] -O /mnt/data/torrents/.config/transmission-daemon/settings.json # Get the settings.json from internet just in case local file gets corrupted can you remove this if u dont want /opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon #Start Transmission - Can remove this if you keep S99trans file keep either of them. [/CODE] [LIST] [*]Enable the following under Services -> USB [*]Core USB Support [*]USB 2.0 Support [*]USB Storage Support [*]Automatic Drive Mount [/LIST] [LIST] [*]Reboot router with an ext3 formatted USB drive plugged in [/LIST] If the drive was successfully mounted (which may take some time), try another filesystems by editing 1st line of script. [NOTE: check mounts thru putty by df -h because in dd-wrt gui is is shown only after repluging drive] You might see something like this. [IMG]http://i.imgur.com/jkrAP.jpg[/IMG] If you dont see /opt as mounted default go to Services->USB and change the mount to /opt Save and Apply Settings and then re-boot the router again Admin->Management go bottom Re-boot router [B][U]Installing Optware[/U][/B] Now we will be installing Optware which helps installing every other apps. Before that get Putty Telnet to 192.168.1.1 with root username and password which you had set and run mount command to see whether the drives have mounted correctly or not your drives have to be mounted correctlty to get move ahead [code] root@DD-WRT:/tmp# mount rootfs on / type rootfs (rw) /dev/root on / type squashfs (ro) none on /dev type devfs (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) ramfs on /tmp type ramfs (rw) devpts on /dev/pts type devpts (rw) devpts on /proc/bus/usb type usbfs (rw) /dev/discs/disc0/part1 on /opt type ext3 (rw,noatime,nodiratime,data=ordered) /dev/discs/disc0/part2 on /mnt type ext3 (rw,noatime,nodiratime,data=ordered) root@DD-WRT:/tmp# [/code] [IMG]http://www.luminaria.cc/blog/wp-content/uploads/2010/09/Putty-Config.png[/IMG] Host Name: 192.168.1.1 Connection type: Telnet [B][U]Installing Optware (only to an ext3 partition; /opt MUST be empty)[/U][/B] [code] wget [URL]http://home.karneval.cz/10102207/optware-install.sh[/URL] -O - | tr -d '\r' > /tmp/optware-install.sh sh /tmp/optware-install.sh; ipkg update; ipkg upgrade wget [URL]http://home.karneval.cz/10102207/sort[/URL] -P /opt/bin; chmod +x /opt/bin/sort[/code] [NOTE: gateway is hard set to 192.168.1.1, if u have problem with this replace in optware-install.sh by vi or sed] Now you can install another Optware packabe from [URL="http://www.dd-wrt.com/wiki/index.php/Tutorials"]Tutorials - DD-WRT Wiki[/URL] or if u like: Recommend change to ipkg to track the download status while install pkg unhash the verbose-wget line [code] root@DD-WRT:/opt/etc# more ipkg.conf #Uncomment the following line for native packages feed (if any) #src/gz native [URL]http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/native/stable[/URL] src/gz optware [URL]http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable[/URL] dest /opt/ / option verbose-wget ##################This line will have a # prefix to it , remove it [/code] [B]Install xinetd, vsftpd, samba, webserver, pxe boot server, wget, nano, htop, dlq rapget[/B] [I havent installed nano since i dont needed it vi does the job for me ;-) and dont install samba 3.5 samba 2 provide best transfer speeds] [code] ipkg install xinetd htop nano samba2 vsftpd tftp-hpa wget; killall xinetd smbd nmbd rm /opt/etc/samba/smb.conf /opt/etc/vsftpd.conf /opt/etc/init.d/S80samba /opt/etc/xinetd.d/tftp wget [URL]http://home.karneval.cz/10102207/opt.gz[/URL] -P /opt; tar -xvzf /opt/opt.gz -C /opt sh /opt/etc/init.d/S10httpd; sh /opt/etc/init.d/S10xinetd; rm /opt/opt.gz[/code] [LIST] [*]Well done, RT-N13u is ready for basic usage, u can acces by [/LIST] samba: \\192.168.1.1 rem to add as hardrive in W7/XP run in command line net use a: \\192.168.1.1\www net use b: \\192.168.1.1\dlq web: [URL]http://192.168.1.1:8080[/URL] ftp: [URL]ftp://192.168.1.1[/URL] [LIST]Open to the world (paste to Administrations -> Commands and Save Firewall) [code] iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 80 -j DNAT --to 192.168.1.1:8080 iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 22 -j DNAT --to 192.168.1.1:22 iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 21 -j DNAT --to 192.168.1.1:21 iptables -I INPUT -p tcp -d 192.168.1.1 --dport 8080 -j logaccept iptables -I INPUT -p tcp -d 192.168.1.1 --dport 22 -j logaccept iptables -I INPUT -p tcp -d 192.168.1.1 --dport 21 -j logaccept[/code] Now the reason why i bought this router [B][U]Installing a Transmission-daemon[/U][/B] Make the following folders [code] cd /mnt mkdir -p /mnt/data/torrents # -p to make both directories at the same time[/code] The plan is to have everything torrent go to the folder /mnt/data/torrents.So torrent data would be under Partition 2 Installing Transmission [code] /opt/bin/ipkg-opt -verbose_wget install transmission[/code] Started and stopped Transmission to get the basic work folders [code] /opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon killall transmission-daemon [/code] With the command above you get the basic folder structure of: [code] /mnt/data/torrents/.config/ /mnt/data/torrents/.config/transmission-daemon /mnt/data/torrents/.config/transmission-daemon/settings.json #file /mnt/data/torrents/.config/transmission-daemon/stats.json #file /mnt/data/torrents/.config/transmission-daemon/blocklists /mnt/data/torrents/.config/transmission-daemon/resume /mnt/data/torrents/.config/transmission-daemon/torrents [/code] Edit settings.json to contain the following [code] vi /mnt/data/torrents/.config/transmission-daemon/settings.json { "blocklist-enabled": 1, "download-dir": "/mnt/data/torrents", "download-limit": 100, "download-limit-enabled": 1, "dht-enabled": false, "encryption": 2, "lpd-enabled": false, "max-peers-global": 35, "peer-port": 25000, "pex-enabled": 1, "port-forwarding-enabled": 1, "rpc-authentication-required": 0, "rpc-password": "", "rpc-port": 9091, "rpc-username": "", "rpc-whitelist": "192.168.1.*", "umask": 0, "upload-limit": 200, "upload-limit-enabled": 1, "utp-enabled": true } [/code] The file settings.json can also be downloaded from here (the wget command is one line): [code]wget [URL]http://www.3iii.dk/linux/optware/settings.json[/URL] -O /mnt/data/torrents/.config/transmission-daemon/settings.json[/code] Open the port [code] /usr/sbin/iptables -I INPUT 1 -p tcp --dport 25000 -j logaccept[/code] Run again [code]/opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon[/code] [B]Accessing Transmission web interface[/B] Now you get web access to the Transmission page by going to [URL]http://192.168.1.1:9091[/URL]. That is, if your routers IP is 192.168.1.1 The downloaded file will turn up in the /mnt/data/torrents folder. The full space of the file will be reserved from the start, so in a FTP, WinSCP or Explorer via Samba it may seem like the file is all there immediately, but it is not! It is fully downloaded when the line turns green in the Transmission web interface at 192.168.1.1:9091. You can see details about any of the torrent files by clicking the Inspector button on the right in the Transmission web interface. I personally prefer Transmission Remote GUI, nice uTorrent kind of interface just enter IP as 192.168.1.1 and port as 9091[Or whatever you have confired] [URL="http://code.google.com/p/transmisson-remote-gui/"]http://code.google.c...son-remote-gui/[/URL] [U][B]Wanna Share the Data of the Mounted Drive via Wi-Fi run the below command[/B][/U] [code]ln -s /mnt/data /opt/share/www/data[/code] Change the smb.conf file to /mnt/data Or just simply change the samba file. [code] root@DD-WRT:/opt/etc/samba# vi smb.conf [global] server string = dd-wrt workgroup = dd-wrt netbios name = dd-wrt interfaces = 192.168.1.1/255.255.255.0 security = share encrypt passwords = yes smb passwd file = /opt/etc/samba/smbpasswd null passwords = Yes client code page = 850 character set = ISO8859-1 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 log file = /opt/var/samba/log.* max log size = 100 load printers = No dns proxy = No hosts allow = 192.168. 127. remote announce = 192.168.1.255 [www] [B]path = /mnt/data[/B] #######This is where you change read only = no guest ok = yes [dlq] path = /opt/share/dlq read only = no guest ok = yes [/code] [SIZE=4]Having problems mounting the drive[/SIZE] Read the guide again , you have definitely missed something, most people do the incorrect partitioning causing all the trouble and do not add the startup script. If still not provide the output of following commands in the thread [code] dmesg lsmod cd /dev/discs/disc0;ls -lrt mount [/code] [SIZE=4]To recognize ext3 partition in Windows get Ext2FSD install and run the service then you can read write on Ext3 partition too on windows.[/SIZE] [URL="http://www.ext2fsd.com/"]Ext2Fsd Project[/URL] [B]Hard disk spin down issue fix [recommended for Portable HDD][/B] [code] echo 1 > /sys/class/scsi_disk/0:0:0:0/allow_restart [/code] [B]USB Getting unmounted / readonly with below error in dmesg[/B] Run this [CODE] echo 128 > /sys/block/sda/device/max_sectors [/CODE] Add this to your startup How many torrents can it handle ? [IMG]http://i.imgur.com/pW8ky.jpg[/IMG] If you cant get the drive mounted make sure you had the startup script set up correctly and partitions are created in correct order and if you are on ADSL make sure the modem is connected to internet. Reverting to Asus Firmware [code] First: download the right firmware from the ASUS website ([URL]http://support.asus.com/download/download.aspx?SLanguage=en-us[/URL]) Second: Setup your computer as you did to flash to DD-WRT (static IP address, disable other networking adapters, and use a wired LAN connection, disable your firewall). Third: Install and open the Asus Firmware Restoration utility in windows. Once this is all ready to go, unplug the router. Wait a few seconds, then hold the restore button on the underside of the router. While holding the restore button plug the router back in and keep holding the button until the power light flashes slowly. It will then be in recovery mode waiting for the utility to upload the firmware. Fourth: With the router in recovery mode, select the downloaded firmware with the Firmware Restoration utility. Then click the button to start the upload. The utility will guide you from there. Once done Reset all of the settings to default and started from scratch. [/code] [B][SIZE=4]P.S - I have sold my device so i wont able to help much as if now[/SIZE][/B][/LIST] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Technology
Home Automation & Networking
Asus RT-N13U B1 - DD-wrt thread
Top