|
|||||||
| Регистрация | FAQ | Участники | Поиск | Свежие сообщения | Пометить все разделы как прочитанные | ||||||||||||||||
| Firmware Wizard | Donate | ||||||||||||||||||||
![]() |
|
|
Опции темы |
Рейтинг:
|
Опции просмотра |
|
#1
|
|||
|
|||
|
What is it for?
This is a little "HowTo" for new Users of the Asus WL-500g Premium. It's a synopsis of my own experiences in setting up this box with Oleg's firmware "WL500gp-1.9.2.7-7f-pre4.trx". Thanks to Oleg fort his great work and thanks to all users of this forum, because almost every information I gathered comes from this site here (including the postings from macsat). Comment: I tried to record every step of setting up the box, so I hope the amount of typos and principal faults is finite. And please be forbear with my grammar and orthography - English is not my native language.. In general: Any corrections, comments, improvements or suggestions are welcome! 2nd comment: principally you have to save every changes on flash fliesystem before you reboot with Код:
flashfs save && flashfs commit && flashfs enable && reboot To get access First of all you've got to get access to your box. Therefore I use Putty, you can get it here: http://www.chiark.greenend.org.uk/~s.../download.html If you didn't disabled telnet on the Asus-configuration site, you can access your box by opening a telnet-session with IP 192.168.1.1, Port 23, username "admin" and password "admin" (if you haven't changes yet, but you should). Now you are connected to your box. You can try some commands to play a bit around: top, ps, df, free... Install ssh-deamon So, you have access, but with telnet this connection is not encrypted, so we will establish a ssh-connection. Therefore we need to install dropbear. Create the dropbear-directory: Код:
mkdir -p /usr/local/etc/dropbear Код:
dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key Код:
mkdir -p /usr/local/sbin/ Код:
echo "#!/bin/sh" >> /usr/local/sbin/post-boot Код:
chmod +x /usr/local/sbin/post-boot Код:
echo "dropbear" >> /usr/local/sbin/post-boot Код:
dropbear Код:
flashfs save && flashfs commit && flashfs enable && reboot After flashing Oleg's FW on your box, it has by default 16MB RAM, but on the PCB are 32MB. By changing some NVRAM variables you can make the hole 32MB RAM accessable. Attention! This just works with Premium boxes! Use this section on your own risk! It can damage your box! You shouldn't change the nvram variables with a Premium V2!!! Код:
nvram set sdram_init=0x0009 nvram set sdram_ncdl=0 nvram commit reboot Код:
free If you want to connect a USB-HDD to you box and make it accessible by network you have to partition your HDD and create a linux-accassible filesystem (ext3). For that matter we can create a swap-partition. О made the decision to create one big primary partition for data and one little partition at the end of the disk for swap. Run the partition program by typing Код:
fdisk /dev/discs/disc0/disc After partition your disk, it's time to create filesystems Код:
mke2fs -j /dev/discs/disc0/part1 mkswap /dev/discs/disc0/part2 Код:
touch /usr/local/sbin/post-firewall touch /usr/local/sbin/post-mount touch /usr/local/sbin/pre-shutdown chmod +x /usr/local/sbin/* but with a few commands you can use it. With "i" you get into editor-modus, with [ESC] you leave it. With ":wq!" you quit the editor by saving your file. For further information about vi visit http://lug.boulder.co.us/docs/vi_vim_howto.html Код:
vi /usr/local/sbin/post-boot Код:
#Wait for /opt to mount mount /dev/discs/disc0/part1 /opt i=0 while [ $i -le 30 ] do if [ -d /opt/etc ] then break fi sleep 1 i=`expr $i + 1` done # Activate swap swapon /dev/discs/disc0/part2 # Run all active services - active means starts with S /opt/etc/init.d/rc.unslung Код:
flashfs save && flashfs commit && flashfs enable && reboot With ipkg there exists a package-system which enables you to easily install additional software-packages. Available packages und information about them you can find here: http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/, http://ipkgfind.nslu2-linux.org/ So, make the necessary dirs and install and update ipkg: Код:
mkdir /opt/tmp mkdir /opt/tmp/ipkg ipkg.sh update ipkg.sh install ipkg ipkg update Код:
ipkg install nano Код:
ipkg install screen Код:
C-a c create C-a n next C-a p previous C-a # #=number of screen beginning with 0 C-a A give a name C-a " list C-a K kill C-a d detatch screen -r reattach C-a S split horizontally C-a X kill 2nd region Install midnight commander, THE file-browser: Код:
ipkg install mc Код:
nano /usr/local/sbin/post-boot Код:
#to let midnight commander run on terminals, make alias for colored mc echo "export TERMINFO=/opt/share/terminfo">>/etc/profile echo "alias mc=\"mc -c\"">>/etc/profile Код:
ipkg install cron Код:
mkdir /opt/etc/cron.5mins mkdir /opt/etc/cron.hourly mkdir /opt/etc/cron.daily mkdir /opt/etc/cron.weekly mkdir /opt/etc/cron.monthly Код:
nano /opt/etc/crontab Код:
SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin MAILTO="" HOME=/ # ---------- ---------- Default is Empty ---------- ---------- # # Syntax for lines is : minute hour day month dayofweek command # */5 * * * * admin run-parts /opt/etc/cron.5mins 0 * * * * admin run-parts /opt/etc/cron.hourly 0 0 * * * admin run-parts /opt/etc/cron.daily 0 0 * * 0 admin run-parts /opt/etc/cron.weekly 0 0 1 * * admin run-parts /opt/etc/cron.monthly So, we have to create the run-parts-script: Код:
nano /opt/bin/run-parts Код:
#!/bin/sh # # runparts.sh by macsat@macsat.com # intended for use with cron # # based on rc.unslung by unslung guys :-) # if [ -z "$1" ] then echo "Usage : $0 " fi RUNDIR=$1"/*" for i in $RUNDIR ;do # Ignore dangling symlinks (if any). [ ! -f "$i" ] && continue case "$i" in *.sh) # Source shell script for speed. ( trap - INT QUIT TSTP set start . $i ) ;; *) # No sh extension, so fork subprocess. $i start ;; esac done Код:
chmod +x /opt/bin/run-parts Код:
flashfs save && flashfs commit && flashfs enable && reboot [edit@20080827] nvram variables with Premium V2
__________________
"Documentation is like sex. If it is good, it is REALLY good, and if it is bad, it is better than nothing!" Gabe Helou Последний раз редактировалось marcnesium, 27-08-2008 в 12:57. |
|
#1
|
|||
|
|||
|
#2
|
|||
|
|||
|
Samba
So, you have a HDD connected to your box, now you want to access this disk over network connection. For this we need to configure the samba-daemon. Create samba-directory: Код:
mkdir /opt/etc/samba Код:
nano /opt/etc/samba/smb.conf Код:
[global] workgroup = YOURWORKGROUPNAME guest account = nobody security = share browseable = yes guest ok = yes guest only = no log level = 1 max log size = 100 encrypt passwords = no dns proxy = no [smbshare] path=/opt/share writeable = yes browseable = yes force user = admin [otherdir] path=/opt/share/otherdir writeable = yes browseable = yes force user = admin Create samba-Init-file: Код:
nano /opt/etc/init.d/S97Samba Код:
#!/bin/sh /usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf /usr/sbin/nmbd -D -n myasus -o -l /tmp -s /opt/etc/samba/smb.conf Код:
chmod 755 /opt/etc/init.d/S97Samba Код:
flashfs save && flashfs commit && flashfs enable && reboot There are two ipkg-packages, which make it possible to download files over bittorrent-protocol with your box. The downloaded files are stored on USB-HDD. This download-solution is not compatible with the Asus download master. But it works very well, I never used Asus dm at all. To control and supervise the downloads oleo wrote a cgi-script, which enables you to control your downloads with browser/webinterface. Thanks to oleo. Код:
ipkg install ctorrent ipkg install torrent Код:
mkdir /opt/share/torrent mkdir /opt/share/torrent/source mkdir /opt/share/torrent/work mkdir /opt/share/torrent/target Код:
nano /usr/local/root/httpd.conf Код:
A:* /cgi-bin:admin:admin .au:audio/basic .asp:text/html Код:
nano /usr/local/sbin/post-mount Код:
#!/bin/sh /usr/sbin/busybox_httpd -p 8008 -h /opt/share/www Код:
nano /opt/etc/torrent.conf Код:
########## # Configuration # NOTE: no spaces around the = sign # the config will be sourced (eg. . torrent.conf) SOURCE=/opt/share/torrent/source WORK=/opt/share/torrent/work TARGET=/opt/share/torrent/target MAILTO= MAILFROM= # default MAILER is mini_sendmail #MAILOPT="-sblackhole.dyndns.org -f" USER=admin GROUP=root DATE_FORMAT="%d %h %H:%M" # btget port range environment BTLIB_MINPORT=52846 export BTLIB_MINPORT BTLIB_MAXPORT=52846 export BTLIB_MAXPORT #time between logs LOG_TIME=59 # Seed torrent after completition (YES or NO) AUTOSEED="YES" #Colors for command line. # comment out if not needed GREEN="\033[32;1m" #NC="\033[0m" #BACK_UP="\033[1K\033[0G" NORMAL="\033[0m" WARN="\033[33;1m" BAD="\033[31;1m" BOLD="\033[1m" GOOD="\033[32;1m" Install nload A nice tool to watch the traffic on the network interfaces of the box is nload: Код:
ipkg install nload Код:
nload -t 200 -s 7 -i 2048 -o 256 -u H eth1 -s: smoothness [1-9], 1 means average over litte, 9 over long time -i: sets scale for incoming traffic, in kBit/s -o: sets scale for outgoing traffic, in kBit/s -u: sets units, see helppage -h for more details In order to make this command more easier to use, you can create an alias in /usr/local/sbin/post-boot: Код:
nano /usr/local/sbin/post-boot Код:
echo "alias nld=\"nload -t 200 -s 7 -i 2048 -o 256 -u H eth1\"">>/etc/profile I must admit, that's one thing, that doesn't work well, yet. Wondershaper is a script which provides QoS, but I can't get it run very well. I tried to start the script with: Код:
/init/wshaper start "eth1" 1990 190 " " " " "54321" "54321" In my opinion thy syntax is quite complicated. For further information read the following: - http://wiki.wl500g.info/index.php/PackageWondershaper - Wondershaper QoS discussion on AsusForum - http://www.docum.org/docum.org/docs/BB/BB.php - http://lartc.org/lartc.html That's it. Preliminary. I hope it helped you a bit. This here are all steps I've done on my box and it's running since a week or two without any problem (except wshaper)... As I wrote above: Any corrections, comments, improvements or suggestions are welcome! You can help to correct and complete this. [edit@20060728]: typos [edit@20060822-Styno]: typo
__________________
"Documentation is like sex. If it is good, it is REALLY good, and if it is bad, it is better than nothing!" Gabe Helou Последний раз редактировалось Styno, 22-08-2006 в 09:37. Причина: typo |
|
#3
|
|||
|
|||
|
great tutorial!!!
everything works almost fine, one thing i have troubles with. [admin@paco sbin]$ post-mount that command i must manually start, when i reboot the router i must login with ssh and run that command before the web interface for the torrent is working. do you have any suggest/idea? |
|
#4
|
|||
|
|||
|
Perhaps the script is not marked as executable...
To check type: Код:
ls -all Код:
[admin@horst sbin]$ ls -all drwxr-xr-x 1 admin root 0 Jul 16 19:24 . drwxr-xr-x 1 admin root 0 Jan 1 2000 .. -rwxr-xr-x 1 admin root 712 Jul 24 13:11 post-boot -rwxr-xr-x 1 admin root 64 Jul 24 12:24 post-firewall -rwxr-xr-x 1 admin root 60 Jul 24 13:12 post-mount Код:
chmod +x post-mount
__________________
"Documentation is like sex. If it is good, it is REALLY good, and if it is bad, it is better than nothing!" Gabe Helou |
|
#5
|
|||
|
|||
|
Thx, but did is not the problem, i checked it by myself before.
Код:
[admin@paco sbin]$ ls -all drwxr-xr-x 1 admin root 0 Jul 24 15:33 . drwxr-xr-x 1 admin root 0 Jan 1 2000 .. -rwxr-xr-x 1 admin root 465 Jul 24 16:11 post-boot -rwxr-xr-x 1 admin root 0 Jul 24 16:05 post-firewall -rwxr-xr-x 1 admin root 60 Jul 24 16:26 post-mount -rwxr-xr-x 1 admin root 0 Jul 24 16:05 pre-shutdown [admin@paco sbin]$ |
|
#6
|
|||
|
|||
|
Also useable for the wl-500gx?
Is your tutorial also useable for the wl-500gx? i have to set one up tomorrow.
Is the memeoty trick also possible? Thanks elbling |
|
#7
|
|||
|
|||
|
To my knowledge the Deluxe version has only 16MB RAM on PCB, so DO NOT change this NVRAM-variables!! It can damage your box!!
The rest of the howto should be transferable to the deluxe-box. Spontaneous I can't think of any problems (expect of the RAM!!) - but I never owned a deluxe box - so I never tried Let me know...Ciao Marc.
__________________
"Documentation is like sex. If it is good, it is REALLY good, and if it is bad, it is better than nothing!" Gabe Helou |
|
#8
|
|||
|
|||
|
No reason for this problem found. Perhaps an individual case? Anyone with same problem? Workaround: start http daemon in one of the other post-~-scripts...
Ciao Marc.
__________________
"Documentation is like sex. If it is good, it is REALLY good, and if it is bad, it is better than nothing!" Gabe Helou |
|
#9
|
|||
|
|||
|
Цитата:
the post-mount is not running automaticly for me too.. i need to do it everytime i restart the router I aint able also to acess samba or even ftp any ideas what may be causing this? |
|
#10
|
|||
|
|||
|
Цитата:
pls help me, mke2fs works good, but when i try "mkswap /dev/discs/disc0/part2" putty says : Код:
[admin@(none) root]$ mkswap /dev/discs/disc0/part2 mkswap: /dev/discs/disc0/part2: No such file or directory [admin@(none) root]$ EDIT: FOUND MY PROBLEM forgot to make a swap partition with fdisk - damn ![]() sorry, im a linux newbie ![]() Последний раз редактировалось olli84, 11-08-2006 в 17:56. |
|
#11
|
|||
|
|||
|
Thanks for this very good tutorial!!
I also followed the (c)torrent install part but I am having some problems. It seems like everything is installed correctly but the torrents does just not download. I can upload the torrent file and I can see that it is recognized with the cgi-script. I do not know if I control the torrent downloads correctly but the torrents does not download. I have tried to a few different ports in the torrent.conf. One of the ports I have tried is the one that my Aazerues on my laptop uses, which downloads just fine. Can someone help me debug this issue? Perhaps to check if everything is installed correctly. If I need to control the torrent download by doing something more than just upload the torrent file. Or to check the see if it is a firewall issue. Any suggestions are welcome. |
|
#12
|
|||
|
|||
|
'am a newbies and i'll would install CTORRENT with oleg's firmware 1.9.2.7-7f-pre3 because Download master don't work fine.
what is the method? a fat32 HDD is ok for CTORRENT? (sorry for my english) thank you for help |
|
#13
|
|||
|
|||
|
Цитата:
"can't write" when i try <echo "#!/bin/sh" >> /usr/local/sbin/post-boot> , have you an idea? |
|
#14
|
|||
|
|||
|
Hi, i have also some small problems to get all this nice stuff working.
I proceeded all this tutorial and some problems was mentioned here... I updated to WL500gp-1.9.2.7-7f-pre4.trx today my WL500gP. Restart and all settings about memory is well. Post-boot doesn't work to me automaticky. So when i want ctorrent get working i have to start this sctipt after reboot. I didn't find any mistake in my way. When I'll do post-boot manualy, I can access to Torrent admin but links source, work and target is not accesible in browser. May be some link is written wrong but I don't know where .May by it's relate with other problem... samba seems to have problem. I cannot connect to router by win sharing by lan. I tried also settings by r0kanon. May be somebody can send list of all installed files with adjusted rights? It should be helpful but I think I have it wll .Thank You.
__________________
WL500gp-1.9.2.7-7f-pre4@WL-500gP & DeLock USB 2.0 IDE Converter with WD1200BB... seems that I'm trying to work on this stuff... |
|
#14
|
|||
|
|||
|
#15
|
|||
|
|||
|
Цитата:
Or may be you have wrong rights to write into this file.
__________________
WL500gp-1.9.2.7-7f-pre4@WL-500gP & DeLock USB 2.0 IDE Converter with WD1200BB... seems that I'm trying to work on this stuff... |
![]() |
| Tags |
| howto |
| Опции темы | |
| Опции просмотра | Оценка этой теме |
|
|
Похожие темы
|
||||
| Тема | Автор | Раздел | Ответов | Последнее сообщение |
| WL500G Premium USB HD problemen | Totalrecall | Dutch Discussion - Nederlands | 5 | 24-12-2007 17:23 |
| 500g vs 550gE...What's the actual difference? | stmok | WL-550gE Pics & Specs | 3 | 04-07-2006 11:58 |
| Port forwarding for Asus 500G Deluxe | Karl_wrk | Russian Discussion - РУССКИЙ (RU) | 1 | 07-04-2006 13:18 |
| ASUS 500G Deluxe remotely configure it | orzad | WL-500g Q&A | 0 | 10-03-2006 12:45 |
| tale of a sad 500g owner | oferlaor | WL-500g Q&A | 1 | 15-10-2004 15:27 |