PDA

Bekijk de volledige versie : [HowTo] Part One - WL-500g Premium



marcnesium
24-07-2006, 13:28
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
but you can execute more than one of this sections and commit changes to flash at the end, unlike I write you have to flash.

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/~sgtatham/putty/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

Generate dropbear-keys; it may take a few seconds:


dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key
dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key

Create the script-directory:


mkdir -p /usr/local/sbin/

Create the post-boot script-file


echo "#!/bin/sh" >> /usr/local/sbin/post-boot

Mark post-boot-file as executable:


chmod +x /usr/local/sbin/post-boot

Start dropbear in post-boot-script:


echo "dropbear" >> /usr/local/sbin/post-boot

You can start dropbear manually to try it out, but we have to reboot anyway:


dropbear

Save changes in flash and reboot:


flashfs save && flashfs commit && flashfs enable && reboot


Extend RAM to 32MB
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

You can check the success by typing


free


Prepare USB-HDD
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

Fdisk is self-explaining, type m to view the help-page. When you are finished, don't forget to save changes with the w-command before you exit fdisk.
After partition your disk, it's time to create filesystems


mke2fs -j /dev/discs/disc0/part1
mkswap /dev/discs/disc0/part2

We already created the post-boot scriptfile, now we can create several others too.


touch /usr/local/sbin/post-firewall
touch /usr/local/sbin/post-mount
touch /usr/local/sbin/pre-shutdown
chmod +x /usr/local/sbin/*

Netx we will modify the post-boot-script with the vi-editor. I wouldn't say it's self-explaining ;) 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 ( http://lug.boulder.co.us/docs/vi_vim_howto.html)


vi /usr/local/sbin/post-boot

Add the following lines to post-boot file:


#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

Save changes in flash and reboot.


flashfs save && flashfs commit && flashfs enable && reboot


Initiate ipkg and install nano, screen, midnight commander
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

Now you are able install useful software, for examle nano, a nice, easy to use editor:


ipkg install nano

Install the terminal-multiplexer screen, a nice tool to handle several terminal-sessions:


ipkg install screen

Some useful commands for screen are:


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

In which e.g. "C-a" means to press [ctrl] and [a] at the same time. For further information see: http://www.slac.stanford.edu/comp/unix/package/epics/extensions/iocConsole/screen.1.html

Install midnight commander, THE file-browser:


ipkg install mc

Midnight commander won't rum without a few lines in the post-boot script:


nano /usr/local/sbin/post-boot

So add to post-boot-file:


#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


Install cron, a daemon to run scripts by scheduler:


ipkg install cron

With cron it is possible to let script-files periodically run, accordingly to its directory in which it is saved.


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

Now you have to edit the crontab-file:


nano /opt/etc/crontab

and add the following lines:


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

It's just an example. To understand how cron works, search for a cron-howto. I didn't used it copious, but I think it works (note: you need cron for the torrent-package). As you can see in the run-parts-script, I have this from macsat, but I modified the crontab-file.

So, we have to create the run-parts-script:


nano /opt/bin/run-parts

Fill it with the following lines:


#!/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

And make the script executable:


chmod +x /opt/bin/run-parts

Save changes in flash and reboot:


flashfs save && flashfs commit && flashfs enable && reboot


[edit@20060725] typos..
[edit@20080827] nvram variables with Premium V2

marcnesium
24-07-2006, 13:29
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

Create samba-config-file with nano or vi:


nano /opt/etc/samba/smb.conf

Content of /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

This is just an example, too. It makes the "share"-directory accessible over network under the name "smbshare" and its subdir "otherdir" under the name "otherdir". You can modify that like you want. Under Windows you can connect to this dirs with \\192.168.1.1\smbshare and \\192.168.1.1\otherdir.

Create samba-Init-file:


nano /opt/etc/init.d/S97Samba

Content of /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

Mark init-file as executable:


chmod 755 /opt/etc/init.d/S97Samba

Save changes in flash and reboot:


flashfs save && flashfs commit && flashfs enable && reboot


Install (c)torrent
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

The following directories are necessary:


mkdir /opt/share/torrent
mkdir /opt/share/torrent/source
mkdir /opt/share/torrent/work
mkdir /opt/share/torrent/target

To get the cgi-script run you have to edit the httpd configuration-file:


nano /usr/local/root/httpd.conf

Content of /usr/local/root/httpd.conf


A:*
/cgi-bin:admin:admin
.au:audio/basic
.asp:text/html

You have to start the http daemon in one of the start-scripts:


nano /usr/local/sbin/post-mount

Add following line to /usr/local/sbin/post-mount


#!/bin/sh
/usr/sbin/busybox_httpd -p 8008 -h /opt/share/www

Now you can edit the torrent configuration file:


nano /opt/etc/torrent.conf

Mine looks like this:


##########
# 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"


Now you can put a torrent-file into the source-dir and control it with the cgi-script http://192.168.1.1:8008/cgi-bin/torrent.cgi. That's it.

Install nload
A nice tool to watch the traffic on the network interfaces of the box is nload:


ipkg install nload

You can use it for example like this:


nload -t 200 -s 7 -i 2048 -o 256 -u H eth1

-t: time until refresh in ms
-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

Add the following line to post-boot file


echo "alias nld=\"nload -t 200 -s 7 -i 2048 -o 256 -u H eth1\"">>/etc/profile


The Wondershaper-issue
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"

But except of some experiments I don't use it, cause it don't work very well for me. For own experiments use nload to watch effects of wshaper.
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://wl500g.info/showthread.php?t=752)
- http://www.docum.org/docum.org/docs/BB/BB.php (http://www.docum.org/docum.org/docs/BB/BB.php)
- http://lartc.org/lartc.html (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

timbo.nl
24-07-2006, 15:35
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?

marcnesium
24-07-2006, 20:17
Perhaps the script is not marked as executable...
To check type:


ls -all

correct return is:


[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


If one file is not executable, change this with


chmod +x post-mount


Helpful?

timbo.nl
25-07-2006, 08:14
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]$


Looks fine to me

elbling
25-07-2006, 19:36
Is your tutorial also useable for the wl-500gx? i have to set one up tomorrow.
Is the memeoty trick also possible?

Thanks

elbling

marcnesium
25-07-2006, 21:55
To my knowledge the Deluxe version has only 16MB RAM on PCB, so DO NOT change this NVRAM-variables!! It can damage your box!! :eek:

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.

marcnesium
26-07-2006, 17:15
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.

AnyOne
05-08-2006, 00:27
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.


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?

olli84
11-08-2006, 16:16
Fdisk is self-explaining, type m to view the help-page. When you are finished, don't forget to save changes with the w-command before you exit fdisk.
After partition your disk, it's time to create filesystems


mke2fs -j /dev/discs/disc0/part1
mkswap /dev/discs/disc0/part2



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]$


any ideas?


EDIT: FOUND MY PROBLEM
forgot to make a swap partition with fdisk - damn :D
sorry, im a linux newbie ;)

psi
22-08-2006, 08:53
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.

willy132fr
27-08-2006, 17:37
'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

willy132fr
27-08-2006, 19:39
'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

recently, i try the HOW TO but system (with putty) says me:

"can't write" when i try <echo "#!/bin/sh" >> /usr/local/sbin/post-boot> , have you an idea?

Houston
03-09-2006, 22:09
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.

Houston
03-09-2006, 22:11
recently, i try the HOW TO but system (with putty) says me:

"can't write" when i try <echo "#!/bin/sh" >> /usr/local/sbin/post-boot> , have you an idea?

Try to write it with nano... or other editor directly into post-boot file.
Or may be you have wrong rights to write into this file.

r0kanon
04-09-2006, 14:02
The thing is - it is started like this:


/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf

So what you do after you try to start samba manually - with the line above - is:


ps | grep mbd
- it will show you if smbd is running or not

tail -n 20 /opt/var/log/smbd.log
- the last 20 lines of samab logfile may tell you why it was unable to start up. I remember veguely that it did not like hostname not set. But check what is your case

My samba is working with opts I gave in the tutorial, so perhaps you want to take a look at your conf file and post it (w/o sensitive info) - if you don't have luck with the steps above.

Egres
08-09-2006, 02:20
:confused: how to open ports for ctorrent in the firewall and what are the best ports to use :confused:

Houston
10-09-2006, 22:05
I realy don't know... st. is wrong but i don't know what...
After manual start no log appears:

]$ tail -n 20 /opt/var/log/smbd.log
tail: /opt/var/log/smbd.log: No such file or directory
tail: no files

But when I send

/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
any error is written and mbd proces is also runnig.

Any new idea, please?


The thing is - it is started like this:


/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf

So what you do after you try to start samba manually - with the line above - is:


ps | grep mbd
- it will show you if smbd is running or not

tail -n 20 /opt/var/log/smbd.log
- the last 20 lines of samab logfile may tell you why it was unable to start up. I remember veguely that it did not like hostname not set. But check what is your case

My samba is working with opts I gave in the tutorial, so perhaps you want to take a look at your conf file and post it (w/o sensitive info) - if you don't have luck with the steps above.

Houston
10-09-2006, 22:20
I added dir "log" and logs started to log ;-)
so...


[2006/09/10 23:12:43, 0] lib/util_sock.c:open_socket_in(826)
Get_Hostbyname: Unknown host ASUS



I realy don't know... st. is wrong but i don't know what...
After manual start no log appears:

]$ tail -n 20 /opt/var/log/smbd.log
tail: /opt/var/log/smbd.log: No such file or directory
tail: no files

But when I send

/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
any error is written and mbd proces is also runnig.

Any new idea, please?

r0kanon
11-09-2006, 16:40
Yes, you need to set your hostname in any of the startup scripts. It is done


hostname yourhostname

Houston
11-09-2006, 23:45
i hope i done that before...

i have got

hostname ASUS
in
/usr/local/sbin/post-boot

and now this one is in log:


[2006/09/12 00:26:32, 0] lib/util_sock.c:open_socket_in(826)
Get_Hostbyname: Unknown host ASUS

i have to setup host name somewhere else?

i think it's set here...
i have also

workgroup = SOME_WORKGROUP
server string = ASUS
in smb.conf

may be the reason is somewhere alse but where :-(



Yes, you need to set your hostname in any of the startup scripts. It is done


hostname yourhostname

r0kanon
13-09-2006, 08:56
Yes this is a bit difficult as I do not know how exactly gethostbyname() gets the hostname. I don't have to deal with that because my hostname is on DNS. I guess what you could try first to substitute DNS lookup is to enter your hostname in the /etc/hosts file.


ip.adr.nume.rical your host name - same as set by the command

of course for that to work automatically you have to add the line in your /usrl/local/sbin/post-boot


echo "ip.adr.nume.rical your_host_name" >> /etc/hosts

Hopefully this will work, other wise something else could be looked at. I have heard that this works if in smb.conf file


dns proxy = yes

Let me know if this works

WVR
14-09-2006, 19:54
Isn't the correct way to set the hostname via the web interface?
This sets an nvram variable, which works for me

#nvram show | grep lan_hostname
..
lan_hostname=MyAsus
#hostname
MyAsus

NB I haven't set the hostname in any script..

You can have a different netbios name for windows shares in the smb.conf, e.g

[global]
netbios name = mystorage

Then you can access this with \\mystorage

Houston
15-09-2006, 20:02
Thank You for all your helps. But still any progress :(
hostname is set to "ASUS"
I set it in smb.conf

#nvram show | grep lan_hostname
lan_hostname= <=== nothing is here where i can set it?
not in webgui neither in smb.conf... so where?
I tried to set netbios name and dns proxy also

and

#cat /etc/hosts
...
192.168.2.1 my.router my.WL500gp
but I didn't set this.

I'll try to set all firmware from begining again... then i'll send my result.


Isn't the correct way to set the hostname via the web interface?
This sets an nvram variable, which works for me

#nvram show | grep lan_hostname
..
lan_hostname=MyAsus
#hostname
MyAsus

NB I haven't set the hostname in any script..

You can have a different netbios name for windows shares in the smb.conf, e.g

[global]
netbios name = mystorage

Then you can access this with \\mystorage

WVR
15-09-2006, 21:39
Well on my web gui, On lefthand menu:
IP Config -> LAN
Then get box "Host Name:"
When you hover over it says
"This field allows you to provide a
LAN hostname for
WL500g.deluxe"

Or you could set the value directly in the nvram
nvram set lan_hostname=MyHostName

If you do it this way, don't forget to save the nvram ...
nvram commit

r0kanon
27-09-2006, 17:32
Houston - do you have the line in your smb.conf that says

dns proxy = no

?

paxcer
01-10-2006, 18:00
Hello everybody!

I have flashed my WL500gP just 2 days ago with Oleg's pre7. I've configured it according to marcnesium's and r0kanon's tutorials (by the way, great job guys).

However I have expierienced the same problem with SAMBA as it was already posted here. Nevertheless I found a solution. As you have pointed out the problem was hostname. In marcnesium's tutorial there was this piece of code:

#!/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
to put into the /opt/etc/init.d/S97Samba file.
As you the "myasus" in the third line is actually your hostname. So what I have done, was just changing "myasus" to "WL500gP" (the hostname I have set in all other files) in S97Samba. After reboot the Samba was working just perfect. I've mapped a network drive under windows and now I can browse, add and remove files.
By the way, I know so very little about linux, so don't laugh if I've written something lame :)

k.mooijman
25-12-2006, 02:18
Hello everybody

I followed the howto and got most of the commands in with no error but now i can't get ftp acsess nor samba .
i can mound the disk and browse it withe putty but i have no acsess from my computer

samba is running


[admin@AsusWL500gP smbshare]$ ps
PID Uid VmSize Stat Command
1 admin 660 S /sbin/init
2 admin SW [keventd]
3 admin SWN [ksoftirqd_CPU0]
4 admin SW [kswapd]
5 admin SW [bdflush]
6 admin SW [kupdated]
7 admin SW [mtdblockd]
57 admin 308 S telnetd
62 admin 396 S httpd vlan1
65 admin 524 S nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
69 admin 364 S klogd
70 nobody 488 S dnsmasq
71 admin 396 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
72 admin SW [khubd]
81 admin 276 S lpd
83 admin 260 S p9100d -f /dev/usb/lp0 0
86 admin 340 S waveservermain
89 admin 344 S rcamdmain
93 admin SW [usb-storage-0]
94 admin SW [scsi_eh_0]
100 admin 320 S infosvr br0
101 admin 456 S watchdog
103 admin 340 S ntp
116 admin 436 S dropbear
120 admin SW [kjournald]
129 admin 432 S udhcpc -i vlan1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
136 admin 408 S /opt/sbin/cron
145 admin 1008 S /usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
147 admin 984 S /usr/sbin/nmbd -D -n myasus -o -l /tmp -s /opt/etc/samba/smb.conf
174 admin 452 S upnp -D -L br0 -W vlan1
184 admin 744 S dropbear
185 admin 572 S -sh
197 admin 316 T cat
262 admin 412 R ps


can someone help me??
thx

Melicous
02-01-2007, 01:32
I had a problem but I fixed it

when you format your hdd for the data bit you may get:

Writing inode tables: Terminated

If so first format your swap partition (shoudn't take long) then just activate it :

mkswap /dev/discs/disc0/partx
swapon /dev/discs/disc0/partx
x beeing your swap partition (in this tut its 2)

then do

mke2fs -j /dev/discs/disc0/party
y beeing your data partition (in this tut its 1) -L0L party :P-

there you go problem solved

africamagical
04-01-2007, 00:09
im doing fine untill the ipkg setup,

when i type:
mkdir /opt/tmp

I get the following error:
mkdir: cannot create directory '/opt/tmp' :Read-only file system


any help is appreciated, i neeeed to get the ctorrent working as the asus download manager blows

gorion
04-01-2007, 00:25
First you have to mount a harddisk/pendrive's partition to /opt. Check it with 'df' command.

abalint21
04-01-2007, 21:03
Hello everybody!

I've read the two tutorials, and managed to get samba and almost all the other stuff working except stupid-ftp.
I've tried to find the config file necessary to run stupid-ftp (stupid-ftp.conf) but I can't find it anywhere.
I have enabled FTP sever on the web interface, but still nothing. What can I do in such a case... when should this stupid-ftp.conf be created, and by who?

If nobody can tell me, at least could someone please copy/paste a config file, so I could at least see how do they look like.

Thanks guys!

Regards,
X

africamagical
05-01-2007, 01:54
thanks for the help gorion, i got the hard drive set up and all the apps installed correctly but for some reason i cant get samba to work,
also i have to type post-boot after a restart, it doesnt do it automatically

after i do run post-boot ctorrent starts, but when i click links like source and work, they dont go anywhere 404 error,
also i cant get into my samba shares

any ideas?
most people have been saying set hostname, i do have it set in the web gui and a post-boot line as MyAsus,

TIA

Chip
13-01-2007, 14:13
thanks for the help gorion, i got the hard drive set up and all the apps installed correctly but for some reason i cant get samba to work,
also i have to type post-boot after a restart, it doesnt do it automatically

after i do run post-boot ctorrent starts, but when i click links like source and work, they dont go anywhere 404 error,
also i cant get into my samba shares

any ideas?
most people have been saying set hostname, i do have it set in the web gui and a post-boot line as MyAsus,

TIA

I have the same problems with post-boot! have you tried looking in 'ls -all' to see if its in there? (mine isnt btw) i cant seem to get it running... even with the chmod +x... ARGH!

dooglus
17-01-2007, 20:13
I was following the instructions in the HOWTO, and it was fine until I got to installing screen, at which point it complained:


[admin@(none) /opt]$ ipkg install screen
Installing screen (4.0.3-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/screen_4.0.3-2_mipsel.ipk
Installing termcap (1.3.1-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/termcap_1.3.1-2_mipsel.ipk
Configuring screen
chown: unknown user name: root
Configuring termcap
Successfully terminated.


It looks like it tried to chown something to user 'root', but the only user I have is 'admin'.

I uninstalled screen:


[root@(none) root]$ ipkg remove screen
Removing package screen from root...
Successfully terminated.

Then used the web interface to change the user's name to root using System Setup > Change Name, then tried installing screen again and it worked that time.

So should the HOWTO be changed to tell people to change the username to 'root' instead of 'admin', if that's what the packages expect to find? Or did I do the wrong thing?

KingGuru
25-01-2007, 12:04
I'm kinda new to this router linux world, but I've decided to take out the parts I need from the guide.
and start with dropbear, cuz ssh would be nice to use when out in the world:)
when I have folowed the instruction, made the key, and the script.
the thing is, that I can't just start dropbear.. nothing happens (I expect something to happen, since you made the remark with playing with it)

Anything I need to do before this guide (use 1.9.7.2.f7)

WVR
25-01-2007, 15:52
....
the thing is, that I can't just start dropbear.. nothing happens (I expect something to happen, since you made the remark with playing with it)

Do a ps and if dropbear is running then thats it.
Then use e.g. putty from a PC to ssh into it.

The first time you connect putty should ask you if you want to save the key from the ssh server (dropbear) on your Asus.

KingGuru
07-02-2007, 15:21
Got it.. apperently I forgot to save :(

but anyway.. I have trouble with the transmission for torrent. I get a file not found when I try to access the page /cgi-bin/trans....

I have installet it with the ipkg system..

pinkpanther
10-02-2007, 22:44
I'am a newbie with Linux. (Yes anotherone...)

I use the following firmware from Oleg: WL500gp-1.9.2.7-7f.trx

During this manual i have 3 errors.

ipkg install mc cannot find package mc
ipkg install ctorrent ERROR: cannot satisfy the following dependencies
for ctorrent: libstdc++
ipkg install nload ERROR: cannot satisfy the following dependencies
for nload: libstdc++

Can anyone help me?

pinkpanther
10-02-2007, 23:22
MMhhmmm....

Some things aren't as difficult as they seem.

I did -ipkg install libstdc++- and now ctorrent and nload installed correctly.

Leaves one question: How to get MC?

davvel
17-02-2007, 07:59
I had the same problems as most people here

When you make your partionstions make 2 primary partiotions, do not make any extrended ones. MC wont install since it has been removed from the repository, just skip it unless you know what you are doing. As pinkpanter said, you have to install libstdc++ before you try to install ctorrent.

Instead of putting
#!/bin/sh
/usr/sbin/busybox_httpd -p 8008 -h /opt/share/www
in post-mount, put it in post-firewall and you should be fine!

Regards to the samba problem the solutions has already been described,
if your content of /opt/etc/init.d/S97Samba is:

#!/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

then you should set you hostname in the webinterface (IP config / WAN & LAN / Hostname) to myasus

From what I can tell samba and bittorrent works much better now then with the original asus firmware, many thanks to oleg and to marcnesium!!

Moody Blue
22-02-2007, 21:06
This guide is written supposing that your PC runs Windows, and you want to use your router as file server and Torrent client. My objective was to setup Oleg 1.9.2.7-7f (http://oleg.wl500g.info/#latest) with Transmission (http://www.nslu2-linux.org/wiki/Optware/Transmission) and Samba2 (http://www.nslu2-linux.org/wiki/Optware/Samba2).

Step 1 - Install required HW and SW
1) Connect your PC to the wl-500gP using an ethernet cable (you should not use wireless during Step 1), and make sure that you can connect to the Ethernet
2) Download and install putty (http://www.putty.nl/download.html) and ASUS fw restoration utility (http://dlsvr02.asus.com/pub/ASUS/wireless/WL-500gP/Utility_1670.zip)
3) Download Oleg 1.9.2.7-7f firmware (http://oleg.wl500g.info/1.9.2.7-7f/WL500gp-1.9.2.7-7f.zip)
4) Unplug all USB devices from the router, and disconnect the modem cable
5) Using the web interface, reset the router to factory settings
6) Put the router in restoration mode (http://www.wl500g.info/showthread.php?t=1329)
7) Start ASUS firmware restoration utility and load Oleg fw into the router. Do not interrupt this step, the router may have to be repaired or replaced if you interrupt the load. The router will reboot automatically
8) Connect modem to router, and parametrize it using web interface (at this stage userid/password is admin/admin). Here are some of my parameters:
- Maintain 192.168.1.1 as the router's IP address, and limit DHCP to 192.168.1.2/24
- Activate Telnet and DDNS
- Deactivate ftp and samba
- Allow ping from WAN side
- If you use wireless, select 32mW as the transmission power and activate the maximum possible security supported by your PC's (in my case WEP128 + mac access + hide SSID)
- In LAN IP Setting / Host name specify a hostname of your choice (mine is MyASUS)
9) Reboot the router (using web interface)
You may have to calibrate the wireless part (it took me about 2 weeks to reach an acceptable setup). You can use NetStumbler (http://www.netstumbler.com/) to help you.

Step 2 - Prepare disk
1) Connect disk to router
2) Start putty in Windows (all the remaining actions should be performed in line mode, not web interface). Point it to 192.168.1.1, telnet, keyboard with Linux function keys. You can save 3 profiles in putty, one for Telnet (from LAN), and two for SSH (from LAN and WAN). Paste lines in putty with right click on mouse.
3) Format the disk with 3 primary partitions, first with +512M for swap (select type 82), second with +1G (for /opt), and 3rd with the rest. Use fdisk help to guide you.


insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fdisk /dev/discs/disc0/disc
4) Reboot


reboot
5) Format and mount the disk


insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
mkswap /dev/discs/disc0/part1
swapon /dev/discs/disc0/part1
mke2fs -j /dev/discs/disc0/part2
mount /dev/discs/disc0/part2 /opt
mke2fs -j /dev/discs/disc0/part3
6) Install base packages (ignore errors regarding wl500g):


cd /opt/
mkdir /opt/tmp
mkdir /opt/tmp/ipkg
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk
ipkg.sh install ipkg-opt_0.99.163-9_mipsel.ipk
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk
ipkg.sh install uclibc-opt_0.9.28-12_mipsel.ipk
ipkg update
ipkg install nano
rm *.ipk
7) Create startup scripts and install dropbear


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
nano /usr/local/sbin/post-boot
Here is my post-boot file:


#!/bin/sh
# Start SSH service
dropbear

# test if USB disc has been attached
# if not - then insert needed modules
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi

# Wait for /opt to mount
mount /dev/discs/disc0/part2 /opt
mount /dev/discs/disc0/part3 /tmp/harddisk
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/part1

#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

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
Next let's create the post-firewall file


nano /usr/local/sbin/post-firewall
Here is my post-firewall


#!/bin/sh
## FIREWALL
## set default policy
iptables -P INPUT DROP
## deny ftp access from WAN
iptables -I INPUT 1 -p tcp -i "$1" --syn --dport 21 -j DROP
## Allow access to various router services from WAN
## Ports 22 and 65534 are required by dropbear and transmission
for P in 65534 22; do
iptables -I INPUT 1 -p tcp --syn -i "$1" --dport $P -j ACCEPT
done
Create remaining files:


touch /usr/local/sbin/post-mount
touch /usr/local/sbin/pre-shutdown
chmod +x /usr/local/sbin/*
8) Save to flash and reboot


flashfs save && flashfs commit && flashfs enable && reboot
At the end of this Step2 the router should be able to boot, mount the disk, and use the swap. You can verify this with


mount
free
This should produce an output similar to


[xxxx@MyASUS root]$ mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part2 on /opt type ext3 (rw)
/dev/discs/disc0/part3 on /tmp/harddisk type ext3 (rw)
[xxxx@MyASUS root]$ free
total used free shared buffers
Mem: 30140 13744 16396 0 4148
Swap: 500712 0 500712
Total: 530852 13744 517108

Step3 - Install samba2
Samba2 comes with a web interface from where you can parametrize and restart the service without rebooting the router.


ipkg install mc
ipkg install xinetd
ipkg install samba2
Create folder for samba shares


mkdir /tmp/harddisk/share
chmod ugoa+w /tmp/harddisk/share
Create rc.unslung (to start all your services automatically after each reboot)


nano /opt/etc/init.d/rc.unslung
Here is my rc.unslung file:


# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
#
for i in /opt/etc/init.d/S??* ;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
Edit /opt/etc/xinetd.d/swat file (with nano or mc) to update the "user = root" line with your userid (such as "user = admin").
Make rc.unslung executable, and execute it to start xinetd and samba2


chmod +x /opt/etc/init.d/rc.unslung
/opt/etc/init.d/rc.unslung
Open your browser to http://192.168.1.1:901 and parametrize samba at your will. I have removed all shares and created two new ones:
- Share (pointing to /tmp/harddisk/share)
- Torrent (pointing to /tmp/harddisk/torrent)

Step4 - Install Tranmission
This was my choice for torrent client. It's easy to use. You can either store .torrent files in //myasus/torrent/source or use Transmission's fetch button. At the moment transmission is going through changes, so what follows may not apply in the near future.


ipkg install cron
ipkg install gnuplot
ipkg install logrotate
ipkg install transmission

Create torrent directories


cd /tmp/harddisk
mkdir torrent
mkdir torrent/source
mkdir torrent/target
mkdir torrent/work
chmod ugoa+w torrent
chmod ugoa+w torrent/source
chmod ugoa+w torrent/target
If your administration userid has been renamed from admin to something else, use mc to replace admin in /opt/etc/transmission.conf and /opt/share/www/cgi-bin/transmission.cgi.
Using mc, edit /opt/etc/transmission.conf to update TIMEZONE.
Edit opt/etc/crontab file. Mine is (replace xxxx with your admin userid):


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 ---------- ---------- #
*/30 * * * * xxxx nice /opt/sbin/transmission_watchdog
0 0 * * * xxxx /opt/sbin/logrotate -f /opt/etc/logrotate.conf &>/dev/null
Create S05syslogd, this is necessary to replace logging on memory by logging on disk, and make it available for gnuplot.


nano /opt/etc/init.d/S05syslogd
Here is mine:


#!/bin/sh
#
# Startup script for syslogd
#
# Stop myself if running
if [ -n "`pidof syslogd`" ]; then
killall syslogd 2>/dev/null
fi

/sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
Make it executable:


chmod +x /opt/etc/init.d/S05syslogd
Go to web interface, deactivate telnet and reboot. After that, you can access Transmission from Windows pointing your browser to http://192.168.1.1:8008/cgi-bin/transmission.cgi

Next Steps (optional)
1) Here (http://wl500g.info/showthread.php?t=8197) are some suggestions
2) Activate ftp in web interface (to share /tmp/harddisk)

Dragonar
22-03-2007, 07:22
Same problem over here!


im doing fine untill the ipkg setup,

when i type:
mkdir /opt/tmp

I get the following error:
mkdir: cannot create directory '/opt/tmp' :Read-only file system


any help is appreciated, i neeeed to get the ctorrent working as the asus download manager blows

ant9
29-03-2007, 10:09
Hi there ...
Thanks a lot for the excellent tutorials ... for a linux beginner as me is this perfect. :p

I followed MoodyBlue's tutorial but can not get SAMBA working.
I can not connect to 192.168.1.1:901 for the web interface. The router webinterface 192.168.1.1 is working and accessible.

The services are started and running, did not get any error messages.

Does any one know how to solve this.
Thanks in advance!

wengi
29-03-2007, 12:05
Try "netstat -ln"

Is there something listening on port 901?

Using "ps axf":

Is xinetd running?
Is swat running?

ant9
29-03-2007, 19:20
NO and NO ... :confused: both processes are not running ...
i've used the provided startup scripts ...
how can i autostart them?

Thanks !

ant9
30-03-2007, 20:27
I've found my problem by my self ... finally :)


Hi there ...
Thanks a lot for the excellent tutorials ... for a linux beginner as me is this perfect. :p

I followed MoodyBlue's tutorial but can not get SAMBA working.
I can not connect to 192.168.1.1:901 for the web interface. The router webinterface 192.168.1.1 is working and accessible.

The services are started and running, did not get any error messages.

Does any one know how to solve this.
Thanks in advance!

MoodyBlue's Tutorial states ...
Edit /opt/etc/xinetd.d/swat file (with nano or mc) to update the "user = root" line with your userid."

I've changed this to "user = admin" and the process starts up normally :D

Bye
Ant9

pshdo2
31-03-2007, 09:27
I have been following the how to, and i am "all the way" down to:
ipkg.sh install ipkg
- and then i get the problem....:eek:

I get this results:

ipkg.sh install ipkg
done.
unpacking.....done.
Configuring ipkg...tar: Cannot create directory './opt/bin': No such file or
directory
tar: .opt/bin/ipkg: No such file or directory
Done.

And then i can┤t get any further......

I have mounted my harddrive to /opt, so that should be fine......

What have i done wrong ??:confused:

Pleace, i will be really happy to get a little help with this.....

Regards
Peter

Moody Blue
31-03-2007, 12:37
Peter, use mount command and post result here. Probably your disk is connected to the router but not mounted by Linux.

I would suggest to read Marcnesium, Macsat and r0kanon tutorials to understand "why", and in case you want Samba2 and Transmission follow mine for the "how to".

pshdo2
31-03-2007, 15:36
Hi there....
Thanks for the answer.....


Peter, use mount

if i type "mount" i get:
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part1 on /tmp/harddisk type ext3 (rw,noatime)

if i type "df" i get:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2944 2944 0 100% /
/dev/discs/disc0/part1 307663800 20623468 271411900 7% /tmp/harddisk

is that not the right things i have.....

and then i can:
mount /dev/discs/disc0/part1 /opt
and i then get this from df:
/dev/root 2944 2944 0 100% /
/dev/discs/disc0/part1 307663800 20623468 271411900 7% /tmp/harddisk
/dev/discs/disc0/part1 307663800 20623468 271411900 7% /opt

what do i do wrong ??
As you proberbly have noticed i┤m not at all familier with linux, but i would really like to get this done, and also to learn something about linux in the process.....

Is it btw. not possible to access the file-system inside the router with ftp ??
(I have a dreambox that run linux as well, and on that i can access the filesystem with ftp...)

--
Peter

Moody Blue
31-03-2007, 19:30
Peter, to use this router as a file server, you have basically two options:

1) Format the whole disk as EXT3 and parametrize ftp and/or samba from the web interface (this is valid both for ASUS and Oleg firmware)
2) Partition the disk in several partitions, in which case the embedded ftp and samba are useless (in my opinion), and it's better that you install packages that provide this functionality

I find myself 2) the better option, but this is a matter of personal taste.

Perhaps you could parametrize the router with my tutorial (on page 3), and to activate ftp service you can read this guide http://www.macsat.com/macsat/content/view/25/29/ (no need to reinstall xinetd again) and adapt some of its instructions to my base setup. Or activate ftp in the web interface (this will make /tmp/harddisk available for ftp).

Back to your problem, probably you need to mount part1 as /opt and create the /opt/tmp and /opt/tmp/ipkg directories before installing ipkg. But if your setup is not mounting a partition as /opt by default you will end up in problems later on.

pshdo2
31-03-2007, 20:48
Hi there....
Thanks for the info.....
I don┤t see how i do share a ext3 with the samba demo in oleg┤s firmware.....
it is like something is missing.... i can┤t figure out how to set up, that is mutch easy┤er to understand in original firmware.....


But if your setup is not mounting a partition as /opt by default you will end up in problems later on.

That is as far as i am now..... i can┤t get the router to auto-mount to /opt it mount allways to /tmp/harddisk

Log from my webinterface:
Jan 1 01:00:18 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 01:00:18 kernel: EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
Jan 1 01:00:18 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
Jan 1 01:00:18 kernel: EXT3-fs: recovery complete.
Jan 1 01:00:18 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 01:00:18 USB storage: ext3 fs mounted to /tmp/harddisk
Jan 1 01:00:18 kernel: VFS: Can't find ext3 filesystem on dev sd(8,2).

i have now looked in the files many times, but i can┤t figure out how to get it to mount to /opt

--
peter

shag3doo
01-04-2007, 06:12
i followed the steps here to get oleg firmware up and running.. so far i think i did a good job. dropbare is running transmission and samba is also running.

now after all the setups i tried browsing the internet but i can't.

somehow the router just returns "http:///" i'm also not sure if it's a firewall issue since i can access the router and the router can install packages of ipkg

----
ignore problem.. got frustrated and restarted the whole process and followed it step by step again. it now works.
i have a question about shaping and balancing.. i tried wshaper and it works as is keeping my torrent downloads to a minimum and still able to browse without problems. would it be possible to configure the balancing to burst the download automatically.. if not on a specific time? more or less like what utorrent offers.

guilherme
02-04-2007, 02:33
Could anyone Write an how to but for the newest version?

guilherme
03-04-2007, 17:02
It's really necessary to use a swap disk? I think flash disks doesn't work very good

Moody Blue
03-04-2007, 18:55
It's really necessary to use a swap disk? I think flash disks doesn't work very good
If you connect an external disk it's because you need either to install add'l SW or use file server functions. Swap space is required in these cases because 32M RAM on this router are good enough to work as router, but insuficient to add server capability to it.

I would not recommend pen disks for swap space. Flash technology has limited write capability, swap activity can be very intense and exaust this capability in one year or less.

There are people in this forum that use pen disks for /opt. I don't know if they got good results out of it, certainly speed should be better, and maybe write capability is not an issue (depending on installed packages).

guilherme
03-04-2007, 20:12
after I install the last version of oleg's firmware should I use the ftp server in web interface or should I disable it and use vsftp?

guilherme
04-04-2007, 01:19
It keeps give me some errors, I think the router tries to mount the disk in other partition.

Jan 1 00:00:07 kernel: SCSI subsystem driver Revision: 1.00
Jan 1 00:00:07 kernel: Initializing USB Mass Storage driver...
Jan 1 00:00:07 kernel: usb.c: registered new driver usb-storage
Jan 1 00:00:07 kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jan 1 00:00:07 kernel: Vendor: Model: Rev: PMAP
Jan 1 00:00:07 kernel: Type: Direct-Access ANSI SCSI revision: 02
Jan 1 00:00:07 kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Jan 1 00:00:07 kernel: SCSI device sda: 4029440 512-byte hdwr sectors (2063 MB)
Jan 1 00:00:07 kernel: sda: Write Protect is off
Jan 1 00:00:07 kernel: Partition check:
Jan 1 00:00:07 kernel: p1 p2
Jan 1 00:00:07 kernel: USB Mass Storage support registered.
Jan 1 00:00:12 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 00:00:12 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
Jan 1 00:00:12 kernel: EXT3-fs: recovery complete.
Jan 1 00:00:12 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 00:00:13 kernel: Adding Swap: 62696k swap-space (priority -1)
Jan 1 00:00:13 /opt/sbin/cron[138]: (CRON) STARTUP (V5.0)
Jan 1 00:00:16 kernel: VFS: Can't find ext3 filesystem on dev sd(8,0).
Jan 1 00:00:16 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:16 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:16 kernel: FAT: bogus logical sector size 7950
Jan 1 00:00:16 kernel: VFS: Can't find a valid FAT filesystem on dev 08:00.
Jan 1 00:00:16 kernel: FAT: freeing iocharset=cp950
Jan 1 00:00:16 kernel: FAT: bogus logical sector size 7950
Jan 1 00:00:16 kernel: VFS: Can't find a valid FAT filesystem on dev 08:00.
Jan 1 00:00:16 kernel: VFS: Can't find ext3 filesystem on dev sd(8,1).
Jan 1 00:00:16 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:16 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:16 USB storage: vfat fs mounted to /tmp/harddisk
Jan 1 00:00:16 kernel: Filesystem panic (dev 08:01).
Jan 1 00:00:16 kernel: FAT error
Jan 1 00:00:16 kernel: File system has been set read-only
Jan 1 00:00:16 kernel: Directory 2: bad FAT

Sultan of Olari
09-04-2007, 12:59
I`ve been trying for several days to get transmission to work in my asus wl500pg with oleg. Finally yesterday evening I noticed that oleg has own feed for optware and i changed this feed and I upgraded also every optware that I had installed.

FInally it works but I cant find webpage anywhere. When I try to load http://192.168.1.69:8008/cgi-bin/transmission.cgi page doesn`t load.

With old feed, page loaded, but nothing else happened. Could anybody give some hint what should I do

Sorry about this noobie question and thanks if anyone has time to anwer this

Sultan of Olari
10-04-2007, 08:27
Problem solved!

I formatted my USBdevice and followed instructions in this thread and everything seems to work now.

zzzpt
04-05-2007, 16:00
Well on my web gui, On lefthand menu:
IP Config -> LAN
Then get box "Host Name:"


A big thanks man ;)
The "myasus" thing in the setup is that :rolleyes:

Should edit the tutorial and put this informatios, since there are a lot of people, having the same problem :)

none
18-05-2007, 18:39
thank you very much for that tutorial!

but I have 3 questions about the post-boot file.

1 -> can somebody explain what actually this code does ? :

#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


2->and this ?


# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
my partition of my harddrive is mounted in /opt
so I guess the directory "init.d" does not exist ?
and the file "rc.unslung" does not exist?

3-> how can we check that EVERYTHING that is in the post-boot file has been executed correctly?

Thanks for your precious help!

al37919
19-05-2007, 07:09
1. it waits for some time until /opt is really mounted. Otherwise the last line will not be executed

2. actually it runs all active services located in /opt/etc/init.d --- active means starts with S
/opt/etc/init.d/SXX* files are installed when you install packages which require to be started during boot
Both unslung.rc and SXX* files are just scripts, so you can check their content and what they are doing

3. put line
echo "blah" > /tmp/log
or
mount > /tmp/log
or whatever you want to check in any place of the post-boot file and check the result

modelamark
19-05-2007, 11:44
tried to follow the manual
Samba is working I can browse the drives from windows. But I cannot acces the torrent.cgi script through the web interface.
http://192.168.1.1:8008/cgi-bin/torrent.cgi
gives unable to connect (gave a pink screen with file not found before)
http://192.168.1.1:901/
for Samba also does not work
I gave the hostname in the web interface the name: myasus

mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part1 on /opt type ext3 (rw)

free
total used free shared buffers
Mem: 30116 27468 2648 0 5524
Swap: 524276 0 524276
Total: 554392 27468 526924

I also have the idea that torrent is not working, do I have to set open a NAT port ? How do I do this for the modem itself ?
torrent_admin -l does list my torrents, but nld says everything zero

I have noticed that manually executing the line in post-mount does give me acces to the torrent web interface cgi. Torrent also downloads, but is ver slow, I expect it is working in passive mode
Samba does work, but is not configureable through the web interface. netstat -nl also indicates nothing is listening on port 901

modelamark
19-05-2007, 16:34
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?
I have the same problem. Did you manage to fix that ? I also cannot control samba through a web interface.
Does your torrents also run slow ? Did you have to open a port to get it in active mode ? did you have to fill in your IP address somewhere ?
Copying a set of files to ext3 mount (mounted with ext2volume manager) directly to my PC I get frequent messages that insufficient resources are available. DOcs says 255 bytes is the maximum file namesize, but is that including or excluding the path ?

Fox_Green
27-05-2007, 19:24
Hi!

I have a problem with torrent. :confused:
The download does not start.
Everytime i got the following message in the log:
Unable to find recent transfer stats in syslog
10:26:20 up 12 min, load average: 0.00, 0.02, 0.00

Is there anybody who can help me out?

Fox

kloss
28-05-2007, 20:07
I modyfied the orginal HDD mounting script because it not work correct.
This is my post-boot file:


#!/bin/sh
#loop for /opt to mount
i=0
while [ $i -le 30 ]
do
# waiting to detect hdd
if [ -b /dev/scsi/host0/bus0/target0/lun0/part1 ]
then
break
fi
sleep 1
echo "${i}" >> /tmp/mount_ticks
i=$((i + 1))
done
# Mount partition 1 as /opt
mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt 2>/tmp/mount_opt

# # Mount partition 5 as swap
swapon /dev/scsi/host0/bus0/target0/lun0/part5 2>/tmp/mount_swap


In /tmp directory are created additionally logs files

modelamark
30-05-2007, 21:36
I noticed that as soon as you put the post-boot in with the mounts, stupid_ftp dies, both with this latest post-boot as the original
harddisk seems to be mounted on /tmp/harddisk before post-boot remounting it probably causing the problem
trying to connect with ftp gives the message
500 OOPS:vsftpd: not found: directory given in 'secure_chroot_dir':/opt/usr/share/empty
500 OOPS: child died
vsftpd is on the expected place and the secure_chroot_dir var points to directory that seems to exist
...
strange, fixed the problem by first using directory /opt followed by /opt/usr and it kept working all the way up to the empty.

I have a low drive speed (usb 2.0, ext3, 700 kbyte/s). I first thought it was Samba, but it also turned up with ftp and while connecting the drive directly to my PC and mounting it with ext2 linux partition mounting program. The disk speed mentioned is 480Mbps, limited by USB2.0 60 MB/s

gnesha
03-06-2007, 13:01
Hi,

I've installed Oleg's latest firmware with Transmission. I have several problems.

1) Internet speed to my clients will be slow within 1 hr. I discovered that this can be solved by removing all torrents in Transmission. So I suppose that this is a Transmisson problem.

2) The max speed of downloading torrents I achieved with Transmission is only 10kB/s. Can anyone tell me where I've gone wrong ? Perhaps this is because Transmission does not have protocol encryption and my ISP throttle BT speed.

3) I cannot connect to internet if I turn off and turn on wl-500gP no matter what I do. I've tried using the web-based connect button, rebooting the router, turn off and on my modem, etc. Nothing works, unless I reflash the firmware.

4) My wireless client cannot connect to the internet. It says IP address cannot be refreshed.

If anyone knows the answers to my problems, please help.

Thanks !


gnesha

MirecXP
07-06-2007, 16:00
I have a low drive speed (usb 2.0, ext3, 700 kbyte/s). I first thought it was Samba, but it also turned up with ftp and while connecting the drive directly to my PC and mounting it with ext2 linux partition mounting program. The disk speed mentioned is 480Mbps, limited by USB2.0 60 MB/s

As well as there is no DMA, all data must be copied by the CPU. I think the limitation of speed comes with slow CPU in the router.

jaguarman
10-06-2007, 13:15
It is my first time that I write in a forum. I do not possess great knowledge in Linux. But when I executed the following command gave the following error. If to be able to help me it was thankful.

$ mkdir /opt/tmp
mkdir: Cannot create directory `/opt/tmp': Read-only file system

torino999
12-06-2007, 17:37
Hello,

New to forum, linux-type things, etc.

Problem:

I set up Oleg, HDD, Samba - everything OK

Then I set up ctorrent -> I suddenly lost access to "muzik"-folder on my HDD. RW-rights just vanished, and the strangest thing, I can still access my "video"-folder. I've tried to regain the rights but folder stays in "permission denied"-mode. I tried searching & googling, but no real results since I'm new to linux.

Could someone show me some pointers as I'm getting desperate: that USB-HDD is the only place I have that music!

Thanks in advance,

Tor

modelamark
12-07-2007, 21:49
I have everything working except torrent. It explains
btget: can't load library 'libcrypto.so.0.9.7'
can't find a package that is in the ipkg list

ipkg install -force-reinstall openssl
seems to solve this

MAGNO
27-07-2007, 20:11
hello i'm trying to install last oleg firmware but i have too heavy problem :D

mkdir /opt/tmp
mkdir /opt/tmp/ipkg
ipkg.sh update
ipkg.sh install ipkg
ipkg update


ipkg.sh update when i try to make this command i received an error. can't download the content. why? where is the file to edit and convert dns to specify ip. thanks.

i make every passage before this, is normal that, if i put free on telnet result

0 on swap ?

strange, i make 500 mb of swap file.

thanks for help.

pgielen
20-08-2007, 13:53
Great tutorial, I've used it with success up to the part where Samba and Transmission needed to be installed.

I get an error when trying to install Transmission (ipkg install Transmission), saying the file is not found. Where is it? And how do I install it then?

Pierre

bakablah
30-08-2007, 18:04
Great tutorial, I've used it with success up to the part where Samba and Transmission needed to be installed.

I get an error when trying to install Transmission (ipkg install Transmission), saying the file is not found. Where is it? And how do I install it then?

Pierre

Do a ipkg update
then you'll find Transmission.

pbernardino
01-09-2007, 00:08
Hello
My post-boot and post-mount only work manualy. Writing is names in the console.:(
Help please
Pedro Bernardino

draconis1410
01-09-2007, 03:06
How do I do these processes under windows XP?

zzzpt
29-09-2007, 12:03
Need some help here
Cant mount my disk :(


[admin@myasus root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /

[admin@myasus root]$ free
total used free shared buffers
Mem: 30116 12600 17516 0 1476
Swap: 72252 0 72252
Total: 102368 12600 89768

[admin@myasus root]$ mount /dev/discs/disc0/part5 /opt
mount: Mounting /dev/discs/disc0/part5 on /opt failed: Invalid argument


I find strange that the /dev/root is 100% used ??
I followed the tutorial up to the HDD...

I can mount in other linux systems, and it works also in the original Asus firmware, the problem that i have with it is that sometimes i cant write in some folders :confused: (sometimes only using ftp)

Is there some way to update the mount command ?

EDIT:
well think ive found the problem
the disk has
1 swap partition
1 Extendended LBA DOS (part2)
1 ext3 (part5) (with all the data)

Now how can I delete the extended partition, without delete all the data in the ext3

raas
29-09-2007, 15:15
Now how can I delete the extended partition, without delete all the data in the ext3

use fdisk to delete the 2nd partition

fdisk /dev/discs/disc0/disc

use help command and find command to delete partition. .after you issue the command.. you will be asked to delete which partition.

Hope this helps.

DrChair
29-09-2007, 20:46
use fdisk to delete the 2nd partition


I wouldn't do that...
I harddisk can have up to 4 primary partitions.
That means that partition 5 is a logical partition inside the extended partition.
So deleting the extended partition also deletes the ext3 data partition.

I would hook up the disc to a pc and use partitionmagic or something like that.

zzzpt
29-09-2007, 22:28
I wouldn't do that...
I harddisk can have up to 4 primary partitions.
That means that partition 5 is a logical partition inside the extended partition.
So deleting the extended partition also deletes the ext3 data partition.

I would hook up the disc to a pc and use partitionmagic or something like that.

What i thought so.

Used the partition magic, but since the ext3 partition is inside the extended partition, i dont know how to delete it :confused:

raas
30-09-2007, 13:24
Hi,

i'm very sorry, I misread your post. overlooked the part that it was actually inside the other..

I'm happy more people read this forums :-)

DrChair
01-10-2007, 12:31
What i thought so.

Used the partition magic, but since the ext3 partition is inside the extended partition, i dont know how to delete it :confused:

You don't have to delete it, just convert it...

In partition magic, select the ext3 partition and choose Operations -> Convert -> Logical to Primary

zzzpt
01-10-2007, 14:59
You don't have to delete it, just convert it...

In partition magic, select the ext3 partition and choose Operations -> Convert -> Logical to Primary

Thanks man
:D

will try

Its the same :(

[admin@myasus root]$ fdisk /dev/discs/disc0/disc

The number of cylinders for this disk is set to 30401.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/discs/disc0/disc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/discs/disc0/part1 * 1 9 72261 82 Linux swap
/dev/discs/disc0/part2 10 30401 244123708+ 83 Linux

Command (m for help): q

[admin@myasus root]$ mount /dev/discs/disc0/part2 /opt/
mount: Mounting /dev/discs/disc0/part2 on /opt/ failed: Invalid argument


It works good, in windows using Ext3FS ...
The mount version is this

[admin@myasus root]$ mount -V
mount: illegal option -- V
BusyBox v1.1.3 (2007.01.01-14:37+0000) multi-call binary


the /opt dir is

drwxr-xr-x 1 admin root 0 Apr 6 17:00 opt

Using dmesg


[admin@myasus /]$ dmesg
xing up bus 0
PCI: Fixing up bridge
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
NTFS driver v1.1.22 [Flags: R/O]
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
HDLC line discipline: version $Revision$, maxframe=4096
N_HDLC line discipline registered.
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
Flash Id: Vendor: 0x0001 Device: 0x007e
number of CFI chips: 1
Flash device: 0x800000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 941
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "pmon"
0x00040000-0x007f0000 : "linux"
0x000eb714-0x007f0000 : "rootfs"
0x007f0000-0x00800000 : "nvram"
0x003e0000-0x007f0000 : "flashfs"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.1 (256 buckets, 2048 max) - 352 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
FAT: bogus logical sector size 58624
FAT: bogus logical sector size 58624
NTFS: Unable to set blocksize 512.
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 68k freed
Algorithmics/MIPS FPU Emulator v1.5
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
unregister_netdevice: device eth1/80279800 never was registered
PCI: Enabling device 01:02.0 (0004 -> 0006)
eth1: Broadcom BCM4318 802.11 Wireless Controller 3.90.38.0
vlan0: add 33:33:00:00:00:01 mcast address to master interface
vlan0: add 33:33:ff:6b:3d:e0 mcast address to master interface
vlan0: dev_set_promiscuity(master, 1)
device eth0 entered promiscuous mode
device vlan0 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering listening state
br0: port 1(vlan0) entering listening state
br0: port 2(eth1) entering learning state
br0: port 1(vlan0) entering learning state
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 10:25:12 Jun 17 2006
usb-uhci.c: High bandwidth mode enabled
PCI: Enabling device 01:03.0 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x100, IRQ 2
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:03.1 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x120, IRQ 2
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Enabling device 01:03.2 (0000 -> 0002)
ehci_hcd 01:03.2: PCI device 1106:3104
ehci_hcd 01:03.2: irq 2, pci mem c00ac000
usb.c: new USB bus registered, assigned bus number 3
ECHI PCI device 31041106 found.
ECHI reg 0x49 = 80010f20
ECHI reg 0x49 changed to = 80010f00
ECHI reg 0x4b = 80010f09
ECHI reg 0x4b changed to = 80010f29
PCI: 01:03.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, correcting to 32
ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 4 ports detected
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
hub.c: connect-debounce failed, port 1 disabled
hub.c: new USB device 01:03.2-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x1058/0x901) is not claimed by any active driver.
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
Linux video capture interface: v1.00
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: WD Model: 2500JB External Rev: 0108
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1 p2
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
vlan1: Setting MAC address to 00 18 f3 6b 3d e0.
VLAN (vlan1): Underlying device (eth0) has same MAC, not checking promiscious mode.
vlan1: add 33:33:00:00:00:01 mcast address to master interface
vlan1: add 33:33:ff:6b:3d:e0 mcast address to master interface
vlan1: add 01:00:5e:00:00:01 mcast address to master interface
VFS: Can't find ext3 filesystem on dev sd(8,0).
MSDOS FS: Using codepage 950
MSDOS FS: IO charset cp950
FAT: bogus logical sector size 20487
VFS: Can't find a valid FAT filesystem on dev 08:00.
FAT: freeing iocharset=cp950
FAT: bogus logical sector size 20487
VFS: Can't find a valid FAT filesystem on dev 08:00.
VFS: Can't find ext3 filesystem on dev sd(8,1).
MSDOS FS: Using codepage 950
MSDOS FS: IO charset cp950
FAT: bogus logical sector size 0
VFS: Can't find a valid FAT filesystem on dev 08:01.
FAT: freeing iocharset=cp950
FAT: bogus logical sector size 0
VFS: Can't find a valid FAT filesystem on dev 08:01.
ext3: No journal on filesystem on sd(8,2)
MSDOS FS: Using codepage 950
MSDOS FS: IO charset cp950
FAT: bogus logical sector size 0
VFS: Can't find a valid FAT filesystem on dev 08:02.
FAT: freeing iocharset=cp950
FAT: bogus logical sector size 0
VFS: Can't find a valid FAT filesystem on dev 08:02.
Adding Swap: 72252k swap-space (priority -1)
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
EXT3-fs: Unrecognized mount option r
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
NTFS: unkown option 'r'
EXT3-fs: Unrecognized mount option read
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
NTFS: unkown option 'read'
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
NTFS: unkown option 'debug'
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
NTFS: unkown option 'noload'


now running again FSCK ....

RRRRHHHHHH


[admin@myasus /]$ fsck.ext3 /dev/discs/disc0/part2
e2fsck 1.38 (30-Jun-2005)
/dev/discs/disc0/part2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/discs/disc0/part2: 25980/30523392 files (6.2% non-contiguous), 56144317/61030927 blocks
[admin@myasus /]$ mount /dev/discs/disc0/part2 /opt/
mount: Mounting /dev/discs/disc0/part2 on /opt/ failed: Invalid argument

rnthomas
18-10-2007, 18:55
marcnesium,
What can I say, your tutorial is excellent. I certainly would not have booted up my router as quickly and easily without your tutorial. Thank you so much for your efforts.

Here is a few minor work arounds that you might want to consider. I had to do these to get my router up and running.




Fdisk is self-explaining, type m to view the help-page. When you are finished, don't forget to save changes with the w-command before you exit fdisk.
After partition your disk, it's time to create filesystems


mke2fs -j /dev/discs/disc0/part1
mkswap /dev/discs/disc0/part2

[edit@20060725] typos..

When I ran the above statements, I could not get my hard drive to mke2fs properly. I kept getting a TERMINATED error during the inode creation.

I hard to modify the above code to read as shown below in order to get my drive to format correctly.



mkswap /dev/discs/disc0/part2
swapon /dev/discs/disc0/part2
mke2fs -j /dev/discs/disc0/part1


The reason for making and mounting the swap first thing, is because *IF* you are trying to add a RATHER BIG USB drive (250 Gigs in my case) the mke2fs will die saying that it was "TERMINATED" (see in thread, people having this issue). I suspect this is caused by the router not having enough ram to finish the mke2js job. By mounting the swap file system, expands the available memory enough to allow mke2fs to run 'normally'.

For smaller hard disk drives, the earlier swap mount would not be needed.



What is it for?
Add the following lines to post-boot file:


#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

[edit@20060725] typos..

I would similarly modify the above to read as follows....



# Activate swap
swapon /dev/discs/disc0/part2

#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

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung



Again, this is needed for BIG DRIVES only. When we try to mount a uncleanly mounted USB file system, mount will cause fsck to be run. If we can't mke2fs on 32MB of RAM, then one would not expect fsck to run. So again, by mounting the swap, we ensure fsck has the resources it needs to run successfully.

Regards,
---- Robb ----

22chemik
17-11-2007, 16:04
Hello,
I am newbie so I followed Moody Blue's post off installing Transmission.
All is O.K. but the download speed is about 5kB/s on 2048/512 cable link
I tested much torrents with a a good ratio of seeders to leechers, but still going
to slow.
Can someone advice me.
Thanks

kanguru
29-11-2007, 16:55
Hi

I followed the tutorial for WL-HDD and transmission never worked, so i tryed this one and still no luck to get torrents working. It never connects to any seed.
Any solution?


Besides this problem, the remaining functions work well, so tks for this toturial :)

elund.dk
09-12-2007, 12:06
It is my first time that I write in a forum. I do not possess great knowledge in Linux. But when I executed the following command gave the following error. If to be able to help me it was thankful.

$ mkdir /opt/tmp
mkdir: Cannot create directory `/opt/tmp': Read-only file system

I got the same problem. Are there no help availabe to newbies like jaguarman and me :confused:

EdSki
20-12-2007, 21:59
Hi

I followed the tutorial for WL-HDD and transmission never worked, so i tryed this one and still no luck to get torrents working. It never connects to any seed.
Any solution?



Strange, following this tut on 2 of my 500gP's and my wl-hdd are working 100%. Configuring shares/rights in Samba seems to be the most difficult part. If you f*cked that one up you cannot open Samba. First check the Samba shares to work (do not forget to rename WORKGROUP if you are using another name).

2: Check/edit all the config files! (passwords must match the FW passwords)

3: Make sure you got setup the correct DNSserver (in Oleg's FW).

4: Manually restart watchdog.

5: If it's behind another router: Port forwarding on that one has to be enabled.

Ed


Ed

chriska
24-12-2007, 14:23
Hi All!

First of all, Marry Christmass!
Next, I have difficulties with my system. I have an ASUS WL-500G Premium. An external hdd is connectec to it (via usb). I siply just can't get through with the write protection on it...
Unfortunately I am not used to linux (win. user).
According to the manuals, I could set with the legal firmware update the share as followings:

Network Neighborhood Mode: Apply rules in shared node list
FTP Mode: Login to first matched shared node

User permissions are set in Share Node List. (Guset: read only, Admin: read/write)

DDNS settings are ok.
I can reach the router via http, and reach the share via ftp. (Also on LAN.) The problem is that even if I connect to it as admin (ftp), I can not write to the disk, unless I unmount it, connect it to the PC directly and copy to it. But this shall not be the way I want to use it.

If you could help me with solving this problem, I'd appreciate that much.
Thx 4 your hlp in adv.

Chris

al37919
24-12-2007, 14:49
unfortunately, this router supports ntfs only in read-only mode.

chriska
24-12-2007, 17:21
unfortunately, this router supports ntfs only in read-only mode.

Any way of solution? I wish I could use it mostly as ftp server, BT client as for second.

(Now I'm tryting with reformatting the usb drive to fat 32.)

QMax
24-12-2007, 19:48
Use FAT32 EXT2/EXT3 filesystems.

Max

hweiee
27-12-2007, 06:23
Hi all!

This tutorial is great. I got it all working. Except... trying to have 2 USB Printers.

My router is WL-500W. It has 2 USB Ports. The first one is connected to a USB Hard Disk directly. The other one is connected to a USB Hub. The 2 printers are then connected to the USB Hub.

It appears the problem is to do with the Printer Drivers. This is what it shows when i type "dmesg" in Putty.


[admin@hwei root]$ dmesg
instruction cache 16kb, linesize 16 bytes (2 ways)
Primary data cache 16kb, linesize 16 bytes (2 ways)
Linux version 2.4.20 (root@localhost) (gcc version 3.2.3 with Broadcom modifications) #9 Sun Oct 28 11:52:04 MSK 2007
Setting the PFC to its default value
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 noinitrd init=/linuxrc console=ttyS0,115200
CPU: BCM4704 rev 9 pkg 0 at 264 MHz
Calibrating delay loop... 263.78 BogoMIPS
Memory: 30012k/32768k available (1833k kernel code, 2756k reserved, 248k data, 72k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: Initializing host
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
NTFS driver v1.1.22 [Flags: R/O]
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
HDLC line discipline: version $Revision$, maxframe=4096
N_HDLC line discipline registered.
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
Flash Id: Vendor: 0x0001 Device: 0x007e
number of CFI chips: 1
Flash device: 0x800000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 953
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "boot"
0x00040000-0x007f0000 : "linux"
0x000ee744-0x007f0000 : "rootfs"
0x007f0000-0x00800000 : "nvram"
0x003e0000-0x007f0000 : "flashfs"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.1 (256 buckets, 2048 max) - 352 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
FAT: bogus logical sector size 22016
FAT: bogus logical sector size 22016
NTFS: Unable to set blocksize 512.
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 72k freed
Algorithmics/MIPS FPU Emulator v1.5
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.108.9.0
eth1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.108.9.0
PCI: Enabling device 01:02.0 (0004 -> 0006)
eth2: Broadcom BCM4329 802.11 Wireless Controller 4.108.9.0
device eth0 entered promiscuous mode
device eth2 entered promiscuous mode
br0: port 2(eth2) entering listening state
br0: port 1(eth0) entering listening state
br0: port 2(eth2) entering learning state
br0: port 1(eth0) entering learning state
br0: port 2(eth2) entering forwarding state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
br0: topology change detected, propagating
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 22:59:22 Oct 15 2007
usb-uhci.c: High bandwidth mode enabled
PCI: Enabling device 01:03.0 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x100, IRQ 12
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:03.1 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x120, IRQ 12
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Enabling device 01:03.2 (0000 -> 0002)
ehci_hcd 01:03.2: PCI device 1106:3104
ehci_hcd 01:03.2: irq 12, pci mem c00f1000
usb.c: new USB bus registered, assigned bus number 3
ECHI PCI device 31041106 found.
ECHI reg 0x49 = 80010f20
ECHI reg 0x49 changed to = 80010f00
ECHI reg 0x4b = 80010f09
ECHI reg 0x4b changed to = 80010f29
PCI: 01:03.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, correcting to 32
ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 4 ports detected
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
Linux video capture interface: v1.00
hub.c: connect-debounce failed, port 1 disabled
hub.c: new USB device 01:03.2-1, assigned address 2
usb.c: USB device 2 (vend/prod 0xd49/0x3200) is not claimed by any active driver.
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Maxtor Model: 3200 Rev: 0344
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
Adding Swap: 506008k swap-space (priority -1)
VFS: Can't find ext3 filesystem on dev sd(8,0).
MSDOS FS: Using codepage 950
MSDOS FS: IO charset cp950
FAT: bogus logical sector size 22278
VFS: Can't find a valid FAT filesystem on dev 08:00.
FAT: freeing iocharset=cp950
FAT: bogus logical sector size 22278
VFS: Can't find a valid FAT filesystem on dev 08:00.
VFS: Can't find ext3 filesystem on dev sd(8,1).
MSDOS FS: Using codepage 950
MSDOS FS: IO charset cp950
FAT: bogus logical sector size 63222
VFS: Can't find a valid FAT filesystem on dev 08:01.
FAT: freeing iocharset=cp950
FAT: bogus logical sector size 63222
VFS: Can't find a valid FAT filesystem on dev 08:01.
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,3), internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.




The part that i made BOLD is why i think its a driver problem. And,.. only 1 printer is detected? correct? But I have 2 printers connected.


Please help.

IMM22
14-01-2008, 19:16
This guide is written supposing that your PC runs Windows, and you want to use your router as file server and Torrent client. My objective was to setup Oleg 1.9.2.7-7f (http://oleg.wl500g.info/#latest) with Transmission (http://www.nslu2-linux.org/wiki/Optware/Transmission) and Samba2 (http://www.nslu2-linux.org/wiki/Optware/Samba2).

....

Hi,

First I want to thank you for the great tutorial on "Update for Oleg 1.9.2.7-7f with Samba2 and Transmission". I have a small question that O don't know if you can respond.

I've installed Samba2 and Transmission and both this packages work ok. But when I install mt-daapd (itunes) server, Samba2 won't startup on boot and for some reason it's impossbile to access the webpage of transmission. Did you allready test this configuration?
What could be wrong?

Thanks for your attention!

jc_pazos
17-01-2008, 14:13
Hi Everybody.

I followed the steps to configure the client torrent, and what I go running but discharges to a very low speed, I would like to know if you can give me some advice to increase the speed.

Thanks :rolleyes:

Moody Blue
20-02-2008, 20:07
Hi,

I've installed Samba2 and Transmission and both this packages work ok. But when I install mt-daapd (itunes) server, Samba2 won't startup on boot and for some reason it's impossbile to access the webpage of transmission. Did you allready test this configuration?
What could be wrong?

Thanks for your attention!
I have not tested this configuration. My router is now with one of my children and I have no access to it. Also, because of this, I no longer visit this forum as often as before.

Warm regards, Hugo

Quistor
07-04-2008, 22:34
Hello all,
I started with the howto part1, literally following all code but I get stuck with FDISK. This is due to me having no experience with Linux :rolleyes:
In FDISK I made 2 partitions:

Command (m for help): p

Disk /dev/discs/disc0/disc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/discs/disc0/part1 1 60000 481949968+ 83 Linux
/dev/discs/disc0/part2 60001 60801 6434032+ 83 Linux
(By the way it's a WD MyBook 500Gb)

When I try to commit, it goes wrong:


Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource
busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
When I restart my wl-500gp I still see my old ntfs partition?
Could anyone explain to me what I should do, please bear with me, I'm a complete newbie.

raas
08-04-2008, 11:37
Hi Quistor,

What exactly goes wrong.. this 'syncing disk' thing will take a while.
(has to write journal, blocks, inode, etc.etc.)

when it's ready, it will 'return' with a 'prompt'.

and, can fdisk remove this 'ntfs' partition. (otherwise, remove the partition from the disk with a windows system so that you have a 'virgin' disk with no partitions on it)



So,
- recreate the partitions using fdisk,
- save partition table to disk with 'w'
- wait until it's finished.
- reboot, and see what it does.

HTH

Quistor
08-04-2008, 20:42
Hi Raas,

Thanks for your response :)
I did solve the issue. I checked the system log through the web interface and noticed this line:

USB storage: ntfs(ro) fs at /dev/discs/disc0/part1 mounted to /tmp/mnt/disc0_1

So I thought, maybe I should unmount it? That did the trick indeed.

umount -v /tmp/mnt/disc0_1

I hear the duh's from more experienced Linux users, but this might be helpful for linux noobs like me :D

cheers,

RenÚ

funmen
15-04-2008, 08:30
when I do the command
mkdir /opt/tmp

the router will not process it. I receive the words not-readable or something like that. anyway, the may can't be created. What is the solution for me?

raas
15-04-2008, 09:11
@funmen:
Have you mounted your partitions correctly?

please post the output of the 'df' command.

funmen
15-04-2008, 22:09
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /

That's it, I have done everything according to the turtorial. But the hard disk is offline, I'm going to do it again tomorrow and reset the whole thing. The hard disk is not working, so I first have to format the hard disk again. Which format is the best, ext3 or fat32? I'm going to use it for bittorrent and a little http server.

thohmann
24-04-2008, 21:57
Hi funmen,

I`m not able to help but I'll let you know that you are not alone :).
Same Problem to me. I have partitioned my hard disk again but no write access during the mount. Hope someone can help here.

See:

Sharing answers will help us both :D

Best regards,

Thomas

thohmann
25-04-2008, 00:03
Hi funmen,

I`m not able to help but I'll let you know that you are not alone :).
Same Problem to me. I have partitioned my hard disk again but no write access during the mount. Hope someone can help here.

See:

Sharing answers will help us both :D

Best regards,

Thomas

I found a mistake and I think you did the same.

I have partitioned my harddisk with an external program. Now I tried to format the disk with the internal fdisk of the router..... and system was able to mount the filesystem. --strange-- Try it out, hopefully it will help.

bugio
04-07-2008, 07:07
Extend RAM to 32MB
I add some NVRAM variables on WL-500g Premium V2.After reboot,My WL-500g can not boot.I try push reset botton,but it did not any response.How's to do it recovery?



nvram set sdram_init=0x0009
nvram set sdram_ncdl=0
nvram commit
reboot

zexe
20-07-2008, 22:09
Step 2 - Prepare disk
1) Connect disk to router
2) Start putty in Windows (all the remaining actions should be performed in line mode, not web interface). Point it to 192.168.1.1, telnet, keyboard with Linux function keys. You can save 3 profiles in putty, one for Telnet (from LAN), and two for SSH (from LAN and WAN). Paste lines in putty with right click on mouse.
3) Format the disk with 3 primary partitions, first with +512M for swap (select type 82), second with +1G (for /opt), and 3rd with the rest. Use fdisk help to guide you.


insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fdisk /dev/discs/disc0/disc
4) Reboot


reboot
5) Format and mount the disk


insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
mkswap /dev/discs/disc0/part1
swapon /dev/discs/disc0/part1
mke2fs -j /dev/discs/disc0/part2
mount /dev/discs/disc0/part2 /opt
mke2fs -j /dev/discs/disc0/part3


I got this message: Unable to open /dev/discs/disc0/disc

devat
25-07-2008, 09:12
Hi

I have the same problem as bugio (at least I think so).

After adding the NVRAM variables and the reboot, I can't reach the router (WL-500g Premium V2/oleg firmware 1.9.2.7-10 ) anymore. Now all 4 LAN and the WAN lights are constantly shining.
Reset button doesn't help.

Is there a possibility to solve this problem?

Thanks

bogd_A
26-07-2008, 11:32
Hi

I have the same problem as bugio (at least I think so).

After adding the NVRAM variables and the reboot, I can't reach the router (WL-500g Premium V2/oleg firmware 1.9.2.7-10 ) anymore. Now all 4 LAN and the WAN lights are constantly shining.
Reset button doesn't help.

Is there a possibility to solve this problem?

Thanks

WL-500gP V2 has by defaul all the 32MB enabled.
I did the same mistake as you on my WL-500gP V2, and the only solution was to do the "pin shortcut thing" to make my router work again, doing this you will lose your warranty, but you can use your router.

Do a search before doing this, it may be another solution available ..., I did'd found another that worked, so I did the following:

First you have to download the firmware verssion you want to use
- unplug your router
- open the box
- connect your router to the PC using a cable connection
- on your PC you have to set the IP: 192.168.1.10; SUBNET: 255.255.255.0, Preffered DNS: 192.168.1.1
- you have to make a temporar connection between the grount connector and the R56 pin of the router

3364

- plug the power cord to the router, wait about 2 seconds and then remove the connection between the ground and the R56 pin
- the power led on the router will start to blink
- using the firmware restoration tool from the asus software upload to the router your desired firmware

And that's it.

jippie
12-08-2008, 21:14
I need a bit of help
I have got USB harddrive and samba running but with problems.

The first one is that the usb harddrive if not used it will power down.
What should I do to power it back up again, or should I add something to cron to access is every 5 mins?

The second problem if I reboot the rout usb drive does not mount.
Now the is the strange bit, if I just reboot again it does mount and everything will runs fine!!!

ideas for this one?

regards,

jippie

devat
16-08-2008, 12:21
Thanks bogd_A

I just tried the pin trick and it works well, the router is now in restoration mode and I can ping it.

But when I run the firmware restoration tool it always tells me something like:"searching for an available ip adress" and the restoration doesn't start.
I tried it with tftp as well, the file transfer works, but when I switch the router off and on again, I'm in the same situation as before.

Any idea?

PS: would be nice if someone could write in the Howto, that you should't use the nvram script with a V2!

bogd_A
20-08-2008, 06:23
Thanks bogd_A

I just tried the pin trick and it works well, the router is now in restoration mode and I can ping it.

But when I run the firmware restoration tool it always tells me something like:"searching for an available ip adress" and the restoration doesn't start.
I tried it with tftp as well, the file transfer works, but when I switch the router off and on again, I'm in the same situation as before.

Any idea?

PS: would be nice if someone could write in the Howto, that you should't use the nvram script with a V2!


Hy,

Sorry I wasn't able to reply sooner.
On the PC from which you want to upload the firmware, under Local Area Connection, at Internet Protocol (TCP/IP) Properties you have set the following?

IP address: 192.168.1.1
Subnet marsk: 255.255.255.0
Default gateway: 192.168.1.1
Preffered DNS server: 192.168.1.1

If it still doesn't work, try to put the router again in restoration mode but using the normal way: unplug the router, connect to the PC, push and hold the black button on the back of the router (RESTORE) and plug the router, after a few secconds let go on the button and you can try again with the restoration tool.

Let me know if it works

raas
20-08-2008, 11:02
Hy,

Sorry I wasn't able to reply sooner.
On the PC from which you want to upload the firmware, under Local Area Connection, at Internet Protocol (TCP/IP) Properties you have set the following?

IP address: 192.168.1.1
Subnet marsk: 255.255.255.0
Default gateway: 192.168.1.1
Preffered DNS server: 192.168.1.1

If it still doesn't work, try to put the router again in restoration mode but using the normal way: unplug the router, connect to the PC, push and hold the black button on the back of the router (RESTORE) and plug the router, after a few secconds let go on the button and you can try again with the restoration tool.

Let me know if it works

it could be me, but, if you go into restoration mode, your router defaults to address 192.168.1.1 and your pc needs to have 192.168.1.10 (fixed ip-mode) no dhcp

HTH

poiu
20-08-2008, 17:48
Sure Raas, ip on computer must be any between 2-254, not 1 .

devat
20-08-2008, 19:53
The settings are like that. (first I didn't have an entry in default gateway)
I tried it again, but I still get the "searching for available ip" message from the restoration tool.

Strange thing is, now even the tftp file transfer doesn't work anymore.


Normal way for restoration mode still doesn't work.

thanks

raas
20-08-2008, 20:05
Sure Raas, ip on computer must be any between 2-254, not 1 .

well, I'm really sorry poiu, people make mistakes.

bogd_A
21-08-2008, 06:58
The settings are like that. (first I didn't have an entry in default gateway)
I tried it again, but I still get the "searching for available ip" message from the restoration tool.

Strange thing is, now even the tftp file transfer doesn't work anymore.


Normal way for restoration mode still doesn't work.

thanks

The cable that connects the PC to the router is connected on LAN 1, 2, 3 or 4 connector from the router?

After you did the pin trick the power led on the router was blinking? and the only led that should be on was the one that indicates the LAN port you are connected?

I don't know what else you could try, for me it worked this pin trick ... if all the above are wright ... you could try again

devat
23-08-2008, 18:33
And it works!

Just connected another laptop (running XP instead of Vista...) to the router and suddenly everything worked.

Thanks again!

bogd_A
25-08-2008, 05:43
it could be me, but, if you go into restoration mode, your router defaults to address 192.168.1.1 and your pc needs to have 192.168.1.10 (fixed ip-mode) no dhcp

HTH

Yap

Of course it has to be .10 on the PC, as I said in the origilal post, but later I ... did a mistake, sorry for that.
Thanks RAAS for pointing that out.

@devat: glad to hear that your router is working

AshDyk
11-05-2009, 21:32
I got this message: Unable to open /dev/discs/disc0/disc

I get exactly the same message. This router is my first contact with linux... When I check what is mounted with "df", this is the result:


[monivash@asus root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /


So I try to mount my hdd:

[monivash@asus root]$ mount /dev/discs/disc0/part0 /opt
mount: Mounting /dev/discs/disc0/part0 on /opt failed: No such file or directory

Results of "dmesg"

CPU revision is: 00029006
Primary instruction cache 16kb, linesize 16 bytes (2 ways)
Primary data cache 16kb, linesize 16 bytes (2 ways)
Linux version 2.4.20 (root@localhost) (gcc version 3.2.3 with Broadcom modifications) #18 Sun Mar 30 13:13:29 MSD 2008
Setting the PFC to its default value
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 noinitrd init=/linuxrc console=ttyS0,115200
CPU: BCM4704 rev 9 pkg 0 at 264 MHz
Calibrating delay loop... 263.78 BogoMIPS
Memory: 30092k/32768k available (1862k kernel code, 2676k reserved, 136k data, 72k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: Initializing host
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
NTFS driver v1.1.22 [Flags: R/O]
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
HDLC line discipline: version $Revision$, maxframe=4096
N_HDLC line discipline registered.
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
PPPoL2TP kernel driver, V0.13 (oleg@cs.msu.su)
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
Flash Id: Vendor: 0x0001 Device: 0x007e
number of CFI chips: 1
Flash device: 0x800000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 912
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "boot"
0x00040000-0x007f0000 : "linux"
0x000e4000-0x007f0000 : "rootfs"
0x007f0000-0x00800000 : "nvram"
0x003e0000-0x007f0000 : "flashfs"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.1 (256 buckets, 2048 max) - 352 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
FAT: bogus logical sector size 59648
FAT: bogus logical sector size 59648
NTFS: Unable to set blocksize 512.
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 72k freed
Algorithmics/MIPS FPU Emulator v1.5
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.150.10.16
unregister_netdevice: device eth1/8106cc00 never was registered
PCI: Enabling device 01:02.0 (0004 -> 0006)
eth1: Broadcom BCM4318 802.11 Wireless Controller 4.150.10.16
vlan0: add 33:33:00:00:00:01 mcast address to master interface
vlan0: add 33:33:ff:d6:9c:9c mcast address to master interface
vlan0: dev_set_promiscuity(master, 1)
device eth0 entered promiscuous mode
device vlan0 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering listening state
br0: port 1(vlan0) entering listening state
br0: port 2(eth1) entering learning state
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering learning state
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 20:50:46 Mar 17 2008
usb-uhci.c: High bandwidth mode enabled
PCI: Enabling device 01:03.0 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x100, IRQ 12
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:03.1 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x120, IRQ 12
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Enabling device 01:03.2 (0000 -> 0002)
ehci_hcd 01:03.2: PCI device 1106:3104
ehci_hcd 01:03.2: irq 12, pci mem c0120000
usb.c: new USB bus registered, assigned bus number 3
ECHI PCI device 31041106 found.
ECHI reg 0x49 = 80010f20
ECHI reg 0x49 changed to = 80010f00
ECHI reg 0x4b = 80010f09
ECHI reg 0x4b changed to = 80010f29
PCI: 01:03.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, correcting to 32
ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 4 ports detected
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
Linux video capture interface: v1.00
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
vlan1: Setting MAC address to 00 17 31 d6 9c 9c.
VLAN (vlan1): Underlying device (eth0) has same MAC, not checking promiscious mode.
vlan1: add 33:33:00:00:00:01 mcast address to master interface
vlan1: add 33:33:ff:d6:9c:9c mcast address to master interface
vlan1: add 01:00:5e:00:00:01 mcast address to master interface


Who can help me out of here? I only want the hdd shared with Samba. I use Oleg's firmware, version 1.9.2.7-10.

Diplomnic
11-02-2011, 21:56
Try


mount /dev/discs/disc0/part1 /tmp/harddisk
mount /dev/discs/disc1/part1 /tmp/harddisk
mount /tmp/harddisk/opt /opt

And watch for errors in syslog in Web UI

Right
07-04-2011, 20:02
Message of insufficient space on hdd.

Router Asuswl500gp2, Oleg's firmware 1.9.2.7 - 10, hdd Seagate 2Tb with external power. The router settings are according to this tutorial: http://wl500g.info/showthread.php?t=10307

I created a folder mkdir /tmp/harddisk/share, copied there about 100Gb and got a message for insufficient space on harddrive

[admin@Wl500gp2 root]$ du s /tmp/harddisk/share
104844952 /tmp/harddisk/share

also mounted folder big, the problem is still there

[admin@Wl500gp2 root]$ mkdir /tmp/mnt/disc0_3/big
[admin@Wl500gp2 root]$ chmod ugoa+w /tmp/mnt/disc0_3/big

there is plenty of free space on the drive:

[admin@Wl500gp2 root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /
/dev/discs/disc0/part2 985720 65988 869660 7% /opt
/dev/discs/disc0/part3 1921383312 104976180 1816407132 5% /tmp/mnt/disc0_3

Filesystem is ext3

[admin@Wl500gp2 root]$ mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part2 on /opt type ext3 (rw,noatime)
/dev/discs/disc0/part3 on /tmp/mnt/disc0_3 type ext3 (rw,noatime)

How can I check if there are restrictions for folder size and what can be reasons for that?
Why do i get a free space message and how can I fix it?