************************************************************** * How to create and use a rw partition on wag354g * * v 0.1 * * Author: Marco Vedovati * * mailto: marco.v83@gmail.com * * http://cyberstorm.altervista.org/ * ************************************************************** * * * License: this guide is licensed under the * * Creative Commons Attribution-NonCommercial-ShareAlike 2.5 * * info @: http://creativecommons.org/licenses/by-nc-sa/2.5/ * * * ************************************************************** * As always, standard disclaimer: This is a free guide! * * I take no responsability for any loss, damage or injury * * arising from the use of it. * ************************************************************** This guide is available in the following languages: [EN] If you want, you can translate it it other language. Please let me know so that I can put it online. For errors (both grammatical and conceptual), succesful experiences or things I may have missed, contact me. Changelog: 0.1: initial release (2007/02/23) Index: .WARNING .Intro .Requirements .Checking existing partion .Format the partion .Mount the partion ------- WARNING: this process is potentially harmful! If you do some mistake there is the possibility to brick your router withtout the chance of recovery (unless of jtag ). Double check every command you enter! ------- Intro: This guide is about creating a 128KB rw partition on the Linksys WAG354G adsl router. This has been suggested me by woytekm, that also told me how it could be done. Thank you woytekm! Check out his site about the Linksys WAG200G: http://woytekm.googlepages.com/ -------- Requirements: * wag354g EU version using a fw version with: telnet access,nc, mount, umount, mkfs-minix. Also kernel must have minix fs support. For non-EU, be sure the partition is no used. Read furter... * On your pc: an hex-editor and netcat. For windows users: http://www.dblab.ece.ntua.gr/~adamo/hacks/netcat.html -------- Checking existing partion In the wag354g there are 5 partitions. One of these, the /dev/mtdblock/4 , should be used to store the files needed by the web-interface to display languages different from english. As in the EU version there is only english, this partition is usually unused. Despite this, the best thing to do before using it is to back it up on our pc and look if it's really unused. 1)Check what's the ip of your pc. Let's assume it is 192.168.1.10. Plug in the pc directly in the wag (if not you nay need to forward ports...). 2)Open a terminal. If in windows, start->run-> type "cmd" and enter in the directory where the nc application is located. Type but do NOT hit enter this: $ nc -lp 1234 > mtd4.bin 3)Telnet in the router; Type but do NOT hit enter this: # cat /dev/mtdblock/4 | nc 192.168.1.10 1234 4)Press enter on the terminal/cmd of your pc 5)Press enter on the wag354g. After one second the wag should have finished and shuold accept commands again. If not, press ctrl+c. 6)Now that you have the partition backup on your pc: -check the size ofmtd4.bin: 131072 bytes (128K). -with a hex-editor open mt4.bin and be sure it is all filled with "ff" If the check if successful, you may safely proceed -------- Format the partion 1)Telnet in the router; Type (double check the following before enter!!): $mkfs.minix /dev/mtdblock/4 wait until it finishes. Congratulations, now you have a rw partion! -------- Mount the partion mount -t minix /dev/mtdblock/4 /mnt you can now access the mounted fs entering in /mnt. Once you have stored a file in it, unmount the partion for the changes to take effect. Unmount using: umount /mnt ~~~~~~~~~~~ HAVE FUN!!