Page 1 of 4 123 ... LastLast
Results 1 to 15 of 57

Thread: [HowTo] Asus RT-N16 (Oleg) - optware the simple way

  1. #1

    Lightbulb [HowTo] Asus RT-N16 (Oleg) - optware the simple way

    Updated on 21.10.2011 to work also with 2.4 kernel routers

    If you have just changed to Oleg firmware without Linux experience, this short tutorial may help. It re-uses the excellent Wengi tutorial and Raas image.
    Official Oleg firmware version: http://code.google.com/p/wl500g/downloads/list

    You'll need USB stick/HDD (>2GB, but reasonable size HDD if you plan to store/download files as USB sticks wear out).
    Note: Do not store any data on the disk as it will be re-partitioned and everything will be lost.
    Connect only the disk that will contain the system!


    Do not change user name from admin, some programs rely on that.

    After connecting USB storage, reboot the router and wait for ~1 min to detect the USB storage

    telnet/PuTTY (you have to enable it in web interface) to your router 192.168.1.1 username:admin, password what you use with web interface (change it from default!)

    Copy the following lines (creates partition table) and paste it to the terminal as such (right click/what works with your mouse):
    Note: all of your data in the stick/HDD will be lost
    Code:
    echo -e "o\nn\np\n1\n\n+256M\nn\np\n2\n\n+1024M\nn\np\n3\n\n\nt\n1\n82\nw" > /tmp/parttbl
    case "`/bin/uname -r`" in
        2.6* ) fdisk /dev/sda < /tmp/parttbl;;
        2.4* ) fdisk /dev/discs/disc0/disc < /tmp/parttbl;;
    esac
    echo "" > /etc/fstab
    flashfs save && flashfs commit && flashfs enable
    reboot
    echo "Wait till reboot (terminal disconnect)"
    Wait ~1 min. after rebooting the router to detect the USB storage.
    telnet/PuTTY again to the router
    copy-paste the following lines as such (formats stick/HDD):
    Code:
    for i in `cat /proc/mounts | awk '/tmp\/mnt/{print($1)}'`;do umount $i; done
    case "`/bin/uname -r`" in
        2.6* ) mkswap /dev/sda1 && swapon /dev/sda1 && mke2fs -j /dev/sda2 && mke2fs -j /dev/sda3;;
        2.4* ) mkswap /dev/discs/disc0/part1 && swapon /dev/discs/disc0/part1 && mke2fs -j /dev/discs/disc0/part2 &&  mke2fs -j /dev/discs/disc0/part3;;
    esac
    free
    You're now ready to install optware.
    Make sure that the router has a working internet connection (as image files are downloaded like flashf.tar.gz).
    Copy-paste to the terminal (telnet/PuTTY) you logged in to the router as such:

    Code:
    DLN=`wget -q "http://wl500g.info/showpost.php?p=193668&postcount=1" -O - | /bin/sed -n '/flashf.*tar.gz/p'`
    DLL=`echo "$DLN" | /bin/sed -n 's/.*\(attachmentid=[0-9]*\).*;\(d=[0-9]*\).*/\1\&\2/p'`
    cd /tmp && wget -O flashf.tar.gz "http://wl500g.info/attachment.php?${DLL}" && cd / && tar -xvzf /tmp/flashf.tar.gz
    chmod +x /usr/local/sbin/*
    case "`/bin/uname -r`" in 2.4*)
    cat > /etc/fstab << __EOF__
    #device Mountpoint FStype Options Dump Pass#
    /dev/discs/disc0/part1 none swap sw 0 0
    /dev/discs/disc0/part3 /mnt ext3 rw,noatime 1 1
    /dev/discs/disc0/part2 /opt ext3 rw,noatime 1 1
    __EOF__
    mkswap /dev/discs/disc0/part1
    swapon /dev/discs/disc0/part1
    ;;esac
    flashfs save && flashfs commit && flashfs enable
    [ "`awk '/SwapTotal/{print($2)}' /proc/meminfo`" -eq 0 ] && mkswap /dev/sda1 && swapon /dev/sda1
    case "`/bin/uname -r`" in
        2.6* ) mount -o noatime -t ext3 /dev/sda2 /opt && mount -o noatime -t ext3 /dev/sda3 /mnt;;
        2.4* ) mount -o noatime -t ext3 /dev/discs/disc0/part2 /opt && mount -o noatime -t ext3 /dev/discs/disc0/part3 /mnt;;
    esac
    [ -n "`mount | sed -n '/\/opt/p'`" ] && [ -n "`mount | sed -n '/\/mnt/p'`" ] && cd /mnt && wget http://files.wl500g.info/asus/custom/raas/v10/opt.tar.gz && cd / && tar -xvzf /mnt/opt.tar.gz && cd /opt && wget http://files.wl500g.info/asus/custom/raas/v10/mnt.tar.gz && cd / && tar -xvzf /opt/mnt.tar.gz
    ipkg update
    cd /mnt && wget http://rutorrent.googlecode.com/files/rutorrent-3.3.tar.gz && tar -xvzf rutorrent-3.3.tar.gz
    ipkg install readline && ln -s /opt/lib/libreadline.so.6.1 /opt/lib/libreadline.so.5
    [ -x /opt/etc/init.d/rc.unslung ] && /opt/etc/init.d/rc.unslung start
    /opt/bin/ps afx
    Installation is completed in a few minutes.

    You can navigate to router's web interface, the best starting point is:
    http://192.168.1.1:8082/cms/
    username: admin
    password: asus
    Name:  Headstart_cms.jpg
Views: 22819
Size:  95.0 KB

    ADOS (http/ftp downloader, you may use fewgets as well, it's a bit simpler)
    http://192.168.1.1:8082/protected/WebUI/ados/
    You have to login second time to ADOS as well.
    username: admin
    password: logitech

    Transmission (torrent client) http://192.168.1.1:8082/cgi-bin/transmission.cgi
    Simply put your torrent files in /mnt/protected/Downloaders/Transmission/source and download should start in the background.
    Note: transmission program is started by scheduler that runs in every 30 min so it may take some time before transmission starts.

    You may wish to switch to newer version of Transmission, separate tutorial is here.

    If you prefer rtorrent over Transmission (like I do) copy-paste:

    Code:
    ipkg update
    ipkg install rtorrent gnuplot
    mkdir -p /opt/share/torrent/session
    mkdir -p /mnt/protected/Downloaders/rtorrent
    sed -i -e 's#/opt/bin/bash#/bin/sh#' -e 's#"root"#"admin"#' -e 's#test -x /opt/bin/su.*##' -e 's#su -c \"##' -e 's#\" ${user}##' /opt/etc/init.d/S99rtorrent
    cd /opt/etc && sed -i 's#/opt/share/torrent/work/#/mnt/protected/Downloaders/rtorrent/#' rtorrent.conf
    [ -z "`/bin/sed -n '/scgi_port =/p' rtorrent.conf`" ] && echo "scgi_port = localhost:5000" >> rtorrent.conf
    echo "schedule = log,180,180,\"execute=/opt/etc/rtorrlog,\$get_down_rate=,\$get_up_rate=\"" >> rtorrent.conf
    cd /opt/etc/lighttpd/ && [ ! -f lighttpd.conf.raas ] && cp lighttpd.conf lighttpd.conf.raas
    [ -z "`/bin/sed -n '/^[^#].*mod_scgi/p' lighttpd.conf`" ] && sed -i 's/"mod_fastcgi",/"mod_fastcgi",\n\t\t\t\t"mod_scgi",/' lighttpd.conf
    LIN1=`echo -e "\nscgi.server   = (\"/RPC2\" =>\n\t\t ( \"127.0.0.1\" =>\n\t\t   (\n\t\t    \"host\" => \"127.0.0.1\",\n\t\t    \"port\" => 5000,\n\t\t    \"check-local\" => \"disable\"\n\t\t   )\n\t\t )\n\t\t)"`
    LIN2=`echo -e "SERVER[\"socket\"] == \":443\" {\nssl.engine\t= \"enable\"\nssl.pemfile\t= \"/opt/etc/lighttpd/lighttpd.pem\"\nserver.document-root\t= \"/mnt/\"\n  auth.require = ( \"\" =>\n\t\t (\n\t\t  \"method\"  => \"digest\",\n\t\t  \"realm\"   => \"RT-N16\",\n\t\t  \"require\" => \"user=admin\"\n\t\t )\n\t\t)\n}"`
    [ -z "`/bin/sed -n '/":443"/p' lighttpd.conf`" ] && echo -e "$LIN1\n\n\$$LIN2" >> lighttpd.conf
    DLN=`wget -q "http://wl500g.info/showpost.php?p=158865&postcount=1" -O - | /bin/sed -n '/fewgets.*tar.gz/p'`
    DLL=`echo "$DLN" | /bin/sed -n 's/.*\(attachmentid=[0-9]*\).*;\(d=[0-9]*\).*/\1\&\2/p'`
    cd /mnt && wget -O fewgets.tar.gz "http://wl500g.info/attachment.php?${DLL}" && cd / && tar -xvzf /mnt/fewgets.tar.gz
    flashfs save && flashfs commit && flashfs enable
    /opt/etc/init.d/S80lighttpd restart
    /opt/etc/init.d/S99rtorrent start
    mkdir -p /mnt/protected/ewget
    /bin/ps | grep lighttpd
    You can use it with nTorrent (http://code.google.com/p/ntorrent/), however there is a nice web front end to it, named ruTorrent (http://code.google.com/p/rutorrent/)
    Do not change lighttpd.conf any further until you're familiar with the system.
    ruTorrent web interface:
    http://192.168.1.1:8082/rutorrent/
    From internet: https://<your public IP|dyndns host name>/rutorrent/

    fewgets: http://192.168.1.1:8082/cgi-bin/fewgets.cgi

    Don't forget to change the web password in /opt/etc/lighttpd/.lighttpdpassword as the https port is also available from internet!

    For installing a kernel modules a separate tutorial exists.

    For OpenVPN I've created a separate tutorial.

    For DLNA media servers I've created a separate tutorial.

    For Tor & polipo a separate tutorial exists. Tor & polipo thread.

    Replacing Samba2 with Samba3 (optional):
    Code:
    killall smbd nmbd
    cd /opt/etc/samba && [ ! -f smb.conf.raas ] && cp smb.conf smb.conf.raas
    ipkg remove samba2 
    ipkg install samba samba3-swat
    sed -i 's/samba_active=0/samba_active=1/' /opt/etc/init.d/S08samba
    cd /mnt && wget -O smb.tar.gz "http://wl500g.info/attachment.php?attachmentid=6455&d=1274467707" && cd / && tar -xvzf /mnt/smb.tar.gz
    /opt/etc/init.d/S08samba start
    /bin/ps | grep smbd
    smb.tar.gz

    A few notes:
    - Don't upgrade the packages unless you know what you're doing as it may replace the working .conf files (save e.g. copy to /mnt the entire /opt/etc before doing so)
    - If you install the latest lighttpd with ipkg install lighttpd you have to change in /opt/etc/lighttpd/lighttpd.conf server.event-handler to this:
    server.event-handler = "poll"
    - You may need to restrict the memory usage of rtorrent in /opt/etc/rtorrent.conf, e.g. to 64 MB:
    max_memory_usage = 67108864
    for other configuration options see http://linux.die.net/man/1/rtorrent
    Enjoy! It worked for me, but there is no guaranty. I shall not be liable of anything if something goes wrong. Use it at your own risk.
    Attached Files Attached Files
    Last edited by ecaddict; 05-12-2011 at 16:21. Reason: Added references to subsequent separate tutorials, highlighted /opt/etc saving

  2. #2
    Hi ecaddict,


    very nice to see the headstart image is also running on the RT-N16. !

    I'm not doing as much stuff as I want to do with the asus routers (I had a headstart III in mind), basically because time is short. However, nice to see the life-span of HeadStart is extended onto 'other' hardware.

  3. #3
    Quote Originally Posted by raas View Post
    very nice to see the headstart image is also running on the RT-N16. !

    I'm not doing as much stuff as I want to do with the asus routers (I had a headstart III in mind), basically because time is short. However, nice to see the life-span of HeadStart is extended onto 'other' hardware.
    Hi,

    The headstart image works very well also on the RT-N16 (though I have not had yet time to try out everything, what I've tried, works).
    A big thanks for the headstart images!

    headstart III would be also nice. I'm also using couple of other programs (like vnStat) that would be tricky to add this patching way and probably it would be interesting to others as well.
    I'm also planning to try out MediaTomb (in fact already installed on my 500gP) or TwonkyMedia.
    I'm also not short of ideas but rather on time.

    Let's hope that there will be a headstart III still.

  4. #4
    If you have ppp connection and the optware was not starting after reboot this was due to a bug in post-mount.
    It was fixed today, sorry for the mistake.

  5. #5
    Thanks. Very good work.

  6. #6
    Great - Have been looking for a How-to on RT-N16.

    I'm no Linux expert, but I know how to follow a complete noob guide:-)

    Maybe I'm gonna replace my old WL5000g Deluxe with a RT-N16.....

    Also very interested to hear your USB Transfer speed with this guide.

  7. #7
    Quote Originally Posted by msj33 View Post
    Also very interested to hear your USB Transfer speed with this guide.
    NFS over UDP (what I use with Linux) is quite OK, ~14MB/s reading speed.
    Note however that you have to enable it first in the router's web interface.

    If you'd like to use NFS with XP, you have to install MS Windows Services for UNIX (SFU). Also it maybe a bit slower (~10%), but I have checked it only with WL-500gP.
    Win 7 Pro has it by default, you have to enable it only, but configuration is a bit more tricky.

    TCP (and protocols using it like Samba/FTP) is not performing currently too good. With Windows registry tweak ~10 MB/s is what I measured.
    wpte measured with WinSCP ~11 MB/s.
    This may however improve in the future (especially if Brodcom produces driver for a more recent Linux kernel).

    You can find more about this issue in the related discussion here: http://wl500g.info/showthread.php?p=201438

  8. #8
    i do it nice and easy... everything went fine, but, hello, houston, we have a problem:
    when the router reboot, not work, i think because the partition not mounting:
    from the routers log
    Jul 3 07:19:45 kernel: EXT3-fs: starting recovery.
    Jul 3 07:19:45 kernel: kjournald starting. Commit interval 5 seconds
    Jul 3 07:19:45 kernel: EXT3 FS on sda3, internal journal
    Jul 3 07:19:45 kernel: EXT3-fs: recovery complete.
    Jul 3 07:19:45 kernel: EXT3-fs: mounted filesystem with ordered data mode.
    Jul 3 07:19:45 USB storage: ext3 fs at /dev/discs/disca/part3 mounted to /tmp/mnt/disca_3
    Jul 3 07:19:45 kernel: EXT3-fs: starting recovery.
    Jul 3 07:19:45 kernel: kjournald starting. Commit interval 5 seconds
    Jul 3 07:19:45 kernel: EXT3 FS on sda2, internal journal
    Jul 3 07:19:45 kernel: EXT3-fs: recovery complete.
    Jul 3 07:19:45 kernel: EXT3-fs: mounted filesystem with ordered data mode.
    Jul 3 07:19:45 USB storage: ext3 fs at /dev/discs/disca/part2 mounted to /tmp/mnt/disca_2
    ecaddict, i posted it in the prohardver rt n16 forum, too.

  9. #9
    Join Date
    Feb 2008
    Location
    Copenhagen, Denmark
    Posts
    41

    Another GUI for Transmission

    Quote Originally Posted by ecaddict View Post
    You may try also the Transmission remote GUI:
    http://code.google.com/p/transmisson-remote-gui/
    Have you tried this remote?

    It requires .net, but seems to support more features and is more up to date.

    http://code.google.com/p/transmission-remote-dotnet/

  10. #10
    Quote Originally Posted by avman View Post
    when the router reboot, not work, i think because the partition not mounting:
    from the routers log
    Probably /etc/fstab (just like other files added to the flash) is missing, check with:
    Code:
    ls -la /etc/fstab
    and then:
    Code:
    ls -la /usr/local/sbin/
    If this is the case, re-run the first 3 lines of the optware installation part. It starts with
    cd /tmp && wget -O flashf.tar.gz...
    and ends with
    flashfs save && flashfs commit && flashfs enable

    This last one saves the file the flash (before running the commands, you can check if they really exist).

  11. #11
    give try to http://www.xtremecoders.org/forums/f78/
    able to install easily.

  12. #12
    Tomato is less stable than Oleg team's firmware (in my view) and also lacks e.g. NFS support (NFS is the fastest way to transfer files from the USB storage attached to the router).

    As this thread/tutorial is intended for Oleg firmware users, please use a separate thread for further discussion on other firmwares. Thanks.

  13. #13
    Hi,
    i've instaled and evertything was ok.
    But i've got problem with Tramsmission remote gui:



    I can't connect to daemon.

  14. #14

    Exclamation Libreadline needs to be softlinked

    In order to get SABnzbd running (which is installed also using this howto), I needed to do:

    ln -s /opt/lib/libreadline.so.6.1 /opt/lib/libreadline.so.5

    I suspect that for Zussaweb/Hellanzb this is needed as well.

  15. #15
    Can help me somebody ??


    -rw-r--r-- 1 admin root 3662 Aug 9 19:57 /tmp/flash.tar.gz
    Check saved image and type "/sbin/flashfs commit" to commit changes
    .
    Committed.
    [admin@ASUS /]$ [ "`awk '/SwapTotal/{print($2)}' /proc/meminfo`" -eq 0 ] && mksw
    ap /dev/sda1 && swapon /dev/sda1
    [admin@ASUS /]$ mount -o noatime -t ext3 /dev/sda2 /opt && mount -o noatime -t e
    xt3 /dev/sda3 /mnt
    mount: mounting /dev/sda2 on /opt failed: Device or resource busy
    [admin@ASUS /]$ [ -n "`mount | sed -n '/\/opt/p'`" ] && [ -n "`mount | sed -n '/
    \/mnt/p'`" ] && cd /mnt && wget http://files.wl500g.info/asus/custom/raas/v10/op
    t.tar.gz && cd / && tar -xvzf /mnt/opt.tar.gz && cd /opt && wget http://files.wl
    500g.info/asus/custom/raas/v10/mnt.tar.gz && cd / && tar -xvzf /opt/mnt.tar.gz
    [admin@ASUS /]$ ipkg update
    -sh: ipkg: not found
    [admin@ASUS /]$ cd /mnt && wget http://rutorrent.googlecode.com/files/rutorrent-
    3.0.tar.gz && tar -xvzf rutorrent-3.0.tar.gz
    Connecting to rutorrent.googlecode.com (XX.XX.XX.XX:80)
    wget: can't open 'rutorrent-3.0.tar.gz': Read-only file system
    [admin@ASUS /mnt]$ [ -x /opt/etc/init.d/rc.unslung ] && /opt/etc/init.d/rc.unslu
    ng start
    [admin@ASUS /mnt]$ #reboot

Page 1 of 4 123 ... LastLast

Similar Threads

  1. [Howto] Install DLNA media servers for Oleg firmware
    By ecaddict in forum WL-500gP Tutorials
    Replies: 18
    Last Post: 06-06-2017, 07:40
  2. Optware Entware Asus RT-N56U
    By Omega in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 220
    Last Post: 06-02-2016, 10:53
  3. Replies: 24
    Last Post: 05-05-2015, 07:42
  4. Replies: 6
    Last Post: 21-09-2012, 17:06
  5. [Howto] Install kernel modules for Oleg firmware
    By ecaddict in forum WL-500gP Tutorials
    Replies: 0
    Last Post: 05-12-2011, 16:18

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •