PDA

Bekijk de volledige versie : [HowTo] Asus RT-N16 (Oleg) - optware the simple way



ecaddict
08-04-2010, 20:43
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 (http://www.wl500g.info/showthread.php?p=112117#post112117).
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

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):

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 8393).
Copy-paste to the terminal (telnet/PuTTY) you logged in to the router as such:



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
6305

ADOS (http/ftp downloader, you may use fewgets (http://wl500g.info/showpost.php?p=158865&postcount=1) as well, it's a bit simpler)
http://192.168.1.1:8082/protected/WebUI/ados/ (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 (http://wl500g.info/showthread.php?t=27641).

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


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 (http://wl500g.info/showthread.php?t=28427) exists.

For OpenVPN I've created a separate tutorial (http://wl500g.info/showthread.php?t=27700).

For DLNA media servers I've created a separate tutorial (http://wl500g.info/showthread.php?t=28107).

For Tor & polipo a separate tutorial (http://wl500g.info/showpost.php?p=239648&postcount=10)exists. Tor & polipo thread (http://wl500g.info/showthread.php?t=23402).

Replacing Samba2 with Samba3 (optional):

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

6455

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.

raas
14-04-2010, 15:35
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.

ecaddict
14-04-2010, 16:35
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.

ecaddict
08-06-2010, 19:48
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.

klubru
08-06-2010, 21:34
Thanks. Very good work.

msj33
15-06-2010, 21:12
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.

ecaddict
16-06-2010, 08:25
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

avman
03-07-2010, 12:38
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.

Bohlendach
09-07-2010, 09:14
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/

ecaddict
10-07-2010, 12:11
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:

ls -la /etc/fstab
and then:

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).

sardarji
24-07-2010, 08:19
give try to http://www.xtremecoders.org/forums/f78/
able to install easily.

ecaddict
25-07-2010, 08:50
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.

bartwaw
01-08-2010, 21:53
Hi,
i've instaled and evertything was ok.
But i've got problem with Tramsmission remote gui:

http://img651.imageshack.us/img651/3660/27132011.gif

I can't connect to daemon.

verjikd
09-08-2010, 14:19
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.

Hanspeter
09-08-2010, 19:04
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

Parkinstein
09-08-2010, 20:49
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

see before.... /opt not mounted

ecaddict
10-08-2010, 09:12
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.

Thank you, I've added that line to the install script.

ecaddict
10-08-2010, 09:32
Can help me somebody ??

mount: mounting /dev/sda2 on /opt failed: Device or resource busy


Try to figure out with mount and cat /etc/fstab commands why the mount fails.

Have the format commands (mke2fs) run OK?

Hanspeter
10-08-2010, 10:13
I have copy all what i see on the terminal

echo.pdf - 43.8 Kb (http://www.sharepdfbooks.com/3IAV4VAXCDLK/echo.pdf.html)

thanks for help

ecaddict
10-08-2010, 10:44
I have copy all what i see on the terminal

echo.pdf - 43.8 Kb (http://www.sharepdfbooks.com/3IAV4VAXCDLK/echo.pdf.html)

thanks for help

What's the capacity of the USB storage that you use (I have the feeling that it's too small as already creating of partitions fail)? It should be bigger than 2GB as 256M is used for swap and 1GB for /opt and the rest for /mnt.

Btw I'll extend the tutorial to mention this.

Hanspeter
10-08-2010, 11:33
jo thats the problem ;)

thank you for you help

verjikd
10-08-2010, 21:55
I've tried both SabNZB and HellaNZB, installed with this howto. Both have problems at my setup:
- SabNZB crashes when the webinterface is used. Downloading works, however without a webinterface it is inconvenient

- HellaNZB stalls after a while, mostly after working for some quarters of an hour. Only restarting helps. The log file doesn't offer useful info. On internet it shows that stalling of Hellanz happens more on different platforms (especially earlier versions).
Currently I am using this "work-around" (quite drastic, I must say). In cron.hourly I've put an executable script with this contents:
killall python2.5
sleep 10
/opt/bin/startHellaNZB

If others experience these problems too, a warning in the howto is advisable.

I am using:RT-N16-1.9.2.7-rtn-r1799.trx of the 15th of July by the way. I haven't tried newer versions of OLEG firmware

ecaddict
11-08-2010, 09:12
Most probably it has nothing to do with the firmware, but more with dependent libraries etc.
What you could do is upgrading packages with ipkg install <pkg name> (Don't forget to save /opt/etc before doing so!)

E.g. ipkg install python25 py25-hellanzb

You can check installed packages with ipkg list_installed

If you download the .ipkg file (e.g. with wget) from http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ you can look into it with mc (just enter when on the file) and check dependent packages in control file.

E.g.
cd /mnt && wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/py25-hellanzb_0.13-2_mipsel.ipk

(set the version number at the end to the actual version)

If you figure out what has to be changed I'll fix it in the install script.

verjikd
11-08-2010, 20:20
I will try that and report.

I found out that using an own username instead of admin (as prescribed in the tutorial) gives problems. For example cron doesn't work, as it is based on admin as username to work. My bad... :(
I hope this won't cause any more troubles. Can't be sure now that problems like I have with hellanzb and sabnzb are caused by that :mad:

I also had to tune mediatomb, in order to get it working. Also there a username is needed for good behaviour.....:(

verjikd
15-08-2010, 16:19
@ecaddict
Instead of installing some current versions of libraries, I've done a full ipkg update and ipkg upgrade. I did answer all the questions about changing appr. 10 config files with No.

I like the result: midnight commander works now :D!

SABnzbd however stills quits with a segmentation fault directly after opening the web control page :confused:

For the rest I see no changes in behaviour. Like MC more programs might be affected with old libraries/packages. I would advise people to do ipkg upgrade in de howto, right after the ipkg update. If they answer all answers with no and change the conf-file for light-httpd, they have a better system!

krajicek
25-08-2010, 05:58
Hi,

[not sure if this is the correct thread if not, admin, please move it.]

just bought RT-N16 router and flashed latest Oleg's fw on it so i'm pretty new to these things.
on the old router with fixed firmware i had "sent logs to email" option which sent logfile each hour to specified email address.

is it possible to have something similar on RT-N16 with Oleg's fw - i know that it probably needs some custom script - but hopefully somebody already created something similar

thank you in advance
krajicek

SlawekW
19-11-2010, 19:53
I have RT-N16 with latest Oleg firmware (1.9.2.7-rtn-r2274).
I did configuration follow to ecaddict's manual.

But I have a problem with rtorrent: the error [File chunk write error: Cannot allocate memory.] after few minutes from start router.
I only have a few torrents (less than 10).

What is wrong and how do I fix it?

Thanks,

Slawek

wpte
20-11-2010, 10:56
But I have a problem with rtorrent: the error [File chunk write error: Cannot allocate memory.] after few minutes from start router.
I only have a few torrents (less than 10).

Sounds like a diskspace problem, if not:

Do you have swap space?
are you overclocking the router?

SlawekW
20-11-2010, 11:07
Sounds like a diskspace problem, if not:

Do you have swap space?
are you overclocking the router?

Rather, it is not a problem with the disc capacity:


[admin@Router ]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 5248 5248 0 100% /
/dev/root 5248 5248 0 100% /
devfs 63276 0 63276 0% /dev
tmpfs 63276 200 63076 1% /tmp
/dev/sda3 479478544 50636612 404485788 12% /mnt
/dev/sda2 988244 279236 658808 30% /opt

so I swap space:

[admin@Router /]$ free
total used free shared buffers cached
Mem: 126552 124564 1988 0 540 96956
-/+ buffers/cache: 27068 99484
Swap: 257000 188 256812


The router has a standard clock.

Thanks :)

wpte
23-11-2010, 14:13
Rather, it is not a problem with the disc capacity:


[admin@Router ]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 5248 5248 0 100% /
/dev/root 5248 5248 0 100% /
devfs 63276 0 63276 0% /dev
tmpfs 63276 200 63076 1% /tmp
/dev/sda3 479478544 50636612 404485788 12% /mnt
/dev/sda2 988244 279236 658808 30% /opt

so I swap space:

[admin@Router /]$ free
total used free shared buffers cached
Mem: 126552 124564 1988 0 540 96956
-/+ buffers/cache: 27068 99484
Swap: 257000 188 256812


The router has a standard clock.

Thanks :)


hmm... yes it seems fine.
Do you also experience the same problem with just 1 torrent running?
Maybe you could try transmission as well, for the RT-N16 it works just as fast as my pc:)

Choujij
14-12-2010, 01:34
Hello All,

All I want to do with this router is setup my External HD to serve as a storage drive through this router.

My external drive is made up of two 2TB drives running in Raid0. So the total storage is 4TB. I know I cannot setup NTFS as a 4TB partition with MBR, so I tried setting up one partition at 1.9TB with NTFS and MBR. Nothing. So I tried a 4TB NTFS partition with GPT. Still nothing. The router will mount and share my 8gb thumb drive, but not this drive.

So I figured I would try another firmware and I flashed Oleg's firmware (RT-N16-1.9.2.7-rtn-r2274.trx) and tried this tutorial. But here's what it says when I enter this code:for i in `cat /proc/mounts | awk '/tmp\/mnt/{print($1)}'`;do umount $i; done
mkswap /dev/sda1 && swapon /dev/sda1
mke2fs -j /dev/sda2
mke2fs -j /dev/sda3

says something like "can't open ' /dev/sda1': No such file or directory" and "can't stat ' /dev/sda1': No such file or directory"

I'm at my wits end here. I just want to be able to connect my hard drive to serve as a storage server for my home network. Why the heck is this so difficult?

ecaddict
14-12-2010, 15:52
This tutorial removes all existing partitions from your storage (in the first step) and creates (if the router correctly see your storage):
1st partition: 256MB, swap
2nd partition: 1GB, ext3 (/opt)
3rd partition: the rest, ext3 (/mnt)

Using of NTFS is not an option, especially for the system. It might work, but I've never tried and I'd not recommend it.

So what you could do is creating the system using your thumb drive.
When it has finished, format your storage via a PC to NTFS (if you prefer it over ext3).
After that plug in your storage (the router has 2 USB ports;)) and hope that the router automounts it (then it will appear in /tmp/mnt/...) or you can mount it via commands.
As in this case it's a second device you have to search for /dev/sdbx or /dev/discsc/discb/partx (where x is the partition number).

But before going all this trouble you should make sure that the firmware sees your storage. This tutorial won't help if already the firmware fails to see your storage.

As this requires some level of Linux knowledge, look someone who could help you locally if you're not confident with Linux.

If there is no /dev/sdxy or /dev/discsc/discx/party (where x is device number, y is partition number) it means that the router does not see the device correctly.

To share your storage with Samba does not require this tutorial. It should work with basic firmware. So if after flashing the firmware it does not see your partitions, there is a chance that it does not correctly recognize your drive. In that case you should ask help in e.g. the "New oleg firmware version" thread.

Pursuit250
07-01-2011, 23:56
Hello,

First of all, the outcomes of this thread has provided me many months of rutorrent happiness with my RT-N16 router. I thank ecaddict for that.

To expand on the capability of my RT-N16 I'm attempting to turn it into a server. Now it should be acknowledged that my linux experience is limited to what I've learnt in the last week. I'm running WinXP on all networked PCs and I map to the /mnt folder through network places.

I've currently have two USB drives plugged in, a 2TB (sda) and a 1 TB (sdb) (the USB drives automatically loads in that configuration although I'd prefer the 1TB to be sda). Optware has been installed on sda as per the instuctions in post one (no problems). What I'm trying to do is mount sdb on a /mnt/media/movies directory. I'm not having much luck with this step.

These are the steps I've taken within PuTTY and the outcomes:

fdisk /dev/sdb (created one primary partition of type 83)
mke2fs -j /dev/sdb1

The fdisk -l output is:


[admin@ASUS Router root]$ fdisk -l

Disk /dev/mtdblock0: 0 MB, 262144 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/sda: 2000.3 GB, 2000396746752 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 32 257008+ 82 Linux swap
/dev/sda2 33 157 1004062+ 83 Linux
/dev/sda3 158 243201 1952250930 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux

mkdir -p /mnt/media/movies (creation of directory confirmed)
vi /etc/fstab
insert 'i' (add /dev/sdb1 /mnt/media/movies etx3 rw,noatime 1 1) :x
mount -a
reboot

The mount output is:


[admin@ASUS Router root]$ mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devfs on /dev type tmpfs (rw,noatime)
devpts on /dev/pts type devpts (rw)
tmpfs on /tmp type tmpfs (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda3 on /mnt type ext3 (rw,noatime,data=ordered)
/dev/sda2 on /opt type ext3 (rw,noatime,data=ordered)
/dev/discs/discb/part1 on /tmp/mnt/discb_1 type ext3 (rw,noatime,data=ordered)

What am I doing wrong?

In order of priority what I'd like to do is:

1. mount sdb1 to /mnt/media/movies
2. load optware on the 1TB (sdb)
3. ultimately have sda3 and sdb1 in its own /media drive (e.g. /opt, /mnt and /media)

Any help that can be provided would be much appreciated.

Additional output that might be of use:


[admin@ASUS Router root]$ df
Filesystem Size Used Avail Use% Mounted on
rootfs 5.2M 5.2M 0 100% /
/dev/root 5.2M 5.2M 0 100% /
devfs 62M 0 62M 0% /dev
tmpfs 62M 216K 62M 1% /tmp
/dev/sda3 1.8T 237M 1.7T 1% /mnt
/dev/sda2 966M 295M 622M 33% /opt
/dev/discs/discb/part1 244M 4.1M 227M 2% /tmp/mnt/discb_1

verjikd
06-03-2011, 14:53
I would suggest to do an ipkg upgrade after the ipkg update which is done at install as described in posting 1, otherwise one gets errors. For example Midnight commander needs it

verjikd
07-03-2011, 10:08
In order to get lighttpd working, I needed to change the following in /opt/etc/lighttpd/lighttpd.conf:

# server.event-handler = "freebsd-kqueue" # needed on OS X

in:

server.event-handler = "select"

verjikd
07-03-2011, 10:55
Zussaweb is not included in the package one gets using this howto, but the Asus headstarts points to it.

What I had to do:

cd /opt/tmp
wget http://download.sourceforge.net/sourceforge/zussaweb/zussaweb03.tar.gz
cd /opt/share/www
tar -xzvf /opt/tmp/zussaweb03.tar.gz

and edit settings.php in /opt/share/www/zussaweb

bagr3210
14-04-2011, 06:07
If you have just changed to Oleg firmware and have no real experience with Linux, this short tutorial may help. It re-uses the excellent Wengi tutorial and Raas image (http://www.wl500g.info/showthread.php?p=112117#post112117).
Note: This is for RT-N16 or WL routers with 2.6 kernel.
The Oleg firmware can be downloaded from here now:
ftp://core.dumped.ru/rt-n/

Later on: http://code.google.com/p/wl500g/downloads/list

You'll need either USB stick or USB HDD (at least 2GB, but bigger is better).
Note: Do not store any data on the disk as when you start the disk has to 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, first reboot the router.
Wait for 1 min. after rebooting the router 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 as such (creates partition table)
Note: all of your data in the stick/HDD will be lost

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
fdisk /dev/sda < /tmp/parttbl
echo "" > /etc/fstab
flashfs save && flashfs commit && flashfs enable
reboot
echo "Wait till reboot (terminal disconnect)"

and paste it to the terminal (right click or what works with you mouse).
Wait till the router reboots.

Wait for 1 min. after rebooting the router to detect the USB storage.
telnet/PuTTY again to the router
copy the following lines as such and paste to the router (formats stick/HDD):

for i in `cat /proc/mounts | awk '/tmp\/mnt/{print($1)}'`;do umount $i; done
mkswap /dev/sda1 && swapon /dev/sda1
mke2fs -j /dev/sda2
mke2fs -j /dev/sda3
free


You're now ready to install optware.
Make sure that the router has a working internet connection (as image files are downloaded like 6579).
You have to copy the following lines as such and paste to the terminal (telnet/PuTTY) you logged in to the router:



cd /tmp && wget -O flashf.tar.gz "http://wl500g.info/attachment.php?attachmentid=6579&d=1275990726" && cd / && tar -xvzf /tmp/flashf.tar.gz
chmod +x /usr/local/sbin/*
flashfs save && flashfs commit && flashfs enable
[ "`awk '/SwapTotal/{print($2)}' /proc/meminfo`" -eq 0 ] && mkswap /dev/sda1 && swapon /dev/sda1
mount -o noatime -t ext3 /dev/sda2 /opt && mount -o noatime -t ext3 /dev/sda3 /mnt
[ -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.0.tar.gz && tar -xvzf rutorrent-3.0.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
#reboot


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
6305

SWAT/Samba (file sharing, web like control)
http://192.168.1.1:901/

ADOS (http/ftp downloader, you may use fewgets (http://wl500g.info/showthread.php?t=21041) as well, it's a bit simpler, N16 variant: 6570)
http://192.168.1.1:8082/protected/WebUI/ados/ (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 try also the Transmission remote GUI:
http://code.google.com/p/transmisson-remote-gui/

If you prefer rtorrent over Transmission (like I do) you can install it via telnet/PuTTY:


ipkg update
ipkg install rtorrent gnuplot
mkdir -p /opt/share/torrent/session
mkdir -p /mnt/protected/Downloaders/rtorrent
/bin/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 && /bin/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`" ] && /bin/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
cd /mnt && wget -O fewgets.tar.gz "http://wl500g.info/attachment.php?attachmentid=6570&d=1275768575" && 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!



Installing MediaTomb (optional):

cd /opt/share/file && mv magic magic.old
ipkg install readline mediatomb
mkdir -p /opt/etc/mediatomb
mkdir -p /usr/local/root/.mediatomb
flashfs save && flashfs commit && flashfs enable
/bin/sed -i 's/MT_USER="root"/MT_USER="admin"/' /opt/etc/mediatomb.conf
/bin/sed -i 's/MT_ENABLE=false/MT_ENABLE=true/' /opt/etc/default/mediatomb
cd /opt/share/mediatomb
cat sqlite3.sql | sqlite3 mediatomb.db
mv mediatomb.db /opt/etc/mediatomb/
/opt/etc/init.d/S90mediatomb start
/bin/ps | grep mediatomb


MediaTomb web interface: http://192.168.1.1:50500/

You can learn more about MediaTomb: http://mediatomb.cc/

Replacing Samba2 with Samba3 (optional):

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

6455

A few notes:
- Don't upgrade the packages unless you know what you're doing as it may replace the working .conf files (save /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

If it works, 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.


Hi!
I followed the instructions on the WL520GU and since then my USB flash drive does not work, or if your PC does not see it, does not detect!
Always something with it, please!
It bagr3210@seznam.cz mail
Thank you!
Moreover, as I do not work ..
:(

achlebin
27-05-2011, 00:56
hi where can Ifind setting of transmission deamon? I would like to access web interface of transmision at port 9091 but all I recive is: "403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details."

ecaddict
21-10-2011, 08:12
This post is just to announce the happy news that the scripts in the opening post have now been updated so that they work also with 2.4 kernel routers (WL500gPv1/v2, WL500W etc with non rt-n trx file) and installing the image created by Raas is easy for everyone now.

(I don't know who the change the thread title to reflect this).
While the basic install certainly works with 32MB routers, if you plan to install the additions (I've also updated recently) like rtorrent, mediatomb, transmission or openVPN 128MB router is highly recommended.
I've tested the image install and it worked for me but if you have some issue please post it here. Even if I'm not able to help, maybe someone else can.

Please don't quote the entire tutorial but rather the output of basic commands like:
blkid (to show USB storage partitions)
mount or df -h (to see mounted partitions)
free (to see memory and if swap is used)
ps or ps afx (to see running programs)
ls -la /usr/local/sbin/ (ls -la to list the content of some directory)
cat /usr/local/sbin/post-mount (cat is to show the content of some file)
tail -n 20 /opt/var/log/syslog.log (to show the last 20 logs from syslog - sometimes messages)
/opt/etc/init.d/S99rtorrent (to start some service in this case rtorrent)
iptables-save -c (to see all of your firewall rules)
dmesg (to see kernel issues)
ifconfig (to see interfaces)
nvram show | grep ifname (to see some nvram variable in this case interface names)
robocfg show (to show switch/VLAN config and active ports)
brctl show (to show bridge configurations)
wl radio (to see if WiFi is enabled)

Be careful with the last 4 commands as they allow changing essential parameters that can make you router unstable.

Endless
28-10-2011, 11:09
I just installed OLEG firmware from TomatoUSB.

I was having a hard time setting up the USB HDD NFS and from google I came across this.

I have a 500GB HDD and wish not to format it. Is there anyway to do your tutorials without formatting the HDD?

I been using this HDD with TomatoUSB without needed to format.
Thank you

ecaddict
28-10-2011, 11:48
If you only need NFS sharing there is no need to format your HDD as the firmware alone can do the sharing there is no need to install any optware to the HDD.

However you need to put what you'd like to share to /etc/exports
My tutorial puts this (as it allows NFS sharing for the /opt and /mnt directories):

# automagically generated from web settings
/mnt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
/opt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )


As a first step plug in the HDD and check where it mounts with mount, e.g. I have a spare partition on my HDD that is automounted:
/dev/sda4 on /tmp/mnt/disca_4 type ext4 (rw,noatime,barrier=1,data=writeback)

So replace e.g. /mnt with what you'd like to share e.g. in my case it could be /tmp/mnt/disca_4

E.g. put this to /etc/exports (of course you can have a better mountpoint with /etc/fstab):

/tmp/mnt/disca_4 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )

The /etc files are not saved to flash (so lost) after restart unless you indicate to the firmware what files to make persistent. This is done in
/usr/local/.files
So you have to put /etc/exports there.
You can do it actually if you copy-paste this:

cat > /usr/local/.files << __EOF__
/etc/fstab
/etc/exports
/etc/passwd
/etc/group
__EOF__


Than make everything persistent with
flashfs save && flashfs commit && flashfs enable

If you need optware then
1. either you need a HDD/USB stick that has the following partitions:
swap
/opt
/mnt
2. or adjust /etc/fstab
Which by the tutorial (for 2.6 kernels!)

#device Mountpoint FStype Options Dump Pass#
/dev/sda1 none swap sw 0 0
/dev/sda3 /mnt ext3 rw,noatime 1 1
/dev/sda2 /opt ext3 rw,noatime 1 1

However you can easily swap e.g. /opt to be /dev/sda3 or as you like.

Note: web interface may work as well, however I've never used the web interface...

Endless
28-10-2011, 20:39
Thx OP for the fast reply..

I am completely a Linux noob.

I tired to run those code using PuTTY

I get this after I enter this code:
/mnt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
-sh: syntax error: unexpected "("

btw how do I ctrl+c in PuTTY? After I get this working its seem cool to install optware

ecaddict
28-10-2011, 21:18
I get this after I enter this code:
/mnt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
-sh: syntax error: unexpected "("

btw how do I ctrl+c in PuTTY? After I get this working its seem cool to install optware

That's not a code that you run, but should be put to the file I wrote. Please read it carefully.
By default also nothing is mounted below /mnt (unless set in /etc/fstab).

In PuTTY you have to right click to the top of the window status bar and select mark (if I remember correctly), then drag while pushing left button.
Maybe the best way would be to put some USB stick to the router temporary and install the basic optware (don't connect the HDD with full of data as it will be formatted!).

But the best would be to learn some basic Linux or stick to the router's web interface for NFS sharing.
I've created this tutorial in mind that you're willing to sacrifice the content of some HDD or USB stick and put optware. After this done, it's possible to fill the HDD via one of the sharings or connect a second HDD (with data) and e.g. link it to somewhere in the directory structure.
Anyhow some basic IT knowledge would be needed even in this case or goole search. It's mission impossible to tell everything via posts.

Endless
30-10-2011, 11:48
I try everything to look at what u wrote.
I put those command in "NFS Server Exports" under the web interface.
I am running windows xp
In my network place I see 2 folder "sda1 on Asus RT-N16 (Asus)" and "share on Asus RT-N16 (Asus)" but cannon open them says "You might not have permission to use this network resource......."

ecaddict
30-10-2011, 19:30
On the router (so via PuTTY) please check the output of the following commands:
mount
cat /etc/exports

The cat should show something like this (except /mnt):

/mnt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
Note: The end of the command is important (and I suspect you cannot configure it in the web interface) as XP cannot handle at all Linux GUD/UIDs.

On XP please check the output of the following commands (after installing Windows Services for UNIX, free download from MS):
showmount -e 192.168.1.1

You should see something like this:

showmount -e 192.168.1.1
Exports list on 192.168.1.1:
/mnt All Machines

You can mount the share with (note \mnt is what you've shared and the showmount shows)
mount \\192.168.1.1\mnt *

You should see something like this:

mount \\192.168.1.1\mnt *
K: is now successfully connected to \\192.168.1.1\mnt

Endless
30-10-2011, 21:20
This is the log what I get from following your commands:

[admin@TV root]$ mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devfs on /dev type tmpfs (rw,noatime)
devpts on /dev/pts type devpts (rw)
tmpfs on /tmp type tmpfs (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/discs/disca/part1 on /tmp/mnt/disca_1 type fuseblk (rw,user_id=0,group_id=0,allow_other,blksize=4096)
[admin@TV root]$ cat /etc/exports
# automagically generated from web settings
/tmp/harddisk/# automagically generated from web settings
/mnt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
/opt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
/tmp/mnt/TV 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,sync )
/tmp/harddisk/cat > /usr/local/.files << __EOF__
/etc/fstab
/etc/exports
/etc/passwd
/etc/group
/tmp/harddisk/__EOF__
[admin@TV root]$ /mnt 192.168.1.0/24(rw,insecure,all_squash,anonuid=0,anongid=0,
sync)
-sh: syntax error: unexpected "("
[admin@TV root]$ showmount -e 192.168.1.1
Export list for 192.168.1.1:
/tmp/harddisk/__EOF__ *
/tmp/etc/group *
/tmp/etc/passwd *
/tmp/etc/exports *
/etc/fstab *
/tmp/harddisk/cat /usr/local/.files
/tmp/mnt/TV 192.168.1.0/24
/opt 192.168.1.0/24
/mnt 192.168.1.0/24
[admin@TV root]$ Exports list on 192.168.1.1:
-sh: Exports: not found
[admin@TV root]$ /mnt All Machines
-sh: /mnt: Permission denied
[admin@TV root]$ mount \\192.168.1.1\mnt *
mount: mounting \192.168.1.1mnt on * failed: No such file or directory
[admin@TV root]$

tex
31-10-2011, 17:56
Hi and thanks for all the help for a newby like i'am. I've tryed to do all the procedure with my wl500gp and in the beginning it work's fine but after a while it starts to go very slow in the access to the router, the internet is not working...My need is only to install the new version of torrent on the wl500gp. So now i've done again the procedure till the formattation of the Hard disk but if i try to install transmission following your other post it doesn't work. So could you please tell me what procedure i need to install transmission on my router, after having done the first two steps of your tutorial and without having installed the optware? Thank you for your help

PS i've used your procedure because is very fast and easy instead of Wengi tutorial that is more difficoult for me... Thank you

ecaddict
31-10-2011, 19:18
So could you please tell me what procedure i need to install transmission on my router, after having done the first two steps of your tutorial and without having installed the optware?

That's not an option. The reason why you cannot install transmission without basic optware is that it contains essential files/configuration for the subsequent installs (including transmission).

If your router contains only 32MB RAM, I can understand your request. What you can do is (after basic optware install but before transmission install):
1. remove the old transmissiond with the following command

ipkg remove transmissiond
2. Prevent the start of unnecessary services from /opt/etc/init.d/ and that can be done via renaming them to DS...., e.g. S45php -> DS45php or S80busybox_httpd->DS80busybox_httpd.
Please note however that e.g. php can be needed for other programs...
(The busybox_httpd is not, however you don't gain too much with it.)

Also reducing max. bandwidth of transmission and memory usage may help.

The best is however to use 128MB RAM router (either upgraded or factory) if you plan to run many programs. 32MB RAM restricts too much what you can do.

tex
31-10-2011, 22:44
Thank you for your answer. I'm not able to upgrade the router memory so the best way is to follow again Wengi's tutorial, because transmission worked very good for some years till a crush of the system. Thank you.

tex
26-11-2011, 10:29
Hi Ecaddict,
i followed your advise. Installed your image and then renamed all the services i don't need

DK70mysqld
DS45php
DS58proftpd
DS70mysqld
DS80busybox_httpd
DS80lighttpd
DS90mediatomb
rc.unslung
S05syslogd
S10xinetd
S10cron
S60transmission
S90twonkymedia
S80samba
This is my init.d folder. And now everything is working properly, a little bit slow..... but working
This is my free

[admin@hd asus root]$ free
total used free shared buffers cached
Mem: 30052 29204 848 0 1084 4644
-/+ buffers/cache: 23476 6576
Swap: 506008 65416 440592
Do you think that i can improve my memory performance without adding RAM?
Thank you

ecaddict
26-11-2011, 18:17
The WL-500 family of routers has a relatively slow CPU (as today's standards go) so for slowness it can be also the reason not just the RAM. I don't have too much experience with 32MB RAM as I've made an upgrade to 128MB very quickly (as with 32MB too much swapping was going on and HDD usage LED was way to active; this was with WL-500gPv1) .

If it does what you need, don't care after all this is a router, not a real server or NAS.

If it becomes annoying you can still change to the faster RT-N16 (this is what I use, it can e.g. easily compile e.g. minidlna within 5 minutes, the rest of the time is spent on downloading and configuring packages).

One thing that occurred to me that may help you: I've noticed that Transmission memory usage becomes excessive after a while (weeks on RT-N16) and although I'm not sure yet you may try to set false "alt-speed-enabled" and "watch-dir-enabled" in /opt/etc/transmission/settings.json (as I suspect that it helps).

tex
29-01-2012, 11:54
Hallo everybody,
after a while i left the wl500gp and buy the RT-N16. Followed Ecaddict tutorial and everything works fine. I'm using this router mainly for transmission so i don't use other stuffs. I've a 500G HD on the router. Now my problem is that the torrent webpage gives this error: "unable to save resume file: no space left on device" and when i check the OPT partition is full (1 G , no available space) Both temp files and complete downloads are set to be stored in the MNT partition (MNT/storage/downloaders/transmission/done and work)
There is a way to increase OPT space without formatting everything?
Thank you very much for your help

ecaddict
29-01-2012, 18:58
What you could do:

1. Stop transmission (/opt/etc/init.d/S60transmission stop)
2. move /opt/etc/transmission/torrents etc. to somewhere in /mnt (e.g. using mc)
3. link the directory in /mn to /opt e.g. ln -s /mnt/protected/Downloaders/Transmission/torrents /opt/etc/transmission
4. start transmission

tex
31-01-2012, 07:51
thank you very much for your advise, but i think that, also if i resolve the transmission problem, for the router is not so good to work with no free space in the OPT partition. So I've done again the procedure of your tutorial changing the first line from +1024 to +10240 and now i've a OPT of 10 Gb.
Why i filled the OPT partition? I've made some error? I installed the last version of transmission and miniDLNA more then normal installation. Thank you

tex
25-06-2012, 22:43
Hi, after some months get the same error of OPT partition full (10 Gb) and i noticed that there is a file that increases in size every moment. The file is ASUS.err and became so big to fill all the OPT partition. I cleaned it but it starts again increasing progressively in size...
9148
What is this file for??? How can i clean it? Thank you

la7low
12-04-2013, 20:34
Hi All,
the topic is not so active. Yet this simple-way installation works flawlessly big thanks for it.
My only question is what uses port 80? I wanted to set port 80 in lighhttpd.conf from 8082, but I got the following:
"(network.c.379) can't bind to port: 80 Address already in use"
How can I find out what uses port 80?
I removed Transmission, rtorrent is configured to a different port...
cheers

MercuryV
12-05-2013, 22:23
How can I find out what uses port 80?
It's typically webserver serving firmware web interface.
But you can check this. For example, on my device it's nginx

$ netstat -nlp | grep ':80 '
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 579/nginx
$ which nginx
/opt/sbin/nginx