Bekijk de volledige versie : [HowTo] Install and configure Oleg's firmware
Hier findest Du das originale deutsche HowTo: http://wl500g.info/showthread.php?t=8424
After some people asked me to, this is a translation of my original, german Howto.
00. News
November 2011
rtn firmware with kernel 2.6 instead of kernel 2.4 uses disca, discb etc.
you have to replace all occurances of "disc0" with "disca" in this tutorial!!!!
I will update the tutorial if i have time for it.
October 2011
The URL of transmissions level1.gz has changed.
The script S90transmission-daemon is updated
Please use, if your hardware is supported, the "enthusiast firmware" (http://code.google.com/p/wl500g/).
More details later.
This howto is for firmware version 1.9.2.7-9 and newer. Older versions are not supported any more.
Important: I exclude any liability.
This HowTo is for newbies! please contact me if you find any mistakes.
0. Premises
I am working with an Asus WL-HDD. But this HowTo is known to work with other hardware where you can install olegs firmware.
The WL-HDD has a weak CPU and small memory, but it does the job :-)
You also need:
- basic linux knowledge (cd, vi, ps, df, free, top, ...)
- time. I needed about 5 hours for modifying my WL-HDD incl. dinner. So you need time.
- an internet connection for downloading the software.
1. Install firmware
The easiest way is the Asus Firmware Restoration Tool. Download the tool according to your hardware.
ASUS WL-HDD2.5 wireless hard disk drive box utility program in English (http://dlsvr02.asus.com/pub/ASUS/wireless/WL-HDD/Eng_Cht_1362.zip)
It will also work with the Asus Webinterface but be sure to have the restoration tool by hand.
Download olegs firmware: Firmware Wizzard (not allways newest) (http://website.wl500g.info/beta/wizard.php) or directly at http://oleg.wl500g.info
Always use the newest version for your hardware model.
UPDATE:
There is an advanced version of oleg firmware (http://code.google.com/p/wl500g/downloads/list).
This one is compatible to the original and is well maintained.
I recommend using this firmware if your hardware is supported.
This HowTo wil only work with versions 1.9.2.7-9 and newer!
Reset your Asus to factory defaults. (user:admin / pw:admin)
Extract the zip.
Install the Asus tool, start it and select "firmware restoration".
Select the firmware (hardware_version.trx) and click upload.
After the reboot browse to the Webinterface of the router and again reset to factory defaults.
Again a reboot and your router has a default oleg firmware.
remark:
My WL-HDD does NOT act as Router in my network. It is only a client. Because of this i will not handle firewall settings within this howto.
Do the following in the Webinterface:
- enter the Name of the router (mine is "blechbuechse").
- enter you IP settings (IP, gateway, DNS aso.)
- disable FTP, Samba, NFS
- enable telnet
- Change the password
- do any changes as you need them. (DHCP, time zone, WLAN, aso.)
- If used as router: login data, firewall, allow ping from WAN.
If this did NOT work until here you will NOT be able to go on!
2. Telnet
Start telnet. For Windows: Start-Execute - "telnet IPOFASUS"
user:admin / pw:admin
Test your internet connection:
ping google.de
Should look like this:
[admin@blechbuechse root]$ ping google.de
PING google.de (66.249.93.104): 56 data bytes
64 bytes from 66.249.93.104: icmp_seq=0 ttl=243 time=35.5 ms
64 bytes from 66.249.93.104: icmp_seq=1 ttl=243 time=36.5 ms
64 bytes from 66.249.93.104: icmp_seq=2 ttl=243 time=35.0 ms
--- google.de ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 35.0/35.6/36.5 ms
[admin@blechbuechse root]$
The ping can be interrupted with ctrl-c.
If this is NOT working: Do not ping a name, ping an IP adress.
If you are not able to ping an ip adress: check your network (IP, DNS) settings and cabeling.
telnet is not a secure way to work on your asus. Espacially over internet. This is why you install SSH now:
3. SSH-deamon
TIP: You can copy & paste all commands within telnet and putty. For Windows use ctrl-c and ctrl-v, for putty mark the text and right click.
The name of the ssh daemon is dropbear. It can be activated with the Web Interface (System Setup->Services) if you use the "enthusiast firmware" (1.9.2.7-d-rxxxx) (http://code.google.com/p/wl500g/). Using the new firmware you only have to generate the keys and startup scripts.
Users of firmwares before 1.9.2.7-d-rxxxx need to execute the whole chapter!
create startup scripts:
mkdir -p /usr/local/sbin/
touch /usr/local/sbin/pre-boot
touch /usr/local/sbin/post-boot
touch /usr/local/sbin/post-firewall
touch /usr/local/sbin/post-mount
touch /usr/local/sbin/pre-mount
touch /usr/local/sbin/pre-shutdown
chmod +x /usr/local/sbin/*
create a directory: (only firmware older than 1.9.2.7-d-rxxxx)
mkdir -p /usr/local/etc/dropbear
generate keys:
dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key
dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key
To make dropbear start at reboot: (only firmware older than 1.9.2.7-d-rxxxx)
echo "#!/bin/sh" >> /usr/local/sbin/post-boot
echo "dropbear" >> /usr/local/sbin/post-boot
Start dropbear:
dropbear
Here is a listing of the active processes. dropbear should be one of them:
[admin@blechbuechse sbin]$ ps
PID Uid VmSize Stat Command
1 admin 580 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]
46 admin 332 S telnetd
51 admin 380 S httpd
54 admin 408 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
56 admin 364 S klogd
57 admin SW [khubd]
72 1 364 S [portmap]
74 admin 504 S /usr/sbin/statd
76 admin SW [nfsd]
77 admin SW [lockd]
78 admin SW [rpciod]
80 admin 484 S /usr/sbin/mountd
83 admin 484 S watchdog
85 admin 344 S ntp
94 admin SW [kjournald]
95 admin SW [kjournald]
99 admin 580 S -sh
128 admin 468 S dropbear
129 admin 392 R ps
save all the stuff and reboot:
flashfs save && flashfs commit && flashfs enable && reboot
That's it for this part.
4. partition and format HDD
Important for USB Disks: Power on First HDD , second router.
IMPORTANT: You will loose all the data on your HDD. Make a backup if necessary.
From now on you will work with putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/).
Start putty, enter the IP adress of your box and select SSH.
Confirm the Key.
My HDD (80GB) is partitioned as follows:
data (part1), IPKG (part2) und swap (part3)
all primary, no extended
Swap 512MB (You can also use 128MB if you want to save some space)
IPKG 1GB
Data the rest (~78GB)
View mountpoints
[admin@blechbuechse root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
/dev/discs/disc0/part1 75398848 683812 70884940 1% /tmp/mnt/disc0_1
[admin@blechbuechse root]$
If there is nothing except / go directly to fdisk.
If you allready partitioned your HDD as you want (incl. swap) go to the next chapter. BUT: i recommend using fdisk because several users reported problems in mounting partitions created with third party software.
You should unmount all mounts except /.
umount /place/of/mountpoint
/place/of/mountpoint needs to be replaced with the entries from df. E.g. "umount /tmp/mnt/disc0_1".
If there is an error message during umount there is activity on the mount. Did you disable FTP / Samba, ...?
After unmounting all it should look like this:
[admin@blechbuechse root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
There may be a tmpfs mounted on /tmp which depends on the used firmware and does NOT need to be unmounted.
Partition with fdisk:
fdisk /dev/discs/disc0/disc
fdisk:
m for help.
p for view partitions.
d for delete.
n for new.
Delete all existing partitions, if any. All data will be lost!!! create new partitons after deleting the old ones:
partitions:
part1 Swap 512MB type82
part2 IPKG 1024MB /opt
part3 data rest /tmp/harddisk (This is a point where WL-HDD differs to others..!?!)
Create swap: n -> p -> 1 -> 'return' -> +512M -> t -> 82
Create IPKG: n -> p -> 2 -> 'return' -> +1024M
Create data: n -> p -> 3 -> 'return' -> 'return'
Save settings by pressing w and exit.
"fdisk -l" will show your partitions:
[admin@blechbuechse root]$ fdisk -l
Disk /dev/ide/host0/bus0/target0/lun0/disc: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target0/lun0/part1 1 993 500440+ 82 Linux swap
/dev/ide/host0/bus0/target0/lun0/part2 994 2978 1000440 83 Linux
/dev/ide/host0/bus0/target0/lun0/part3 2979 155061 76649832 83 Linux
Now you activate the swap:
This is a 'free' without swap:
[admin@blechbuechse root]$ free
total used free shared buffers
Mem: 13932 11304 2628 0 1388
Swap: 0 0 0
Total: 13932 11304 2628
[admin@blechbuechse root]$
activate swap:
mkswap /dev/discs/disc0/part1
swapon /dev/discs/disc0/part1
'free' should look like this after activating:
[admin@blechbuechse root]$ free
total used free shared buffers
Mem: 13932 10236 3696 0 1320
Swap: 500432 0 500432
Total: 514364 10236 504128
[admin@blechbuechse root]$
Now you have enough free memory to format the rest of the HDD:
mke2fs -j /dev/discs/disc0/part2
mke2fs -j -m 0 /dev/discs/disc0/part3
part3 will take some time, depending on HDD size. The option '-m 0' will set reserved blocks to 0. Do NOT try this on /opt partition!!!
A remark for the newbies: The partitions are ext3 formated. This is what you want!. You do NOT need Fat or NTFS to access your data.
You need to edit the file fstab to automaticaly mount the partitions
a short vi Explanation: vi is an editor.
You enter the insert mode with i, you leave it with ESC.
You can insert the content of the clipboard by right clicking within insert mode.
After leaving the insert mode you quit and save by typing ':wq'. Leaving without saving is ':q!'.
This is all. Search for a vi howto for more.
Edit the file /etc/fstab by typing:
vi /etc/fstab
and paste this:
#device Mountpoint FStype Options Dump Pass#
/dev/discs/disc0/part1 none swap sw 0 0
/dev/discs/disc0/part2 /opt ext3 rw,noatime 1 1
/dev/discs/disc0/part3 /tmp/harddisk ext3 rw,noatime 1 1
Partitions are mounted and swap is activated.
Important: The data partition is mounted to /tmp/hardisk as in fstab. This is handled different in the firmware because of compatibility issues: The Partition is mounted to /tmp/mnt/disc0_3 and a symlink is pointing from /tmp/hardisk to /tmp/mnt/disc0_3
To save fstab for reboot:
echo "/etc/fstab" >> /usr/local/.files
5. Startup-scripts
The time zone in the firmware is not correct for middle europe. We will correct this:
This issue is fixed from verison wl500g-1.9.2.7-d-r240 (2009-04-11) on.
If you use any newer version you can continue with i /usr/local/sbin/pre-mount.
vi /usr/local/sbin/pre-boot
content:
#! /bin/sh
tz="CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00"
nvram set time_zone="$tz"
echo "$tz" > /etc/TZ
Have a look at http://wl500g.info/showpost.php?p=139268&postcount=4 or http://wl500g.info/showthread.php?t=13727 for details.
There is a script to keep the file system clean:
vi /usr/local/sbin/pre-mount
with this content:
#! /bin/sh
swapon -a
for i in `awk '/ext3/{print($1)}' /etc/fstab` ; do
if [ -b $i ] ; then
grep -q $i /proc/mounts || e2fsck -p $i 2>&1 | logger -t e2fsck
else
logger -t fstab "$i is not attached"
fi
done
pre-mount will start e2fsck if needed. My WL-HDD with its 80GB HDD takes some hours to do this check! It is possible that your router is switched on and the HDD becomes available hours later. You can leave pre-mount empty to prevent this, but your file system will have to be checked from time to time. Your decision. I have this activated.
post-mount is executed after pre-mount
vi /usr/local/sbin/post-mount
content:
#! /bin/sh
/opt/etc/init.d/rc.unslung start
And this file is executed before shutting down:
vi /usr/local/sbin/pre-shutdown
And again content:
#! /bin/sh
/opt/etc/init.d/rc.unslung stop
sleep 10s
for i in `cat /proc/mounts | awk '/ext3/{print($1)}'` ; do
mount -oremount,ro $i
done
swapoff -a
sleep 1s
This script is remounting all partitions as read only to prevent loss of data at power off.
The HDD has to be mounted before editing the next file. But the best is to save and reboot:
flashfs save && flashfs commit && flashfs enable && reboot
check swap and mount of HDD with 'free' and 'df -h'. Everything ok? Next step.
Software and services installed via IPKG write scripts to /opt/etc/init.d.
You need a mechanism to start these scripts. This mechanism (a script) is triggert by post-boot.
mkdir /opt/etc
mkdir /opt/etc/init.d
vi /opt/etc/init.d/rc.unslung
Remark: If you get a "mkdir: Cannot create directory `/opt/etc': Read-only file system" your HDD (here the IPKG pertition) is NOT mounted.
Content:
#! /bin/sh
# Start/stop all init scripts in /opt/etc/init.d
# starting them in numerical order and
# stopping them in reverse numerical order
#
if [ $# -ne 1 ]; then
printf "Usage: $0 {start|stop}\n" >&2
exit 1
fi
daemons=`echo $(/usr/bin/dirname $0)/S??*`
[ $1 = "stop" ] && daemons=`echo $daemons | /usr/bin/tr " " "\n" | /usr/bin/sort -r`
for i in $daemons; do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
# Write to syslog
logger -t rc.unslung "$1 service $i"
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set $1
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i $1
;;
esac
done
Make it executable:
chmod +x /opt/etc/init.d/rc.unslung
And this part is done :D
6. IPKG
IPKG is a package management system. You can install additional software with it.
IPKG works on your HDD in /opt. Thats why you created and mounted the IPKG partition in /usr/local/sbin/post-boot.
By the way: The log files are written to /opt/var/log.
The steps to install the package management system are:
create a directory.
mkdir -p /opt/tmp/ipkg
cd /opt/tmp/ipkg
Download and install the packages (ignore all errors):
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk
ipkg.sh install ipkg-opt_0.99.163-10_mipsel.ipk
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk
ipkg.sh install uclibc-opt_0.9.28-13_mipsel.ipk
ipkg update
Use the following command to see which packages are installed:
ipkg list_installed
It looks like this:
[admin@blechbuechse ipkg]$ ipkg list_installed
ipkg-opt - 0.99.163-10 - The Itsy Package Manager
uclibc-opt - 0.9.28-13 - micro C library for embedded Linux systems
Successfully terminated.
You can keep your installation up to date in future.
Execute regularly:
ipkg update
ipkg upgrade
7. Midnight Commander (optional)
Install MC
ipkg install mc
Some settings are necessary for MC to run properly.
echo "export TERMINFO=/opt/share/terminfo">>/opt/etc/profile
echo "alias mc=\"mc -c\"">>/opt/etc/profile
make profile executable:
chmod +x /opt/etc/profile
8. Tools (optional)
These tools are very helpful. I recommend installing them even if they are not necessary. 1GB on the HDD is enough space, so:
ipkg install coreutils
ipkg install findutils
ipkg install diffutils
ipkg install screen
ipkg install nano
ipkg install procps
ipkg install less
ipkg install unzip
ipkg install hdparm
ipkg install man
ipkg install man-pages
ipkg install lynx
ipkg install e2fslibs
ipkg install e2fsprogs
9. CRON
Cron is a task scheduler.
ipkg install cron
Edit the cron startup script:
vi /opt/etc/init.d/S10cron
And replace the content with:
#!/bin/sh
#
# Startup script for cron
PIDFILE=/opt/var/run/cron.pid
case $1 in
start)
/opt/sbin/cron
;;
stop)
[ -f ${PIDFILE} ] && kill `cat ${PIDFILE}` ;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
Save and reboot:
flashfs save && flashfs commit && flashfs enable && reboot
Cron must be in the process list (ps) after a reboot.
Remark: If you installed procps you should execute:
ps axf
If cron is NOT listed as running process: Check the content of rc.unslung and post-boot.
If you want a task to be executed you have to make an entry to the crontab (/opt/etc/crontab)
Finished with cron ;)
10. TRANSMISSION (The torrent Client)
You have some routine 'til here. So we start directly:
ipkg install transmission
ipkg install wget
Create working directories:
mkdir -p /tmp/harddisk/transmission/download
mkdir -p /tmp/harddisk/transmission/config/blocklists
chmod -R 770 /tmp/harddisk/transmission/
Config file:
vi /tmp/harddisk/transmission/config/settings.json
With this content:
{
"blocklist-enabled": true,
"dht-enabled": true,
"download-dir": "/tmp/harddisk/transmission/download",
"encryption": 2,
"lazy-bitfield-enabled": true,
"open-file-limit": 64,
"peer-limit-global": 250,
"peer-limit-per-torrent": 60,
"peer-port": 51413,
"peer-port-random-enabled": false,
"peer-port-random-high": 65535,
"peer-port-random-low": 1024,
"peer-socket-tos": 8,
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"rpc-authentication-required": false,
"rpc-enabled": true,
"rpc-password": "",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": "127.0.0.1,192.168.1.*",
"rpc-whitelist-enabled": true,
"speed-limit-down": 500,
"speed-limit-down-enabled": false,
"speed-limit-up": 20,
"speed-limit-up-enabled": true
}More config (http://trac.transmissionbt.com/wiki/EditConfigFiles#Overview1). These are changeing sometimes...
Create startup script:
vi /opt/etc/init.d/S90transmission-daemon
Content:
#!/bin/sh
#
# Startup script for transmission
case $1 in
start)
# update blocklist
echo "updating blocklist"
cd /tmp/harddisk/transmission/config/blocklists
if wget -q -N --tries=3 --timeout=10 http://www.bluetack.co.uk/config/level1.gz
then
if test -f level1.gz; then
rm level1
gunzip level1.gz
chmod go+r level1
fi
else
echo "Error $?. Blocklist NOT updated."
fi
# start transmission
echo "starting transmission"
nice /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
;;
stop)
if [ -n "`pidof transmission-daemon`" ]; then
echo "stopping transmission"
kill -9 `pidof transmission-daemon`
fi
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 (start|stop|restart|force-reload)"
exit 1
esac
Make it executable and start it
chmod 755 /opt/etc/init.d/S90transmission-daemon
/opt/etc/init.d/S90transmission-daemon start
Check the transmission process with
ps axf and browse (IE not supported) to
http://ASUSIPADRESS:9091
transmission is working :rolleyes:
It is a good idea to use ONE widely distributed torrent (http://distribution.openoffice.org/p2p/index.html) for testing transmission.
Download the torrent file, click OPEN in the webinterface and select your torrent file.
You will find the download in /tmp/harddisk/transmission/download.
Transmission uses port 51413.
More information on transmission: http://www.nslu2-linux.org/wiki/Optware/Transmission
11. Logrotate for Syslog
Install logrotate
ipkg install logrotate
Create folder for syslog (not /tmp any more)
mkdir -p /opt/var/log/
Edit crontab
vi /opt/etc/crontab
and add the following line
0 0 * * * admin /opt/sbin/logrotate -f /opt/etc/logrotate.conf &>/dev/null
Edit logrotate:
vi /opt/etc/logrotate.conf
Substitute the complete content with this:
compress
/opt/var/log/syslog.log {
size 1024k
weekly
rotate 9
postrotate
killall -HUP syslogd
endscript
}
include /opt/etc/logrotate.d
Syslog needs to be started:
vi /opt/etc/init.d/S05syslogd
Content:
#!/bin/sh
#
# Startup script for syslog
#
PATH=/opt/bin:/opt/sbin:/opt/local/bin:/sbin:/bin:/usr/bin:/usr/sbin
LOGFILE=syslog.log
KERNLOGFILE=kern.log
LOG_OLD=/tmp
LOG_NEW=/opt/var/log
prefix=""
sbindir=${prefix}/sbin
NAME=syslogd
DAEMON=${sbindir}/${NAME}
DESC="syslogd"
OPTIONS="-m 0 -O $LOG_NEW/$LOGFILE -S -l 7 -s 0"
case "$1" in
start0)
printf "Starting ${DESC}: "
# Copy old syslog and create symlink to new
if [ ! -L /tmp/syslog.log ]; then
cat $LOG_OLD/$LOGFILE >> $LOG_NEW/$LOGFILE
mv $LOG_OLD/$LOGFILE $LOG_NEW/$KERNLOGFILE
ln -s $LOG_NEW/$LOGFILE $LOG_OLD/$LOGFILE
fi
${DAEMON} ${OPTIONS}
printf "${NAME}.\n"
logger -t ${NAME} "started."
;;
stop)
if [ -n "`pidof syslogd`" ]; then
printf "Stopping ${DESC}: "
killall "${NAME}"
printf "${NAME}.\n"
fi
;;
start|restart|force-reload)
$0 stop
sleep 1
$0 start0
;;
*)
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
exit
;;
esac
exit 0
And must be executable:
chmod +x /opt/etc/init.d/S05syslogd
To be sure, you know what will come, save and reboot:
flashfs save && flashfs commit && flashfs enable && reboot
12a. original SAMBA
Samba will show your local HDD in the windows network.
oleg integrated a good working samba version from firmware -9 on.
You activate it in the web interface USB Application -> Samba.
Simply choose "All partitions" for Samba File Shares and a Default Access Level of "read/write".
Do not forget to enter your hostname and workgroup.
12b. IPKG SAMBA
I recommend using samba as in the chapter above. This chapter is for the advanced users who want more flexibility.
Samba has to be disabled in the webinterface!
ipkg install xinetd
ipkg install samba2
You have to change /opt/etc/init.d/S10xinetd to work with the start|stop feature of rc.unslung.
vi /opt/etc/init.d/S10xinetd
content:
#! /bin/sh
#
# Startup script for xinetd
#
prefix=/opt
sbindir=${prefix}/sbin
NAME=xinetd
DAEMON=${sbindir}/${NAME}
DESC="xinetd"
PIDFILE="/var/run/xinetd.pid"
OPTIONS="-pidfile $PIDFILE"
CONFDIR="/opt/etc/xinetd.d"
# installation check
test -x ${DAEMON} || exit 0
case "$1" in
start)
if [ -z "`pidof ${NAME}`" ] ; then
printf "Starting ${DESC}: "
${DAEMON} ${OPTIONS}
printf "${NAME}.\n"
fi
;;
stop)
if [ -n "`pidof ${NAME}`" ]; then
printf "Stopping ${DESC}: "
kill -SIGTERM `cat $PIDFILE`
printf "${NAME}.\n"
for i in ${CONFDIR}/* ; do
if [ -n "`grep "^[[:space:]]*disable[[:space:]]*=[[:space:]]*no" ${i}`" ] ; then
daemon="`basename $(awk -F= '/^[[:space:]]*server[[:space:]]*=[[:space:]]*.*/{print $2}' ${i})`"
printf "Stopping ${daemon}: "
kill "`pidof ${daemon}`" > /dev/null 2>&1
printf "${daemon}.\n"
fi
done
fi
;;
reload|reconfigure)
if [ -n "`pidof ${NAME}`" ]; then
printf "Reloading ${DESC}: "
kill -SIGHUP `cat $PIDFILE`
printf "${NAME}.\n"
fi
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
printf "Usage: $0 {start|stop|reload|reconfigure|restart|force-reload}\n" >&2
exit
;;
esac
exit 0
To make this clear: Stopping xinetd will stop all registered services. Restarting xinetd will stop all services and start only xinetd itself.
Edit the conf for swat:
vi /opt/etc/xinetd.d/swat
You should cutomize the IP settings as you need them and exchange "user = root" with admin -> "user = admin".
Save... reboot... You know... i do this too often, but to be shure...
flashfs save && flashfs commit && flashfs enable && reboot
Samba and xinetd are running after the reboot.
But samba still needs to be configured. This is done with a webinterface:
http://IP.ADRESS.OF.ASUS:901
Goto "Globals":
- Change "workgroup" to your workgroup.
- "netbios name" is the name of your asus (for me again blechbuechse).
- "hosts allow" should be your subnet e.g. "192.168.1." (leave out the last number)
- "guest account" is 'admin'.
Commit changes with "Commit Changes". (You never would have known this :D)
Changes in globas need a restart to take effect!
goto "Shares":
- Insert "torrent" beside "create share" and press "create share".
- "comment": "torrent files"
- "path": "/tmp/harddisk/torrent"
- "read only" NO
- "guest ok" YES
- "browseable" YES
- Press "commit changes".
The settings take effect immediately. No reboot necessary.
You should see your asus in the windows network now.
13. NLOAD
You can see your network load with nload.
ipkg install nload
This is for a DSL 2000 (2000kbit/sec down- 256kbit/sec upstream):
nload -t 200 -s 7 -i 2048 -o 256 -u H eth1
14. Adjust profile
To make life easier at the command promt you will add some alias.
vi /opt/etc/profile The file should be executable (chmod ...).
The content (Edit the nload settings!):
# Some alias for making life easier
# To start nload with DSL 6000 settings: 'nld'
alias nld="nload -t 200 -s 7 -i 6656 -o 640 -u H eth1"
# Make ls default -la with color coding
alias ls="ls --color=auto -la"
# Make pss a grep ps function
alias pss="ps axf | grep"
# df human readable (Only works with coreutils installed!)
# alias df="df -h"There is one more line if you installed midnight commander.
Make it executable:
chmod +x /opt/etc/profile
Save, reboot:
flashfs save && flashfs commit && flashfs enable && reboot
You can verify your modification by entering 'alias':
[admin@blechbuechse root]$ alias
ls='ls --color=auto -la'
nld='nload -t 200 -s 7 -i 6656 -o 640 -u H eth1'
pss='ps axf | grep'
15. Automate SSH login
Until now you need to insert user and password for every ssh login. I assume you are as lazy as i am. So we will do this with keys.
First you need to create a pair of keys. For Windows this is done with PuttyGen (http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe).
Start, press generate and move your mouse until the key is generated.
The field "Key comment" is used to identify the keys, if there are more than one. Insert your name here.
Save the private key as file:
You can save your private key with a passphrase. This is for security reasons. Enter a passphrase.
Press "Save private Key" and save your private key to a file. (e.g. C:\keys\mykey.ppk)
Save the public key on the Asus:
Copy the content of the upper, grey field to the clipboard. The key shold look like this:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAn+NorNZlb9xhogR2DfNq6R qRg04KKXm2t4WIxj/0NWxjOVUAg4fFl2diA+3+f7gjIPdyEJnGUhkfgckYqhfMoZswr TjtvjP00p5O/LPcvGxzpy0XOBty1NQjcYOrOMC6BFrp6Rh0cVThF+sdAYXogn6 w49GOoSvKdgcTLCDubyM= testkey
YOUR KEY SHOULD LOOK DIFFERENT! THIS IS ONLY AN EXAMPLE.
You need a special directory to store your public key in. This is in the root/admin home directory:
mkdir /usr/local/root/.ssh
Edit the file
vi /usr/local/root/.ssh/authorized_keys
and insert the content of your clipboard. One line per key, no line feeds!
Multiple keys can be inserted here and are seperated by a new line. One line for each key.
This part of the filesystem is in the flash so you have to save it:
flashfs save && flashfs commit && flashfs enable && reboot
Next step is to tell putty to use the key:
Configure putty:
"Connection - Data" bei "Auto-login username" enter the username: admin
"Connection - SSH - Auth" at "Private key file for authentication" Enter the file saved in the above step (e.g. C:\keys\mykey.ppk)
Do not forget to save (Session - Save)
Your login should look like this now:
Using username "admin".
Authenticating with public key "testkey"
[admin@blechbuechse root]$
Optional: Disable login with passwort
The option "dropbear -s" disables login with password. Only login with keys will be possible!
Edit /usr/local/sbin/post-boot to modify the option for start.
Insert a "-s" directly behind dropbear.
ATTENTION: If you loose your key you are locked out! Use this with care!
Do not forget to save and reboot.
16. Open SSH port to Internet (if directly connected)
You have to open port 22 in your firewall to connect to your router over internet. If your Asus is directly connected to the internet and in home gateway mode you can do this directly. The firewall is iptables.
Remark: This is a security risk! Be sure to set at least a strong password for your users!!! Have a look at THIS (http://wl500g.info/showpost.php?p=98784&postcount=268) for a secure sshd config.
Edit your /usr/local/sbin/post-firewall and insert:
#!/bin/sh
# this opens the ssh port to internet! Be sure to have strong passwords!
iptables -I INPUT -m tcp -p tcp --dport 22 -j ACCEPT
And don't forget to save!
Hint: The iptables command above can also be used to open other ports.
17. Optimize performance
This chapter is for advanced users. You should not do this if you are a newbie.
Your Asus is completely setup now. Only some optimization regarding the performance is to be done.
This is to keep as much processor and memory free as possible. Even the WL-HDD only has 16MB RAM and a 125MHz CPU. Not that much...
The goal is to start services only if they are needed.
This works with xinetd. Here (http://www.xinetd.org/) is a description.
A) Start samba with xinetd
This chapter is using the original samba of the firmware. If you installed the IPKG samba you will have to change the path /usr/sbin/ to /opt/...
I only need samba for moving my torrent files. So this is rather seldom.
This is why i atart samba with xinetd. To keep system resources free for transmission.
Your samba must work for 100% before making this step!
If xinetd is not installed until now:
ipkg install xinetdYou have to change /opt/etc/init.d/S10xinetd to work with the start|stop feature of rc.unslung.
Do this as it is described in chapter 12b). Only the part with the content of S10xinetd!
samba comprises two daemons:
vi /opt/etc/xinetd.d/netbios-ssn
Content:
service netbios-ssn
{
disable = no
socket_type = stream
protocol = tcp
port = 139
user = admin
wait = no
only_from = localhost 192.168.XXX.1/24
server = /usr/sbin/smbd
}
And the second:
vi /opt/etc/xinetd.d/netbios-ns
Content:
service netbios-ns
{
disable = no
socket_type = dgram
protocol = udp
port = 137
user = admin
wait = yes
only_from = localhost 192.168.XXX.1/24
server = /usr/sbin/nmbd
}
You have to fit the IP Settings for your own needs!
There should already be a /etc/smb.conf. If not you will have to create it. This one shares the data partition with read/write for everyone.
[global]
interfaces = br0
bind interfaces only = yes
workgroup = YOURWORKGROUP
server string = YOURHOSTNAME
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = yes
log level = 1
max log size = 100
encrypt passwords = no
preserve case = yes
short preserve case = yes
client code page = 850
[disc0_3]
path = /tmp/mnt/disc0_3
writable = yes
force user = adminYou have to edit Name and workgroup in this file too!
Now you have to make shure that the /etc/smb.conf is stored before a reboot:
echo "/etc/smb.conf" >> /usr/local/.files && flashfs save && flashfs commit && flashfs enable
Samba must not run as daemon. You have to disable it in the webinterface and accept the restart now.
and if you installed samba with IPKG you have to delete the startup file:
rm /opt/etc/init.d/S80samba
B) Unload unnecessary kernel modules
Attention: You should know which modules you need, before unloading them in post-boot.
List all running modules:
lsmod
It is looking like this:
[admin@blechbuechse root]$ lsmod
Module Size Used by
nfsd 93016 1
lockd 64236 1 [nfsd]
sunrpc 83480 1 [nfsd lockd]
usb-storage 62184 0 (unused)
sd_mod 13292 0 (unused)
scsi_mod 70216 1 [usb-storage sd_mod]
printer 12676 0 (unused)
usb-ohci 21940 0 (unused)
usbcore 77264 1 [usb-storage usb-ohci]
ipt_NETMAP 992 0 (unused)
ip_nat_starcraft 2224 0 (unused)
wl 423856 0 (unused)
et 34912 0 (unused)
ide-disk 13524 3
ide-probe-mod 11468 0
ide-mod 109608 3 [ide-disk ide-probe-mod]
You have to know which modules are unnecessary. 'Unused' is (sometimes) a good advice.
This is how you unload a module:
rmmod MODULNAME
Unloading the module 'et'is not a good idea because network will not work anymore. (Happend to me at this moment :))
Try this modules:
printer - printer support
usb-storage - USB mass storage
usb-ohci - USB host
usbcore - USB main component
wl - WLAN
It would be nice to have a complete list of all modules here. contact me if you can provide information.
Unload a module and check if all the services are still working.
If there is something wrong: Do a reboot!
After knowing the possible modules you can edit the post-boot and paste the unload commands.
18. Firmwareupdate
If oleg releases a new firmware you should update:
1) In webinterface 'System Setup' -> 'Setting Management' click "HERE", to save your settings.
2) In webinterface 'System Setup' -> 'Flashfs Management' click "HERE", to seve the flash file system.
3) Download and extract the new firmware. You need the .trx file.
Important: Wait for the reboot after every following step.
4) In webinterface 'System Setup' -> 'Firmware Upgrade' select the .trx file and click 'Upload'.
5) In webinterface 'System Setup' -> 'Setting Management' select your saved settings and click 'Upload'.
6) In webinterface 'System Setup' -> 'Flashfs Management' select your saved flashfs and click 'Upload'.
The update is finished and all services should be accessible.
There will be no data lost.
General
I try to keep this HowTo up to date.
Contact me if you have some improvement or you found a mistake.
There are several HowTos following this one.
Soundcards, webserver, mysql and so on.
FIND IT HERE: http://wl500g.info/showpost.php?p=160532&postcount=1
Known problems:
- a 'find' in / results in an error "./proc/7/fd: No such file or directory". Thats normal.
Thanks to:
Oleg (for the firmware)
marcnesium (for his premium How To)
Oleo (for transmission and good help)
My wife (for the patience) :D :D
Martin1802 (for finding a mistake in step 4a / 4b and supporting me with the profile)
hanseugen (for USB HDD und Cron-Tips)
And all others who helped me improving this howto.
Important links:
http://www.nslu2-linux.org/wiki/Optware/Transmission (Step-by-Step Howto for transmission)
http://wl500g.info/showthread.php?t=6823 (Controlling torrent downloads thru webpage)
http://wl500g.info/showthread.php?t=5909 (Premium HowTo)
http://www.macsat.com/macsat/content/category/3/13/29/ (MacSat Tutorials)
http://wl500g.info/showthread.php?t=8010 (How to connect to dbox2)
http://www.sprayfly.com/wiki/Sprayfly (Sprayfly WL-HDD Wiki)
http://wl500g.info/showpost.php?p=25037&postcount=1 (summary of Olegs firmware versions)
http://wl500g.info/showthread.php?t=6826 (Autocopy funktion for the photographer of you)
http://wl500g.info/showthread.php?t=13785 (Information on boot files and fstab in firmwares -9 and newer)
For those of you who want to be up to date with the development:
http://trac.nslu2-linux.org/optware/timeline Shows all changes.
Happy working with your "new" Asus.
May the force be with you.
wengi
super101
24-08-2007, 17:26
Thanks so much, it spent me more than a week now, I couldn't finish everything without your great tutorial. Great tutorial!
Happy to hear it was helpfull for you.
wengi
Awesome! Good work guys.
One question, there is possibility to just provide us with a config;file which has already everything integrated? :D
Hi,
1) I am not the guy to build firmware. So i am not your man.
2) There will never be a firmware with "everything integrated" because you never know who need which comonents and some components will never work together.
3) (And the important one) If anybody over here will provide a "all-in-one firmware" you would install it and have no idea how to use it. So the questions would start again. And there would be howtos for using the things. In my eyes its better you learn by modifying your own firmware.
Learning by doing!
wengi
From PM:
hi,wengi
got a problem
putty connect to WL-HDD
network error:connection refused.
how to :eek:
thanks.
More input! From LAN or internet?
Firewall? What are you doing EXACTLY?
wengi
From LAN ,no Firewall
AT 4b. Startup-scripts
APPEND the following line:
Quote:
echo "nameserver IP.OF.DNS.SERVER" > /etc/resolv.conf
when save and reboot then putty connection refused:)
You only need this line if your Asus is NOT configured as Router to connect to the internet. If you are NOT using it as router try to use DHCP (If you have a DHCP Server in your LAN) for the first step.
You can ping your Asus and connect to the Webinterface?
wengi
Yes, I can ping,telnet and connect to the Asus Webinterface.
also can set IP Address and Gateway...
my Asus is as a client in the network.
the point is when i add this line:
echo "nameserver IP.OF.DNS.SERVER" > /etc/resolv.conf
save and reboot
then use putty program SSH connect to Asus
PuTTY Fatal Error
network error:connection refused
:rolleyes:
Just to be sure: You replaced the "IP.OF.DNS.SERVER" with the IP adress of your DNS server?
This line for _my_ network looks like this:
echo "nameserver 192.168.201.1" > /etc/resolv.conf
wengi
realfolkblues
13-09-2007, 11:54
hi when i do
mkdir /tmp/harddisk/torrent
i get
cannot create directory `/tmp/harddisk/torrent': Read-only file system
any help?
Your hdd is not mounted to /tmp/harddisk!
Do a 'mount' to see what is mountet or a 'df -h'.
Recheck partitioning, formating. Try to mount manualy.
wengi
realfolkblues
13-09-2007, 17:43
i found that it was mounted at
/tmp/harddisk/part1/
so i just ajusted for the tutorial.
BTW great tut A+
EDIT:
Ummm this might sound totaly noob, but do i need to forward a bittorrent port for transmission if it's on the router?
Have a look at the transmission.conf: You can use upnp if your router supports it and you want to.
Otherwise you have to do a portmapping on the router.
wengi
thanx for great manual!
I still can't create folders "torrent". Whenever I try I've got "cannot create ... read-only file system"
after mount I've got:
/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)
/dev/discs/disc0/part1 on /tmp/harddisk type vfat (ro,noatime)
please tell me what's wrong - I'm linux rookie (realy fresh one)
Best Regards and thanx in advance
Piotr
thanx for great manual!
I still can't create folders "torrent". Whenever I try I've got "cannot create ... read-only file system"
after mount I've got:
/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)
/dev/discs/disc0/part1 on /tmp/harddisk type vfat (ro,noatime)
please tell me what's wrong - I'm linux rookie (realy fresh one)
Best Regards and thanx in advance
Piotr
I've been googling and tring to mount drive manually ([admin@(none) root]$ /dev/discs/disc0/part3 mount /tmp/harddisk), and in return I'm reciving :
-sh: /dev/discs/disc0/part3: Permission denied
realfolkblues
15-09-2007, 07:19
I've been googling and tring to mount drive manually ([admin@(none) root]$ /dev/discs/disc0/part3 mount /tmp/harddisk), and in return I'm reciving :
-sh: /dev/discs/disc0/part3: Permission denied
what output do you get from "df"?
/dev/discs/disc0/part3 on /tmp/harddisk type ext3 (rw)
/dev/discs/disc0/part1 on /tmp/harddisk type vfat (ro,noatime)
1) Prob: Both partitions are mounted at the same point. Change this.
2) the ro for part1 means readonly! change this to rw!
wengi
My part3 is not mounting automaticaly. Maybe there is something wrong with vi /usr/local/sbin/post-boot, and waiting for part2?
Best Regards
piotr
Try to unmount part3, and remount part1 as rw.
After you confirmed that this is working you can think about making it permanent.
wengi
WhiteAss
24-09-2007, 22:41
Thanks voor the great Tutorial.
I still have a problem with the samba server.
I can configure it with the webinterface, however the server dosn't work.
I tryed to go directly to the IP adres and via windows network.
When I look in de webinterfase at status I see:
smbd: not running
nmbd: not running
when I try to activate them (nmbd isn't really a must I think) they still doesn't work. Anyone a solution for this problem?
Do you try to use samba as daemon or with xinetd?
daemon:
try to run /opt/etc/init.d/S80samba.
post the logfile if nmbd or smbd are not running
xinetd:
make sure xinetd is running or run /opt/etc/init.d/S10xinetd
Samba will only work if (smbd AND nmbd) OR xinetd are running (check with ps axf)
wengi
WhiteAss
25-09-2007, 13:04
I'm not sure. I folowed your tutorial. 1th installed xinetd then samba2
ipkg install xinetd
ipkg install samba2
I will look at it when I'm at home.
ps. not mentioned before, but I think it's already clear. I'm a linux newbie.
WhiteAss
25-09-2007, 17:57
I don't know witch is running (daemon or with xinetd)
I tried both
/opt/etc/init.d/S80samba
/opt/etc/init.d/S10xinetd
to run. this doesn't make a diferent.
Where do I find the log?
what is the best way? xinetd or smbd AND nmbd
can I work with the webinterface in both situations?
Forget xinetd. You first have to run it as daemon.
You are running samba as daemon as long as you did NOT follow chapter 15.
Do the following:
1. run /opt/etc/init.d/S80samba and post result
2. post output of "ps axf"
3. post the latest content of the log: /opt/var/log/messages
wengi
EDIT: Did you follow the whole tut or only parts? This is important to know.
WhiteAss
26-09-2007, 15:51
I didn't follow the whole tut.
I didn't format the hdd in the same way, but I've made partitions:
swap (ca 500mb)
programs (/opt, ca 500mb, ext3)
data (tmp/harddisk/part1,ext3)
data (tmp/harddisk/part2, ntfs, some data that I want on ntfs)
I use the startup script (4b) with some chances in the mounting part
didn't do:
4a. partition and format HDD
7. Tools (optional)
8. CRON
9. TRANSMISSION (want to use samba 1th maybe later)
9b. Change Syslog settings
Didn't go further then this jet.
edit:
1. run /opt/etc/init.d/S80samba and post result
[admin@WL500gp root]$ /opt/etc/init.d/S80samba
Starting smbd:
Starting nmbd:
[admin@WL500gp root]$
2. post output of "ps axf"
[admin@WL500gp root]$ ps axf
BusyBox v1.1.3 (2007.01.01-14:37+0000) multi-call binary
Usage: ps
[admin@WL500gp root]$
3. post the latest content of the log: /opt/var/log/messages
I don't have a log "messages" at that location. I do have a dir named "samba" and in this dir a file log.smbd
latest content of this log is:
[2007/09/24 22:09:14, 0] source/smbd/server.c:main(835)
standard input is not a socket, assuming -D option
[2007/09/26 00:19:00, 0] source/smbd/server.c:main(835)
standard input is not a socket, assuming -D option
[2007/09/26 00:19:13, 0] source/smbd/server.c:main(835)
edit2
maybe also helpful:
found another logfile /opt/var/samba/nmbd
last part is
[2007/09/26 00:29:26, 0] source/nmbd/nmbd.c:main(795)
Netbios nameserver version 2.2.12 started.
Copyright Andrew Tridgell and the Samba Team 1994-2002
[2007/09/26 00:29:30, 0] source/nmbd/nmbd_responserecordsdb.c:find_response_reco
rd(235)
find_response_record: response packet id 6592 received with no matching record
.
[2007/09/26 18:07:26, 0] source/nmbd/nmbd.c:main(795)
Netbios nameserver version 2.2.12 started.
Copyright Andrew Tridgell and the Samba Team 1994-2002
[2007/09/26 18:07:30, 0] source/nmbd/nmbd_responserecordsdb.c:find_response_reco
rd(235)
find_response_record: response packet id 4588 received with no matching record
.
and this log:
/opt/var/samba/log.smbd
last part:
[2007/09/26 00:31:07, 0] source/smbd/server.c:main(791)
smbd version 2.2.12 started.
Copyright Andrew Tridgell and the Samba Team 1992-2002
[2007/09/26 18:07:26, 0] source/smbd/server.c:main(791)
smbd version 2.2.12 started.
Copyright Andrew Tridgell and the Samba Team 1992-2002
Hi,
"ps axf" will not work. Post result of a simple "ps".
"ps" will show you the running processes. There should be s- and nmbd.
Also make sure that samba in the original webinterface is DISabled.
Do the following:
- Disable Samba in Webinterface (if it isn't already)
- reboot router
- post result of "ps"
wengi
WhiteAss, you should read my tutorial for a working Samba3.
However... to see the processes, type:
ps (if you don't have 7. Tools (optional))
Or:
ps aux
ps -ef
if you installed 7. Tools (optional).
WhiteAss
27-09-2007, 18:37
I'm trying to install samba on the way explained by arise for the moment.
will post my questions over there.
edit:
Came back on this.
after folowing the tut of arise my router didn't work so good anymore.
Will follow this tut again from the begin (exept for the fdisk/fromat part)
WhiteAss
01-10-2007, 18:36
I began from scratch again
I can conf the standard samba which is there wit the oleg firmware.
149 admin 892 S /usr/sbin/smbd -D
151 admin 964 S /usr/sbin/nmbd -D
This is v1.x (don't know the exact version)
I want to use the web interface (swat) so I'v to install samba2.
When I install samba 2 (the one in this tut) I can use the web interface but samba doesn't work then (even without the web interface an with the same conf as samba 1)
smbd and smbd just won't run and I can't find out what is wrong.
So the fun starts again:
try to start manually and give us the logs....
i need input ;)
wengi
PS: I am on vacation from thursday on. We need to solve this quickly or anyone else has to help you.
I am using SAMBA 2 but not working good on chinese character file name (both samba2 and vsftp). I read the article in here saying need Samba 3
http://www.nslu2-linux.org/wiki/Optware/Samba
But some artical saying need a codepage.....
I search this for long but still can't find the exit.... Any good people can help please : <
9. TRANSMISSION (The torrent Client)
Transmission works really strange :(
when i open http://192.168.1.1:8080/cgi-bin/transmission.cgi i get
syslog: /opt/var/log/messages unavailable for transfer stats!
although I did everything just like in howto
when i click watchdog i get
/opt/sbin/transmission_watchdog: kill: 306: (524) - Operation not permitted grep: /tmp/harddisk/torrent/work/my.torrent/.status: No such file or directory
when i select torrent in list and click push i get
transmission.cgi: kill: 9: (524) - Operation not permitted
Any ideas?
Update 1
Right after restart transmission_watchdog doesn't appear.
If it's started manually i get a lot of instatnces
183 admin 468 S upnp -D -L br0 -W vlan1
214 admin 1696 S transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
217 admin 1700 S transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
218 admin 1700 S transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
219 admin 1700 S transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
220 admin 1700 R transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
222 admin 412 R ps
Does it matter?
Hi,
transmission is not started directly after restart. It normaly depends on the cron entry. E.g. if the watchdog is started hourly, transmission will be started the next full hour after thr reboot.
If you want to start it directly after the reboot: Add transmission_watchdog to your post-boot.
There are always multiple instances of transmission running.
This is normal.
For the errors: try another torrent. Maybe the file was damaged. How do you copy the torrents? wget in ssh / ftp / samba? I normaly use wget in ssh session.
wengi
PS: please edit your post and delete the torrent name or use a legal torrent.
Hi,
transmission is not started directly after restart. It normaly depends on the cron entry. E.g. if the watchdog is started hourly, transmission will be started the next full hour after thr reboot.
If you want to start it directly after the reboot: Add transmission_watchdog to your post-boot.
There are always multiple instances of transmission running.
This is normal.
For the errors: try another torrent. Maybe the file was damaged. How do you copy the torrents? wget in ssh / ftp / samba? I normaly use wget in ssh session.
wengi
PS: please edit your post and delete the torrent name or use a legal torrent.
don't know what was the problem. I just did everything by your guide from the start and it worked - first time I combined yours and olegI's.
And I was a dumb at linux - now situation improved.
Thanks for your great manual. What about putting it into wiki?
Good to know its working now :D
wengi
Good to know its working now :D
wengi
may you can help me with this? http://wl500g.info/showthread.php?p=67114#post67114
Hi Aramaki,
i already read your post but unfortunately am not able to help you.
wengi
Hi Aramaki,
i already read your post but unfortunately am not able to help you.
wengi
Anyway thx :)
So, I've created the pair of keys for automatic login.
Then I run
vi /usr/local/root/.ssh/authorized_keys and right click of my mouse in order to paste text in the putty window.
Then I pressed exactly the next keys:
[Esc]
:wq!
[Enter]
... and I tried to login and didn't worked as expected.
Found out later in Midnight Commander viewer that the first later from "ssh-rsa ..." was missing and I had only "sh-rsa ...".
I've added the missing "s" and it worked like a charm. :D
Don't know if it's my problem (I'm a stupid user sometimes :D) or is a bug or something. Just in case anyone gets in the same problem as me... :D
Jeroen van Omme
30-10-2007, 09:44
Arise,
I had a similar problem. It seems that copy-pasting from a webpage to Putty doesn't always work well. Some of my post-boot code was missing when I pasted it to putty from this tutorial. Only found out after a few reboots, of course :(
Arise,
I had a similar problem. It seems that copy-pasting from a webpage to Putty doesn't always work well. Some of my post-boot code was missing when I pasted it to putty from this tutorial. Only found out after a few reboots, of course :(
Missing parts in pasted content is mostly a result of the following:
you open vi and _forget_ to press "i" to change to insert mode.
When you paste the content is not pasted until the first i in the content appears.
example:
"this is the content" pasted in vi WITHOUT being in insert mode results in the following: "s is the content"
wengi
Wengi, thank you for your great tutorial. I've decided that it is the most detailed and started using it for connecting my usb hdd with 500gp.
Unfortunately, a have a problem after this steps:
# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
#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
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
mount /dev/discs/disc0/part3 /tmp/harddisk
# Activate swap
swapon /dev/discs/disc0/part1
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
I wrote it in VI editor after pressing 'i' and i saved it with :wq command.
I use 500gp like a router, so after those steps I make a command to reboot:
flashfs save && flashfs commit && flashfs enable && reboot
And then Putty says that "Fatal error (connection lost)"
I try to connect using SSH again, but also Fatal error appears (writing "network connection refused")
And i only can connect to 500gp using telnet or web.:( And when i run telnet, swap is not activated and driver is not mounted (so, startup script don't work i think) although all steps before i did according to your tutorial.
After that, i've refreshed the firmware and did everything again, but the result was the same.:confused:
Help me solve this problem please...
P.S. excuse me for my english: i've haven't any practice for a long time...
So, i've solve the problem myself: there were some mistakes in my post-boot file.
But i still have one question: how can i establish connection to my router from any place with internet. I have a real IP and using Putty thought SSH, it can't connect to router. May be i should open any ports?
Hi Hreks,
"Fatal error (connection lost)" is normal when you reboot the router.
Normaly the network connection is also droped.
Due to the Asus also is running DHCP (i suggest) all should be ok after you request a new ip (in windows: ipconfig /renew).
But good to see that you managed it yourself :D
SSH is using port 22. You have to open this port in your firewall and/or forward this port to the local ip adress of the asus.
you can also use a different port (e.g. 222) and redirect ist to 22 on local ip.
This prevents ssh scanning, which is often done in the last month.
have fun with your asus
wengi
1) Hi, Wengi, thank you for your reply, but can you give me more detailed answer?
What firewall do you mean, software or in the router?
What does it mean "forward this port to the local ip adress of the asus."
How can i use different port?
And what should i do on the computer, from which i want to connect my router(open any ports?)
Big thanks
2)WoW! I'm very happy) I've configured everything, writen in Wengi's manual. Now i have Samba, and my torrents are downloading! I can't belive:)
Wengi, really your tutorial is the best for new users of 500gp:) only one step became a problem: while activating RTC, it was error: can't create folder, permission denided.
3)And also one question: can i create my media library in \tmp\harddisk or in another folder? actually, i don't understand folders in samba according to the partitions in router, explane me please.
4) One more question: i want to make a web site in the router, considering a real IP, so i don't understand if any steps of your tutorial connected with this topic?
regards, Hreks
Jeroen van Omme
01-11-2007, 08:39
Missing parts in pasted content is mostly a result of the following:
you open vi and _forget_ to press "i" to change to insert mode.
When you paste the content is not pasted until the first i in the content appears.
wengi
Of course! Why didn't I think of that? :o
Hi Hreks,
i dont have that much time atm.
RTC is ONLY for WL-HDD. Others do not have a RTC.
i will come back in a few days for the other questions.
wengi
10. SAMBA2
The original version in olegs firmware has a problem with Windows Vista.
Because of this, you install the package 'samba2'. This should work with Vista (Due to a missing Vista i can not test it).
Samba has to be disabled in the Asus webinterface! (USb Application -> Samba -> Enable Samba Demo mode: NO)
ipkg install xinetd
ipkg install samba2
Edit the conf of xinetd:
vi /opt/etc/xinetd.d/swat
You should cutomize the IP settings as you need them and exchange "user = root" with admin -> "user = admin".
Save... reboot... You know... i do this too often, but to be shure...
flashfs save && flashfs commit && flashfs enable && reboot
Samba and xinetd are running after the reboot.
But samba still needs to be configured. This is done with a webinterface:
http://IP.ADRESS.OF.ASUS:901
I followed all the steps you outlined, but samba isn't starting on it's own after reboot. I can start it manually by running /opt/etc/init.d/S80samba and everything works fine then.
Am I missing something?
Hi,
/opt/etc/init.d/S80samba is normaly started by /opt/etc/init.d/rc.unslung.
check if rc.unslung is executable and if it is called from your post-boot.
Are the other services (/opt/etc/init.d/S*) running after restart?
wengi
Hi,
/opt/etc/init.d/S80samba is normaly started by /opt/etc/init.d/rc.unslung.
check if rc.unslung is executable and if it is called from your post-boot.
Are the other services (/opt/etc/init.d/S*) running after restart?
wengi
rc.unslung is executable, and is being called from the post boot. I see that the one script (S80busybox_httpd) is running when I reboot since I can go to the transmission web page -
http://192.168.1.1:8008/cgi-bin/transmission.cgi?ACTION=List
so it make no sense why it's not running. I ran dmesg and I don't see any errors in it either.
Hi,
Is /opt/etc/init.d/S80samba executable?
What happens if you run /opt/etc/init.d/S80samba manually?
Pls. post last lines of your syslog (/opt/var/log/messages).
wengi
This is strange. I rebooted it again after I made another minor change, and now it's working. I hate it when things like that happen.
Thanks for the help though! This howto has been a great help.
Melicous
05-11-2007, 05:21
First of all thx a bunch for the gr8 tut, finally I can get to my smb share without going through sftp and tranmission works so much better than e-ctorrent.
I am a bit of a linux noob though and it might be handy for the rest of you to know that if you can't get a ipkg package (mc), or some dependensies (font libraries for the bt cgi :P), or even if nano locks up (it happend to me faulty ncurses was to blame) just go too http://ipkgfind.nslu2-linux.org/.
Find the right package (always select the oleg version if possible) then copy the download link and do this in the terminal:
ipkg install PASTE_THE_DOWNLOAD_LINK_HERE
Or alternatively you can change your unslung package directory to the oleg version
nano /opt/etc/ipkg.conf
then
src unslung http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable
dest root /
Don't forget to run ipkg update / upgrade and be amazed how outdated your system is :P
But I do still have some question marks I hope you can help me with.
First I mosty use my smb share on the network for storage of my music so that every pc and mac all have the same songs. I haven't tried the optimisation bit yet and would like to know if I do run samba under xinetd will it be slower or something.
Furthermore I would like to get a ftp or sftp running again and was wondering if this can be run under xinetd aswell
Also if you don't have a webcam attached you can put this in the post-boot
rmmod videodev
Lasty why isn't this a sticky yet, this goes along gr8 with the macsat tut
This is strange. I rebooted it again after I made another minor change, and now it's working. I hate it when things like that happen.
Thanks for the help though! This howto has been a great help.
Would be nice to know what was wrong/changed.
1) I haven't tried the optimisation bit yet and would like to know if I do run samba under xinetd will it be slower or something.
2) Furthermore I would like to get a ftp or sftp running again and was wondering if this can be run under xinetd aswell
3) Also if you don't have a webcam attached you can put this in the post-boot
rmmod videodev
4) Lasty why isn't this a sticky yet, this goes along gr8 with the macsat tut
Hi,
1) it will not be slower. *mbd will only start when you access the share. Thats all.
2) Yes, you can. You only have to find the right config for xinetd listening on port 21.
3) I never had such a module in my firm...
4) Good question :D
wengi
transmission downloads files OK
at least I can see them with ls command
drift_USA_JAP.torrent.seeding
ÐÑиÑ
Ñ Ð¯Ð¿Ð¾Ð½Ð¸Ñ Ð¿ÑоÑив Ð
but samba shows only .torrent files and no .avi
Right now samba works with russian symbols OK - i can write them from XP client and see them by SMB and on Asus with ls command in appropriate way
my smb.conf
# Samba config file created using SWAT
# from 192.168.1.2 (192.168.1.2)
# Date: 2007/10/27 16:03:19
# Global parameters
[global]
client code page = 866
workgroup = BELL
netbios name = ASUS
server string =
security = SHARE
log file = /opt/var/log/samba/log.%m
max log size = 50
load printers = No
character set = 1251
dns proxy = No
guest account = admin
hosts allow = 192.168.1.
[printers]
comment = All Printers
path = /opt/var/spool/samba
printable = Yes
browseable = No
[www]
comment = HTTP server files
path = /opt/share/www
read only = No
guest ok = Yes
[torrent]
comment = torrent files
path = /tmp/harddisk/torrent
read only = No
guest ok = Yes
I don't remember whether I did the oleg's instructions but i guess i did
nvram set lan_stp=0
nvram set usb_vfat_options=codepage=866,iocharset=cp1251
nvram set usb_ntfs_options=iocharset=cp1251
nvram set usb_smbcpage_x=866
nvram set usb_smbcset_x=1251
nvram set regulation_domain=0x00ALL
nvram commit
Can i switch everything to UTF and will it work?
Sorry, but i have no idea. You will have to try.
wengi
realfolkblues
11-11-2007, 06:31
Hi i've bean running with your tut for awhile and i noticed that file transfer rate is much slower with the custom firmeare over samba. VS the ogiginal firmware that asus supplys. But if i use the original firmware i cant get it to work with vista.
Any idea how to speed up access time? Its really slow.
The only way is to stop all other things.
Stopping transmission is most important before copying files over samba.
And running samba with xinetd if you want to use transmission is recommended.
It is not that the orig firmware is faster, it is that you normaly run more services when oleg is installed.
wengi
First of all thank you very much Wengi for this great tutorial, it should be sticked and unified with the one by marcnesium.
Today I upgraded my Wl500gP firmware with the latest from Oleg, so I decided to take a look to your toturial to change something on my filesystem...
Some note after installation:
Installed Samba2, due to problems browsing my USB disk from WinVista.
Now it's ok. Installing via ipkg Samba2 on top of original Oleg's firmware, in /opt/etc/init.d I 've found 2 samba start script:
S80samba
#!/bin/sh
if [ -n "`pidof smbd`" ] ; then
echo "Stopping smbd:"
killall smbd
fi
if [ -n "`pidof nmbd`" ] ; then
echo "Stopping nmbd:"
killall nmbd
fi
#sleep 2
echo "Starting smbd:"
/opt/sbin/smbd -D;
echo "Starting nmbd:"
/opt/sbin/nmbd -D;
and 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
I don't know if this is a my mistake, but moving samba service from initd to xinitd, I had to remove both file.
One question about samba2 on xinitd: at first startup both samba services are not loaded, when I try to access my shared disk, i can see nmbd and smbd running. Are these precesses stopped after some time of inactivity ?
Another question about xinitd: I'd like to run my MediaServer (WizD) using xinitd too, to save memory space. Is it possible ?
A note about SSH autologin. This is how my login appear now:
Using username "root".
Authenticating with public key "MyAsus"
Passphrase for key "MyAsus":
As you can see is asking me my Passphrase instead of a complete autologin. Is this normal ?
About modules: in my WL even if not listed by lsmod, videodev is removable to gain some more Kb in memory.
More questions on the way... let me test deeply this new fw/sw combination... :D
Max
Hi,
i have not seen the S97Samba script until now. Maybe this is new with the latest oleg firmware. I could not test this until now. But running samba with xinetd needs both files to be deleted. Maybe there will have to be done some changes to the xinetd files if the conf entries of S97 are required. But i dont think so.
The processes _should_ be stopped after a timeout. In fact i sometimes see nmbd keep on running while smbd is stopped as expected. Don't know why.
WizD should also work with xinetd. But i have no idea which ports are used. This is nothing special to the oleg firmware. Simply search the inet for "wizd AND xinetd". (And write a HowTo if you managed it to work :-))
Did you define a passphrase when you saved the private key? If yes: This is the reason.
I never saw the module videodev. So thanks for the hint. It works:
[admin@blechbuechse init.d]$ rmmod videodev
rmmod: videodev: Success
Strange..
wengi
The processes _should_ be stopped after a timeout. In fact i sometimes see nmbd keep on running while smbd is stopped as expected. Don't know why.
Something strange happens running Samba2 with xinetd.
I also use xinetd for vsftp, and everytime i close an ftp session, vsftp disappear from running processes immediately, this doesn't happens with smbd and nmbd, even if I closed my last SMB connection about one hr ago... :(
About WizD, I've take a look to the startup file... too complicated for my knowledge :confused:
Max
Hi,
xinetd works for me with smbd. I never looked at the time when smbd is stopped. But it is possible that it lasts more than one hour.... Windows allways keeps smb connections open...
apostrophe
17-11-2007, 00:36
Does this also work on wl500gx using Oleg 1.9.2.7-7g?
I've followed steps 1 to 10 of wengi's tutorial (with the exception of 9 Transmission) but cannot get Samba2 to work. Neither smbd or nmbd can (ever) be seen to be running.
What steps should I take to solve this? I have a USB drive and a USB Hard-drive attached and both mount ok. Everything else (cron, syslog etc) seems fine.
The embedded Samba will work but I'd like to use SWAT if possible. I've looked through the posts in this thread and others and cannot see what I'm missing.
Thanks :)
this might help:
log.nmbd shows....
[2007/11/16 23:43:34, 0] source/nmbd/nmbd_responserecordsdb.c:find_response_record(235)
find_response_record: response packet id 14764 received with no matching record.
and log.smbd...
[2007/11/16 23:43:30, 0] source/smbd/server.c:main(791)
smbd version 2.2.12 started.
Copyright Andrew Tridgell and the Samba Team 1992-2002
is this a clue?
Hi,
My HowTo is working with all WL-xxx if there is a oleg firmware for it. Some little things differ, but this is mentioned in the text.
The newest firmware (-8) has some changes but this will be corrected the next days. (RTC ...)
Samba seems to be running. Could you post the result of "ps" or "ps axf".
Thanx
apostrophe
18-11-2007, 19:20
Hi
I stopped the firmware smbd and nmbd with killall and then ran the S80samba script. If I run ps axf immediately you can see nmbd running.
ASUS:/tmp/local/root$ /opt/etc/init.d/S80samba
Starting smbd:
Starting nmbd:
ASUS:/tmp/local/root$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:02 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 6:35 [ksoftirqd_CPU0]
4 ? S 0:12 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
63 ? S 0:02 telnetd
1935 pts/0 Ss 0:00 \_ -sh
1954 pts/0 R+ 0:00 \_ ps axf
68 ? S 0:10 httpd vlan1
74 ? S 0:32 dnsmasq
76 ? S 0:00 klogd
81 ? S 0:00 [khubd]
89 ? Ss 0:00 lpd
91 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
95 ? Ss 0:00 waveservermain
97 ? Ss 0:00 rcamdmain
101 ? Ss 0:00 infosvr br0
102 ? Ss 0:11 watchdog
106 ? Ss 0:00 \_ ntp
127 ? S 0:00 udhcpc -i vlan1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
129 ? S 0:02 [usb-storage-0]
130 ? S 0:00 [scsi_eh_0]
133 ? S 0:00 [kjournald]
136 ? S 4:31 [usb-storage-1]
137 ? S 0:00 [scsi_eh_1]
151 ? S 0:08 /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
158 ? Ss 0:00 /opt/sbin/cron
162 ? S 0:03 [kjournald]
1826 ? S 0:12 upnp -D -L br0 -W vlan1
1953 ? Ss 0:00 /opt/sbin/nmbd -D
I waited a few more seconds and ran again and it has stopped.
ASUS:/tmp/local/root$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:02 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 6:35 [ksoftirqd_CPU0]
4 ? S 0:12 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
63 ? R 0:02 telnetd
1935 pts/0 Ss 0:00 \_ -sh
1955 pts/0 R+ 0:00 \_ ps axf
68 ? S 0:10 httpd vlan1
74 ? S 0:32 dnsmasq
76 ? S 0:00 klogd
81 ? S 0:00 [khubd]
89 ? Ss 0:00 lpd
91 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
95 ? Ss 0:00 waveservermain
97 ? Ss 0:00 rcamdmain
101 ? Ss 0:00 infosvr br0
102 ? Ss 0:11 watchdog
106 ? Ss 0:00 \_ ntp
127 ? S 0:00 udhcpc -i vlan1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
129 ? S 0:02 [usb-storage-0]
130 ? S 0:00 [scsi_eh_0]
133 ? S 0:00 [kjournald]
136 ? S 4:31 [usb-storage-1]
137 ? S 0:00 [scsi_eh_1]
151 ? S 0:08 /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
158 ? Ss 0:00 /opt/sbin/cron
162 ? S 0:03 [kjournald]
1826 ? S 0:12 upnp -D -L br0 -W vlan1
Thnx
I stopped the firmware smbd and nmbd with killall and then ran the S80samba script.
Hi,
i am not sure if htis will work. Please disable the orig. samba in the webinterface. Then uninstall and reinstall samba2 pck. Just to be sure that nothing from the firmware is running. S80samba should be started automaticaly.
wengi
apostrophe
20-11-2007, 01:51
wengi
Just tried that. Still nothing. log.nmbd and log.smbd show services started but that's it. No sign that SAMBA is actually running e.g. nothing to see in 'ps axf' or 'top' and ASUS not showing in MSHOME. Any further thought? Should I just start again?
Thanks. :)
Your xinetd is not running. Did you install it?
No xinetd -> no swat -> no config -> no samba.
wengi
apostrophe
21-11-2007, 00:38
wengi
I've reinstalled everything and xinetd is now running and using SWAT 'Status' page I can see smbd is 'running' and nmbd 'not running'.
log.nmbd shows
[2007/11/20 23:08:32, 0] source/nmbd/nmbd.c:main(795)
Netbios nameserver version 2.2.12 started.
Copyright Andrew Tridgell and the Samba Team 1994-2002
[2007/11/20 23:08:32, 0] source/lib/charset.c:load_client_codepage(213)
load_client_codepage: filename /opt/lib/codepages/codepage.850 does not exist.
[2007/11/20 23:08:32, 0] source/lib/util_unistr.c:load_unicode_map(617)
load_unicode_map: filename /opt/lib/codepages/unicode_map.850 does not exist.
[2007/11/20 23:08:32, 0] source/lib/util_unistr.c:load_unicode_map(617)
load_unicode_map: filename /opt/lib/codepages/unicode_map.ISO8859-1 does not exist.
[2007/11/20 23:08:36, 0] source/nmbd/nmbd_responserecordsdb.c:find_response_record(235)
find_response_record: response packet id 30649 received with no matching record.
When I try to browse with XP explorer I see 'ASUS' under MSHOME but when I try to browse I get '\\ASUS is not accessible' message.
Thanks :)
Hi,
the files of the codepages are missing. Very strange!
Here is the listing of my codepages:
[admin@blechbuechse /]$ ls /opt/lib/codepages/
total 3708
drwxr-xr-x 2 admin root 4096 Feb 25 2007 .
drwxr-xr-x 18 admin root 8192 Nov 5 08:37 ..
-rw-r--r-- 1 admin root 588 Feb 23 2007 codepage.1125
-rw-r--r-- 1 admin root 140 Feb 23 2007 codepage.1251
-rw-r--r-- 1 admin root 196 Feb 23 2007 codepage.437
-rw-r--r-- 1 admin root 148 Feb 23 2007 codepage.737
-rw-r--r-- 1 admin root 388 Feb 23 2007 codepage.775
-rw-r--r-- 1 admin root 132 Feb 23 2007 codepage.850
-rw-r--r-- 1 admin root 172 Feb 23 2007 codepage.852
-rw-r--r-- 1 admin root 132 Feb 23 2007 codepage.857
-rw-r--r-- 1 admin root 460 Feb 23 2007 codepage.861
-rw-r--r-- 1 admin root 588 Feb 23 2007 codepage.866
-rw-r--r-- 1 admin root 8 Feb 23 2007 codepage.932
-rw-r--r-- 1 admin root 8 Feb 23 2007 codepage.936
-rw-r--r-- 1 admin root 8 Feb 23 2007 codepage.949
-rw-r--r-- 1 admin root 8 Feb 23 2007 codepage.950
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.1125
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.1251
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.437
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.737
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.775
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.850
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.852
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.857
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.861
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.866
-rw-r--r-- 1 admin root 262174 Feb 23 2007 unicode_map.932
-rw-r--r-- 1 admin root 262174 Feb 23 2007 unicode_map.936
-rw-r--r-- 1 admin root 262174 Feb 23 2007 unicode_map.949
-rw-r--r-- 1 admin root 262174 Feb 23 2007 unicode_map.950
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-1
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-13
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-15
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-2
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-5
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-7
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.ISO8859-9
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.KOI8-R
-rw-r--r-- 1 admin root 131614 Feb 23 2007 unicode_map.KOI8-U
Please recheck these files on your system.
Also post the result of
cat /opt/etc/ipkg.conf
wengi
zheka_ppp
21-11-2007, 14:57
My /opt/lib/codepages/ is emtpy too.
Where can I find all this codepage files ? I use samba3.
apostrophe
23-11-2007, 01:34
wengi
I do not know what I did different but I cleared everything and started again. Samba2 and everything else is working. I will move onto Transmission soon once the samba drive is fully configured. Thank you for your advice and patience.
:D
My /opt/lib/codepages/ is emtpy too.
Where can I find all this codepage files ? I use samba3.
I have no idea about smaba 3. Dont use it. But a reinstall should fix it _if_ these files are in the ipkg package.
wengi
EDIT:
You can download the ipkg package and extract it. Windows: e.g. use Winrar
Hi all,
i updated to the new Version of olegs firmware following chapter 16 of my howto.
One single problem:
My WL-HDD was not responding after step 4. So i pulled the plug after 30 mins and then it worked fine.
Following my Howto after that and all went fine.
You need to substitute the real time clock driver!
The HowTo is updated.
wengi
Trailblazer
27-12-2007, 10:14
wengi,
Thanks so much for your tutorial! An MS Geek can't do it without the help of you and marcesium.
And Oleg, thanks for the great firmware. It's why I bought this router! :D
alex.bumbacea
05-01-2008, 22:37
how can i get a report daily about loggin hours on ssh?
Simplest way is:
cat /tmp/syslog.log |grep dropbear
Hi,
only to correct it. The path to the log is different if you installed with my howto:
[admin@blechbuechse root]$ cat /opt/var/log/messages | grep -i dropbear
Jan 1 01:00:08 post-boot: starting dropbear:
Jan 1 01:00:08 dropbear[93]: Running in background
Jan 6 10:24:47 dropbear[3496]: password auth succeeded for 'admin' from ::ffff:192.168.1.21:1148
[admin@blechbuechse root]$
wengi
wengi, it's a good idea to put a symlink:
ln -s /opt/var/log/messages /tmp/syslog.log
Then you will be able to see log from the web-IF, and the above statements will be correct.
This is indeed a very good idea!!!
Didn't think about it until now.
Thanks :cool:
wengi
Hi all,
I made a little change in the syslog config.
There are two lines added to /opt/etc/init.d/S05syslogd:
# remove old syslog.log
rm /tmp/syslog.log
# add symlink so log is available at old location (e.g. for webinterface)
ln -s /opt/var/log/messages /tmp/syslog.log
/sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
Background:
syslog is now linked to /tmp/syslog.log.
In result the syslog is viewable in the webinterface again.
Howto is updated
Thanks to al37919 for this.
wengi
Hi Wengi,
Have just finished re-setting up my asus wlg500p with a USB WD Passport 250GB.
I wanted to replace the old USB harddisk (which worked for a year - no problems) with one that needed no external power supply.
Anyway, I was revisiting these forums and just wanted to thank you again for all your great posts - they are excellent!
Velcrow
Hi,
nice to hear that. Thank you ;)
wengi
Hi i was just wondering why i can't connect to ma usb hdd?? any clue?
on that hdd i have first partition ntfs, second after format swap and last one ext3
[admin@(none) root]$ dmesg |grep sda
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB)
Jan 1 00:00:04 kernel: ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
Jan 1 00:00:04 kernel: hub.c: USB hub found
Jan 1 00:00:04 kernel: hub.c: 4 ports detected
Jan 1 00:00:05 kernel: usb.c: registered new driver usblp
Jan 1 00:00:05 kernel: printer.c: v0.13: USB Printer Device Class driver
Jan 1 00:00:05 kernel: usb.c: registered new driver audio
Jan 1 00:00:05 kernel: audio.c: v1.0.0:USB Audio Class driver
Jan 1 00:00:05 kernel: hub.c: connect-debounce failed, port 2 disabled
Jan 1 00:00:05 kernel: SCSI subsystem driver Revision: 1.00
Jan 1 00:00:05 kernel: Initializing USB Mass Storage driver...
Jan 1 00:00:05 kernel: usb.c: registered new driver usb-storage
Jan 1 00:00:05 kernel: USB Mass Storage support registered.
Jan 1 00:00:05 kernel: hub.c: new USB device 01:03.2-2, assigned address 2
Jan 1 00:00:06 kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jan 1 00:00:06 kernel: Vendor: USB Model: Storage Rev: 1.04
Jan 1 00:00:06 kernel: Type: Direct-Access ANSI SCSI revision: 02
Jan 1 00:00:06 kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jan 1 00:00:06 kernel: SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB)
Jan 1 00:00:06 kernel: Partition check:
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 0
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 2
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 4
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 6
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 0
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 2
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 4
Jan 1 00:00:06 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Jan 1 00:00:06 kernel: SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
Jan 1 00:00:06 kernel: I/O error: dev 08:00, sector 6
Jan 1 00:00:06 kernel: unable to read partition table
Jan 1 00:00:06 kernel: usb.c: USB disconnect on device 01:03.2-2 address 2
Jan 1 00:00:06 portmap[102]: user rpc not found, reverting to user bin
Jan 1 00:00:06 statd[103]: Version 1.0.7 Starting
Jan 1 00:00:06 statd[103]: statd running as root. chown /var/lib/nfs/sm to choose different user
Jan 1 00:00:06 statd[103]: gethostbyname error for (none)
Jan 1 00:00:07 kernel: vlan1: Setting MAC address to 00 1d 60 46 90 37.
Jan 1 00:00:07 kernel: VLAN (vlan1): Underlying device (eth0) has same MAC, not checking promiscious mode.
Jan 1 00:00:07 udhcpc[112]: udhcpc (v0.9.9-pre) started
Jan 1 00:00:07 dnsmasq[75]: read /etc/hosts - 4 addresses
Jan 1 00:00:07 dnsmasq[75]: reading /tmp/resolv.conf
Jan 1 00:00:07 dhcp client: deconfig: lease is lost
Jan 1 00:00:07 udhcpc[112]: Lease of xxxxxx obtained, lease time 86484
Jan 1 00:00:07 dnsmasq[75]: read /etc/hosts - 4 addresses
Jan 1 00:00:07 dnsmasq[75]: reading /tmp/resolv.conf
Jan 1 00:00:07 dnsmasq[75]: using nameserver 212.76.33.102#53
Jan 1 00:00:07 dnsmasq[75]: using nameserver 212.76.33.104#53
Jan 1 00:00:08 dropbear[129]: Running in background
Jan 1 00:00:08 dhcp client: bound IP : xxxxxxxxxx from xxxxxxxxxxxxx
Jan 1 00:00:17 kernel: Device 08:00 not ready.
Jan 1 00:00:17 kernel: I/O error: dev 08:00, sector 2
Jan 1 00:00:17 kernel: EXT3-fs: unable to read superblock
Jan 1 00:00:17 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:17 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:17 kernel: Device 08:00 not ready.
Jan 1 00:00:17 kernel: I/O error: dev 08:00, sector 0
Jan 1 00:00:17 kernel: FAT: unable to read boot sector
Jan 1 00:00:17 kernel: FAT: freeing iocharset=cp950
Jan 1 00:00:17 kernel: Device 08:00 not ready.
Jan 1 00:00:17 kernel: I/O error: dev 08:00, sector 0
Jan 1 00:00:17 kernel: FAT: unable to read boot sector
Jan 1 00:00:17 kernel: Device 08:00 not ready.
Jan 1 00:00:17 kernel: I/O error: dev 08:00, sector 0
Jan 1 00:00:17 kernel: NTFS: Reading super block failed
Jan 11 17:55:29 ntp client: Synchronizing time with time.nist.gov ...
Jan 11 17:59:10 login[150]: root login on `pts/0'
Jan 11 18:00:11 kernel: hub.c: connect-debounce failed, port 2 disabled
Jan 11 18:01:21 kernel: hub.c: connect-debounce failed, port 2 disabled
Jan 11 18:01:45 kernel: hub.c: connect-debounce failed, port 2 disabled
Jan 11 18:02:09 kernel: hub.c: connect-debounce failed, port 2 disabled
Hi,
on that hdd i have first partition ntfs, second after format swap and last one ext3???
There are three partitions?
1 ntfs
2 swap
3 ext3
Does the drive work in a windows machine (the ntfs part)?
Can you be shure the drive has no bad sectors?
wengi
Arbadelli
15-01-2008, 20:19
My Compliments for this very helpfull Tutorial!!
But i have 2 strange things.
First i had a problem with Cron
The problem is: after a reboot, i have start cron myself.
i did many times, the CRON part, but everytime, after reboot, and pressing ps axf. He didn't show it:
PID TTY STAT TIME COMMAND
1 ? S 0:01 /sbin/init
2 ? S 0:00 [keventd]
3 ? RN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
63 ? S 0:00 telnetd
67 ? S 0:28 httpd
72 ? S 0:00 klogd
73 ? S 0:00 syslogd -m 0 -O /tmp/syslog.log -S -l 7
74 ? S 0:00 [khubd]
83 ? Ss 0:00 lpd
85 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
88 ? Ss 0:00 waveservermain
90 ? Ss 0:00 rcamdmain
92 ? Ss 0:00 infosvr br0
93 ? Ss 0:00 watchdog
94 ? Ss 0:00 \_ ntp
102 ? S 0:00 dropbear
123 ? Ss 0:00 \_ dropbear
124 pts/0 Ss 0:00 \_ -sh
127 pts/0 R+ 0:00 \_ ps axf
107 ? S 0:00 [usb-storage-0]
108 ? S 0:00 [scsi_eh_0]
114 ? S 0:00 [kjournald]
115 ? S 0:00 [kjournald]
after each reboot, i start it manual by typing cron
so i could go on with the tutorial.
But at Part 9. TRANSMISSION (The torrent Client)
i have a prolbem at the end. the problem is by typing:
192.168.1.150:8008/cgi-bin/transmission.cgi
i get the message:
Kan geen verbinding maken
Firefox kan geen verbinding maken met de server op 192.168.1.150:8008.
* Misschien is de website tijdelijk niet beschikbaar of overbelast. Probeer over enkele ogenblikken opnieuw.
* Controleer uw netwerkverbinding indien u geen enkele pagina kunt laden.
* Verzeker u ervan dat Firefox toegang heeft tot het web als uw
computer of netwerk beveiligd is door een firewall of proxyserver.
that's dutch for:
Cannot make connection
Firecox cannot connect the server on 192.168.1.150:8008
Can you help me with these 2 problems?
If your wive can bring up the patience again :)
I hope,
greetings Emiel
Hi,
???
There are three partitions?
1 ntfs
2 swap
3 ext3
Does the drive work in a windows machine (the ntfs part)?
Can you be shure the drive has no bad sectors?
wengi
yes Im sure. there are 3 partitions exactly. ntfs is working under win xp, there is no bad sectors on it.
@Arbadelli
First of all: It seems that i missed your post. Sorry for the late reply.
Your problem ist rc.unslung!! The script is not executed.
- cron is not working
- syslog is not logging to /opt/var...
- busybox httpd is not running with transmission webinterface.
Check your post-boot if rc.unslung is started.
Check the content of rc.unslung
Make sur rc.unslung is executable
@Syl
Jan 1 00:00:06 kernel: unable to read partition table
Jan 1 00:00:06 kernel: usb.c: USB disconnect on device 01:03.2-2 address 2
There is something wrong with your partition table.
I recommend deleting the partitions and recreate them directly on the asus.
wengi
Arbadelli
18-01-2008, 23:59
WENGI VIELEN DANK!!
Thanks for your answer!
No problem it was a day later, it gives me more time to think about it ;)
Now i have solved the problem down here ( How? use in the webinterface a password, if you leave it blank, then it doesn't work!)
Now, i have a little problem with 10. SAMBA2
i have done that one, and when i use ps axf everything is running well, but when i put in 192.168.1.150:901 ( in web ). He cannot make connection:
401 Bad Authorization
username or password incorrect
I think i have problems with logging in. or the IP or your following text:
You should cutomize the IP settings as you need them and exchange "user = root" with admin -> "user = admin".
This is my script:
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost 192.168.1.1/24
user = admin
server = /opt/sbin/swat
log_on_failure += USERID
disable = No
}
~
My homenetwork ( maybe interesting to know )
the modemcable goes to my Linksys WRT54G
i connected 2 pc's with this one, and one UTP cable is going to 1 LAN port of my Asus WL500gp. In another LAN port i plugged another UTP for one pc ( so, i can see if the router has got internet yes or no ) :)
the WRT54G ip is 192.168.1.1
the WL500GP ip is 192.168.1.150
My username to get with web or putty in is admin
( i changed the password, as you said in your tut)
so, how does my vi /opt/etc/xinetd.d/swat has to look like?
I tried many things, but i think not the good one.
thanks for your help offcourse :)
Arbadelli
20-01-2008, 03:20
Hello, everyone..
Here i am back again :)
i have got the next problem:
I've got 2 torrents in my Transmiossion.cgi, they are waiting now for about 1 hour, but the won't download. They are in the Active menu.
Progress: 0.00 %, 0 peers, dl from 0 (0.00 KB/s), ul to 0 (0.00 KB/s) Start: 01 Jan 01:01 End: 01 Jan 01:02 uploaded: 0.0 MB
How can i fix this problem, i think this is my last problem with Transmission, So i hope it's the last one, i am close to the end!
Thanks for helping and solving my last problem
EDIT:
i get the following information:
an 1 01:05:45 transmissiond[362]: Transmission daemon 1.01+ (4684) started - http://transmission.m0k.org/ at port 65534
Jan 1 01:05:45 transmission_watchdog: Transmission daemon restarted!
Jan 1 01:05:46 transmissiond[362]: Starting torrent /tmp/harddisk/torrent/work/Davilex Business Software.amp/Davilex Business Software.amp.torrent
Jan 1 01:05:46 transmissiond[362]: Starting torrent /tmp/harddisk/torrent/work/Trein/Trein.torrent
Jan 1 01:10:46 transmissiond[362]: Tracker: Error - Tracker could not be reached.
Jan 1 01:10:46 transmissiond[362]: Previous message repeated 3 times
and one extra question,
how can i put the right time in the router?
thanks for helping
Hi,
it is always a good idea to test transmission with a 100% working torrent file.
E.g. use OpenOffice as torrent: http://distribution.openoffice.org/p2p/index.html
If this does not work you will have to check if the port is opened and reachable.
For time adjustment: Use Webinterface or ntpclient in shell.
wengi
Arbadelli
22-01-2008, 20:11
EVERYTHING IS WORKING NOW!!!
Thanks a lot, i had one problem because i had 2 routers, and a modem.
I put the wrong default gateway in my Asus,
I told ( with that gateway ) he had to go the modem. but he had to go to the wrt54g router, because there was the port forwarding.
But anyway
Many thanks..
(shy) do you have also made a Tutorial for a webserver with php and mysql on my router??
So i can put here a online DVD Sofware on it ( http://vcddb.konni.com/
with this software i can make my own DVD Librarie :) See the link for information
Very thanks for helping
Hi,
no, i have no howto for php/mysql. But there are some postings in the forum about this.
Just to have it mentioned: An installation of apache / php / mysql will REALLY slow down you asus. And i mean slow!
But as i read, it can work.
Just give it a try.
wengi
Arbadelli
23-01-2008, 22:25
Hi,
But as i read, it can work.
Just give it a try.
wengi
Ok, Thanks for looking around!
But can i go with the different tutorials? or can i get problems with the Transmission tutorial?
I also looked at http://www.macsat.com/macsat/content/category/3/13/29/
and can i go on with this tut or can i get problems?
thanks for the answer again.
Greetings Arbadelli
Hi,
you can use any Tut you want.
Only one important thing: You allready have the "better ipkg" that is mentioned by macsat (http://www.macsat.com/macsat/content/view/73/29/).
You can directly start with " ipkg install mysql"
If you are going to change the username from "admin" to "root" there is one more thing:
You will also have to change your samba config to use "root" as guest account.
Have fun.
wengi
Hi there!
At the Step 2 (the ping commands) I can see that I don't have internet access on my asus. :'o(
After I connected with telnet, when I do ping www.google.com I have "UNKNOWN HOST"
and when I put the IP adress of the google server, I have "NETWORK UNREACHABLE"
The bizarre thing is that the computers connected to the Asus receive an IP adress and have access to the Internet without any problem...
I have no idea what and where I should look to find a solution. Anybody can help me in telling me where I should investigate?
Thanks!
PS: I use the firmware 1.9.2.7-8 and I don't use the WAN port. I use the LAN only.
Me again...
I did the ROUTE command and a friend told me that the Gateway was missing... so I did the following command:
route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1 dev br0
and then I could access internet from my asus box...
and do a ping on an ip of an internet website.
but each time I restart the asus, it looses the information :(
1. Why do I have to put the gateway by hand? Is there a filed I missed in the web interface`?
2. If I cannot use the webinterface... is there any config where I can save that new route table?
Thanks a lot for your help!
Hi,
in -8 and later firmwares you have to set the default gateway in the webinterface.
IP Config -> LAN -> default gateway
This will do the job :)
wengi
Edit: I changed the text in the HowTo to make this more clear.
Thank a lot for your answer! :)
I have the firmware 1.9.7.2-8, but ( :( :( )
in "IP Config", I don't have only "LAN"
it is actually "WAN & LAN"
so I suppose it is what you meant...
so then, in "WAN & LAN" I don't use WAN, so the only thing I can configure are:
->Host Name
->Ip Address
->Subnet Mask
no "default gateway" :(
I am lost... sniff!
EDIT: by the way, I have a WL500g Premium, maybe that is the problem?
Hi,
Just to get it right: The asus is connected to a modem and acts as router or do you have another router doing the internet stuff?
wengi
HI!
I'm newbie. I can't download IPKG Packet .
wget http://ipkg.nslu2-linux.org/feeds/op...-12_mipsel.ipk
gives a message:
wget: server returned error 404: HTTP/1.1 404 Not Found
What's the problem? What make I wrong?
Thanks
accsi
Hi,
as mentioned in the german thread:
http://ipkg.nslu2-linux.org/ is not reachable atm.
Not your fault. Just wait.
wengi
EDIT: Updated HowTo due to new version of uclib.
Thank you for your answer Wengi!
Sorry for the delay, I was sick...
To answer your question, my asus is connected to a modem-router that does everything concerning internet.
Does it answer your question?
Thanks again for your help!
Hi,
i think you operation mode is the wrong one.
Do the following:
- Make sure that webinterface -> System Setup -> Operation Mode is set to "Access Point"
- Make sure that webinterface -> IP Config -> LAN is set correctly corresponding to your network/router.
wengi
alex.bumbacea
29-01-2008, 17:22
this firmware can be user with download master?
LE: *used
Hi,
no, the oleg firmware does not include the download master.
(If this was your question, 'cause it is not that clear)
wengi
DM wont work on oleg.
You need transmission to download torrents.
Its better than DM but you need to put some time into configuration :)
alex.bumbacea
29-01-2008, 22:25
thx for your answers.
Now i have another :-s, i hope u don't mind.
Let's say i wanna use my router as torret client, lamp server and , of course, as a router. i would like to know if it has the power to do so much, and if it does, please tell me an aprox. number of torrents that i should let active in the same tine in the transmission conf.
LE: I managed to install a lamp, but i can not acces my web server from net.
In lan i have 192.168.10.0/24. I made PF from 80->192.168.10.1:8080. I can acces it from inside my net home with the public ip, but when somebody else try to access it, there si no answer. Any idea?
alex.bumbacea
31-01-2008, 16:30
I'm back with another problem:
Now i have a seccond net connection and woul like to pass imap/browsing trough one, and all what means torrents/dc++ trough the second(this is one with larger metro bandwith).
Can i doit with this router? And if someone knows any tutorial for this... please pot it...
I'm back with another problem:
Now i have a seccond net connection and woul like to pass imap/browsing trough one, and all what means torrents/dc++ trough the second(this is one with larger metro bandwith).
Can i doit with this router? And if someone knows any tutorial for this... please pot it...
This depends on what you want to do and is mainly a routing problem. I would suggest opening a new thread for this.
We also need more informations:
- How are the connections realized?
- How is your subent setp? Has asus 2 IPs?
- Is imap/browsing outgoing or incoming?
- Torrent is running on your router?
And so on....
wengi
piezomotor
31-01-2008, 20:17
I had one USB HD connected to my WL500gP, now I have two:
/dev/scsi/host0/bus0/target0/lun0/part1 151705660 41080112 102919340 29% /opt
/dev/scsi/host1/bus0/target0/lun0/part1 976521536 84110528 892411008 9% /tmp/mnt
Sometimes they will swap-
/dev/scsi/host0/bus0/target0/lun0/part1 151705660 41080112 102919340 29% /tmp/mnt
/dev/scsi/host1/bus0/target0/lun0/part1 976521536 84110528 892411008 9% /opt
How this can be prevented?
Thanks.
I was following the tutorial (btw, exquisite job man, congrats - I'm a linux noob and I could follow it with no problem at all...until this one) and when I was about to install transmission I got the following error
[admin@(none) root]$ ipkg install logrotate
Installing logrotate (3.7.1-4) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/logrotate_3.7.1-4_mipsel.ipk
wget: ipkg.nslu2-linux.org: Unknown host
Nothing to be done
An error ocurred, return value: 22.
Collected errors:
ipkg_download: ERROR: Command failed with return value 1: `wget -q -P /opt/ipkg-o1GRVF http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/logrotate_3.7.1-4_mipsel.ipk'
Failed to download logrotate. Perhaps you need to run 'ipkg update'?
I would like to know if there's something that I can do... To me it looks like there's a problem with the website where wget gets everything. I am writing from the same station, so internet's working fine...
Please advise...
Hi,
you are right.
This was an error with the website. (http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/)
But it is working here.
Try again.
@piezomotor
Just quick and dirty:
Create a file on one HDD (e.g. hdd1.tmp)
Check if this file exists after mount. If not: unmount and mount the other hdd.
This is not a good solution but it should work. I remeber that i read about this prob in the forums. Do a search.
wengi
Thank you wengi for your quick reply...
I tried again this morning and I got the same errors
On the other hand accessing this from a web browser would actually download the packages...
My question is, can't I just download everything locally and take it from there?
If so, could you be so kind as to explain me how...please
Thanks in advance
hello .. my problem is that the
/usr/local/sbin/post-boot
containing line mount /dev/discs/disc0/part3 /tmp/harddisk
like in tutorial (4b. Startup-scripts). should i put some more sleep command there ? that the system could mount that space of hdd right after reboot ?
after reboot router is not mounting the hdd to that temp place . i have to umont it my self and mount it again . after that the hdd partition is working perfectly .
what could be the problem that the post boot is not mounting right ? i dont want to do it manualy after reboot .
now after system reboots . there is /tmp/harddisk but read only . and behaving very slowly in samba . after manual umont and mount it is working perfectly ..
how come ?? :-)
.. using version version 1.9.2.7-7g in 500g premium
df command looks like this after reboot
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 2880 2880 0 100% /
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part2
988244 95120 842924 11% /opt
/dev/discs/disc0/part1
29280176 2768 29277408 1% /tmp/harddisk
how come that the part 1 is mounting as /tmp/harddisk .. and it should be part3 ??
where could i find this command ? my /usr/local/sbin/post-boot looks like this
#!/bin/sh
dropbear
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
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
mount /dev/discs/disc0/part3 /tmp/harddisk
# Activate swap
swapon /dev/discs/disc0/part1
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
????????
Hi wengi,
A question... when you enter the following commands where should you be? My prompt looks like this
[admin@(none) root]$
I'm talking about these commands...
ipkg install logrotate
ipkg install gnuplot #(there are many dependencies. This will take some time)
ipkg install libbt
ipkg install transmission
Hi,
sorry, not that much time...
@gixie:
check the inet connection, DNS and routing. Try to ping ipkg.nslu2-linux.org. It think there is something buggy with the settings in the router. Otherwise install lynx manually (see the commangs of th ipkg installation itself. Simply use the downloaded filename instead of the package name). What does "ipkg update" result in?
@maxo777
is your swap (part1) active? Try 'free' to see this.
wengi
Hi,
@maxo777
is your swap (part1) active? Try 'free' to see this.
wengi
yes everything works .. bud after restart i must manualy dismount part3 and mont again . and all ok . ;-)
could the problem be here ?
http://wl500g.info/showthread.php?t=12098
?
FREE looks like this
[admin@(none) root]$ free
total used free shared buffers cached
Mem: 30116 28776 1340 0 2568 18780
-/+ buffers/cache: 7428 22688
Swap: 506008 3184 502824
it's great to have such a comprehensive tutorial to follow. however, I've the problems in opening the web interface for samba2 & transmission, i.e. 192.168.1.1:901 etc. failed to open any web interface.
i am using the latest oleg firmware and followed the tutorial upto transmission & samba2.
could anybody tell me what the problem is?
many thx!!!
Hi,
check if the service is running (with 'top' or 'ps axf'). (processes like smbd should be there.)
If they are not running, try to run your post-boot file manually and see if errors pop up.
If you still have your standard ip-address it should work, otherwise, check in the following files if your ip-range is valid for samba. /opt/etc/samba/smb.conf and /opt/etc/xinetd.d/swat
HTH
raas, many thx. for your reply
it appears that samba & transmission are not running if i use the 'top' command.
my post-boot file is as follows:
#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
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
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
mount /dev/discs/disc0/part3 /tmp/harddisk
# Activate swap
swapon /dev/discs/disc0/part1
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
Is there sth. missing
sorri that i dun know much about linux...many thx. for your kind assistance.
Hi,
post-boot seems ok.
try to run "/opt/etc/init.d/rc.unslung" manualy.
Any errors?
Is the file executable?
Please post the result of "ls -lah /opt/etc/init.d/"
wengi
Hi,
post-boot seems ok.
try to run "/opt/etc/init.d/rc.unslung" manualy.
Any errors?
Is the file executable?
Please post the result of "ls -lah /opt/etc/init.d/"
wengi
i run "/opt/etc/init.d/rc.unslung" and didnt get any errors
this is what i got:
[admin@(none) root]$ /opt/etc/init.d/rc.unslung
Starting busybox httpd at port 8008 ... busybox_httpd: bind: Address already in use
done
Stopping smbd:
Stopping nmbd:
Starting smbd:
Starting nmbd:
[admin@(none) root]$ ls -lah /opt/etc/init.d/
ls: illegal option -- h
BusyBox v1.1.3 (2007.10.15-19:06+0000) multi-call binary
Usage: ls [-1AacCdeFilnpLRrSsTtuvwxXk] [filenames...]
[admin@(none) root]$
tnx for the help
Hi,
sorry, the -lah option was wrong i think.
simply do a "ls /opt/etc/init.d/" and post the result here.
Also post result of "ps" or "ps axf" (depending if core utils are installed)
wengi
Hi,
sorry, the -lah option was wrong i think.
simply do a "ls /opt/etc/init.d/" and post the result here.
Also post result of "ps" or "ps axf" (depending if core utils are installed)
wengi
OK here it is
[admin@(none) root]$ ls /opt/etc/init.d/
S05syslogd S10xinetd S80samba
S10cron S80busybox_httpd rc.unslung
[admin@(none) root]$
[admin@(none) root]$ ps
PID Uid VmSize Stat Command
1 admin 688 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]
43 admin 328 S telnetd
48 admin 396 S httpd eth1
55 nobody 492 S [dnsmasq]
56 admin 368 S klogd
61 admin SW [khubd]
70 admin 276 S lpd
72 admin 260 S p9100d -f /dev/usb/lp0 0
75 admin 344 S waveservermain
77 admin 348 S rcamdmain
81 admin SW [usb-storage-0]
82 admin SW [scsi_eh_0]
88 1 364 S [portmap]
91 admin 476 S /usr/sbin/statd
93 admin SW [nfsd]
94 admin SW [lockd]
95 admin SW [rpciod]
97 admin 456 S /usr/sbin/mountd
102 admin 320 S infosvr br0
105 admin 500 S watchdog
107 admin 352 S ntp
115 admin 468 S dropbear
116 admin SW [kjournald]
118 admin SW [kjournald]
132 admin 400 S /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
135 admin 412 S /opt/sbin/cron
148 admin 420 S /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 800
156 admin 1292 S /opt/sbin/smbd -D
158 admin 1196 S /opt/sbin/nmbd -D
173 admin 432 S udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
179 admin 412 S stupid-ftpd
186 admin 564 S upnp -D -L br0 -W eth1
189 admin 556 S -sh
193 admin 404 R ps
[admin@(none) root]$
tnx
Hi,
This is a total shot in the dark and correct me if I'm wrong,
but do these services need a 'hostname' in order to function properly?
I'm asking this because I saw a
[admin@(none) root]
in your code
The '(none)' means, no hostname is available.
I could be wrong, but give it a shot.
Hi,
transmission and samba are running:
148 admin 420 S /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 800
156 admin 1292 S /opt/sbin/smbd -D
158 admin 1196 S /opt/sbin/nmbd -D
btu the fulll http-line of ps should be:
/usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/wwwMaybe this was only a putty thing...
I recommend defining a hostname (in webinterface)
Swat is not reachable because xinetd is not running!
Check if /opt/etc/init.d/S10xinetd is executable and the content is the right one.
And by the way: dvirt = dolpli?
wengi
Hi,
transmission and samba are running:
148 admin 420 S /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 800
156 admin 1292 S /opt/sbin/smbd -D
158 admin 1196 S /opt/sbin/nmbd -D
btu the fulll http-line of ps should be:
/usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/wwwMaybe this was only a putty thing...
I recommend defining a hostname (in webinterface)
Swat is not reachable because xinetd is not running!
Check if /opt/etc/init.d/S10xinetd is executable and the content is the right one.
And by the way: dvirt = dolpli?
wengi
i define a host name (wl500w), still cant get 192.168.1.1:901 or wl500w:901 .
ps output:
[admin@wl500w root]$ ps
PID Uid VmSize Stat Command
1 admin 688 S /sbin/init
2 admin SW [keventd]
3 admin RWN [ksoftirqd_CPU0]
4 admin SW [kswapd]
5 admin SW [bdflush]
6 admin SW [kupdated]
7 admin SW [mtdblockd]
43 admin 308 S telnetd
48 admin 380 S httpd eth1
55 nobody 440 S [dnsmasq]
56 admin 368 S klogd
61 admin SW [khubd]
70 admin 276 S lpd
72 admin 260 S p9100d -f /dev/usb/lp0 0
75 admin 344 S waveservermain
77 admin 348 S rcamdmain
81 admin SW [usb-storage-0]
82 admin SW [scsi_eh_0]
89 1 364 S [portmap]
91 admin 472 S /usr/sbin/statd
93 admin SW [nfsd]
95 admin SW [lockd]
96 admin SW [rpciod]
97 admin 456 S /usr/sbin/mountd
102 admin 320 S infosvr br0
103 admin 500 S watchdog
107 admin 352 S ntp
113 admin 480 S dropbear
116 admin SW [kjournald]
118 admin SW [kjournald]
132 admin 400 S /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
135 admin 412 S /opt/sbin/cron
150 admin 420 S /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 800
156 admin 1288 S /opt/sbin/smbd -D
158 admin 1192 S /opt/sbin/nmbd -D
173 admin 432 S udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
179 admin 412 S stupid-ftpd
181 admin 964 S /usr/sbin/nmbd -D
190 admin 456 S upnp -D -L br0 -W eth1
192 admin 748 R dropbear
193 admin 556 S -sh
196 admin 404 R ps
[admin@wl500w root]$
i have very littel knowledgein linux so ... when i defined a host name, i sould update some files ?
opt/etc/init.d/S10xinetd
is exeutedle i think
Hi,
Hostname is ok. No changes necessary. Only a reboot.
There sould be a line with xinetd if you do a "ps":
152 ? Ss 0:00 /opt/sbin/xinetd
So your xinetd is NOT running.
Have a look at this:
[admin@blechbuechse root]$ ls -la /opt/etc/init.d/
total 28
drwxr-xr-x 2 admin root 4096 Feb 20 18:57 .
drwxr-xr-x 14 admin root 4096 Feb 20 18:57 ..
-rwxr-xr-x 1 admin root 508 Jan 6 11:30 S05syslogd
-rwxr-xr-x 1 admin root 153 Oct 27 06:26 S10cron
-rwxr-xr-x 1 admin root 246 Oct 27 19:35 S10xinetd
-rwxr-xr-x 1 admin root 3127 Feb 17 12:24 S80busybox_httpd
-rwxr-xr-x 1 admin root 386 May 27 2007 rc.unslung
There must be execute rights for the S10xinetd file. (-rwxr-xr-x).
Simply type "/opt/etc/init.d/S10xinetd". what happens? is it in ps now?
Post result of "cat /opt/etc/init.d/S10xinetd".
wengi
this is what i get:
[admin@wl500w root]$ cat /opt/etc/init.d/S10xinetd
#!/bin/sh
OPTWARE_TARGET=oleg
#
# Startup script for xinetd
#
# Stop myself if running
killall xinetd 2>/dev/null
# Stop other inetd processes if running
if [ ${OPTWARE_TARGET} = "nslu2" ] ; then
killall inetd 2>/dev/null
fi
/opt/sbin/xinetd
[admin@wl500w root]$ ps
PID Uid VmSize Stat Command
1 admin 688 S /sbin/init
2 admin SW [keventd]
3 admin RWN [ksoftirqd_CPU0]
4 admin SW [kswapd]
5 admin SW [bdflush]
6 admin SW [kupdated]
7 admin SW [mtdblockd]
43 admin 308 S telnetd
48 admin 380 S httpd eth1
55 nobody 488 S [dnsmasq]
56 admin 368 S klogd
61 admin SW [khubd]
70 admin 276 S lpd
72 admin 260 S p9100d -f /dev/usb/lp0 0
75 admin 344 S waveservermain
77 admin 348 S rcamdmain
81 admin SW [usb-storage-0]
82 admin SW [scsi_eh_0]
89 1 364 S [portmap]
91 admin 472 S /usr/sbin/statd
93 admin SW [nfsd]
95 admin SW [lockd]
96 admin SW [rpciod]
97 admin 456 S /usr/sbin/mountd
102 admin 320 S infosvr br0
103 admin 500 S watchdog
107 admin 352 S ntp
113 admin 480 S dropbear
116 admin SW [kjournald]
118 admin SW [kjournald]
132 admin 400 S /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
135 admin 416 S /opt/sbin/cron
150 admin 420 S /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 800
156 admin 1296 S /opt/sbin/smbd -D
158 admin 1196 S /opt/sbin/nmbd -D
173 admin 432 S udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
179 admin 412 S stupid-ftpd
181 admin 1004 S /usr/sbin/nmbd -D
190 admin 480 S upnp -D -L br0 -W eth1
192 admin 748 S dropbear
193 admin 556 S -sh
316 admin 952 S N transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var
319 admin 952 S N transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var
320 admin 952 S N transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/var
323 admin 748 S dropbear
324 admin 560 S -sh
329 admin 404 R ps
[admin@wl500w root]$
Three more (in this order!):
Results of "cat /opt/etc/xinetd.d/swat"
and
"/opt/sbin/xinetd"
and
"ps"
wengi
What is the (LAN-) IP of the asus?
[admin@wl500w root]$ cat /opt/etc/xinetd.d/swat
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost 192.168.1.0/24
user = root
server = /opt/sbin/swat
log_on_failure += USERID
disable = No
}
[admin@wl500w root]$
my asus wl500w ip is 192.168.1.1
here it is
[admin@wl500w root]$ cat /opt/etc/xinetd.d/swat
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost 192.168.1.0/24
user = root
server = /opt/sbin/swat
log_on_failure += USERID
disable = No
}
[admin@wl500w root]$ /opt/sbin/xinetd
[admin@wl500w root]$ ps
PID Uid VmSize Stat Command
1 admin 688 S /sbin/init
2 admin SW [keventd]
3 admin RWN [ksoftirqd_CPU0]
4 admin SW [kswapd]
5 admin SW [bdflush]
6 admin SW [kupdated]
7 admin SW [mtdblockd]
43 admin 308 S telnetd
48 admin 380 S httpd eth1
55 nobody 488 S [dnsmasq]
56 admin 368 S klogd
61 admin SW [khubd]
70 admin 276 S lpd
72 admin 260 S p9100d -f /dev/usb/lp0 0
75 admin 344 S waveservermain
77 admin 348 S rcamdmain
81 admin SW [usb-storage-0]
82 admin SW [scsi_eh_0]
89 1 364 S [portmap]
91 admin 472 S /usr/sbin/statd
93 admin SW [nfsd]
95 admin SW [lockd]
96 admin SW [rpciod]
97 admin 456 S /usr/sbin/mountd
102 admin 320 S infosvr br0
103 admin 500 S watchdog
107 admin 352 S ntp
113 admin 484 S dropbear
116 admin SW [kjournald]
118 admin SW [kjournald]
132 admin 400 S /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
135 admin 408 S /opt/sbin/cron
150 admin 332 S /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 80
156 admin 808 S /opt/sbin/smbd -D
158 admin 844 S /opt/sbin/nmbd -D
173 admin 432 S udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcp
179 admin 412 S stupid-ftpd
181 admin 1008 S /usr/sbin/nmbd -D
192 admin 748 S dropbear
193 admin 556 S -sh
316 admin 876 S N transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/va
319 admin 876 S N transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/va
320 admin 876 R N transmissiond -p 65534 -w 300 -u -1 -d -1 -i /opt/va
323 admin 748 S dropbear
324 admin 560 S -sh
1007 admin 748 S dropbear
1010 admin 556 S -sh
1090 admin 456 S upnp -D -L br0 -W eth1
1779 admin 748 S dropbear
1780 admin 556 S -sh
1785 admin 540 S /opt/sbin/xinetd
1786 admin 404 R ps
[admin@wl500w root]$
the asus ip is 192.168.1.1
user = root
Hi,
is the user you use to login onto the asus root ?
In my setup.. swat uses user admin (the standard login of the asus, and also uses it's password for the swat login.
HTH
:)how can i edit the file ?
i'm a new linux user ,sorry
Problem found, i hope. Its the username. maybe xinetd ist starting and stopping some time later because no service is accespted.
to edit the file:
The hard way is vi (<- a text editor)
the better way for you:
"ipkg install nano"
nano Path/filename
wengi
so it will be something like this ?
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost 192.168.1.0/24
user = admin
server = /opt/sbin/swat
log_on_failure += USERID
disable = No
}
yes.
This is mine:
[admin@blechbuechse root]$ cat /opt/etc/xinetd.d/swat
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost 192.168.201.0/24
user = admin
server = /opt/sbin/swat
log_on_failure += USERID
disable = No
}
[admin@blechbuechse root]$Only difference is th IP net.
wengi
You r the KING man :) :) :)
1. what do i have to configure in the samba to use transmision.
2. the transmision is working but i cant see any torrent activity
3. can i see the transmision from the WAN (at my work)
4. can i putty from wan ?
tnx
Answer is simple: READ :)
All four questions are answered in my howto.
1) Chapter 10a in the middle
2) Did you try to download a widely distributed torrent? Chapter 9b end.
3) you could do that but i do not recommend it for security issues. Use ssh and lynx. Chapter 11
4) Yes. Ok, this is not _directly_ in the HowTo and depends on your setup. If the asus is your router you have to open port 22 in the firewall.
wengi
many thx. to raas & wengi...finally i set up samba2 succesfully!!
I could see the router HDD from winXP..but a problem comes out.
That's I can't create any directory in the root directory from the HDD becus error msg. showed that the root directory was write-protected & read only!!!
So what can I do so that I could use window explorer to freely create directory under root?
thx for your help!!
Check the following in swat:
Goto "Globals":
- Change "workgroup" to your workgroup.
- "netbios name" is the name of your asus (for me again blechbuechse).
- "hosts allow" should be your subnet e.g. "192.168.1." (leave out the last number)
- "guest account" is 'admin'.
Commit changes with "Commit Changes". (You never would have known this )
Changes in globas need a restart to take effect!
goto "Shares":
- Insert "torrent" beside "create share" and press "create share".
- "comment": "torrent files"
- "path": "/tmp/harddisk/torrent"
- "read only" NO
- "guest ok" YES
- "browseable" YES
- Press "commit changes".
The settings take effect immediately. No reboot necessary.
You should see your asus in the windows network now.
wengi
to wengi
thx. for your reply!
I checked the settings and it's same as you posted...
it's strange that i could copy/delete files in the /tmp/harddisk or /torrent directories but i am unable to create any directories under root!
what should i do?
Hi dolpi,
you can't create folders in the actual root of the router because that file-system is 'read-only'.
(you can make changes and than commit changes to the flash)
The root is the 'actual' system which is running on the router.. oleg's firmware in this case.
The partitions/harddisks are mounted on designated locations (like /opt, /tmp/harddisk, /mnt)
So in the most-upper-top-level (:)) (which is root) you can not create anything, only under the mounting points.
But this is really not something you want to do. The size off the flash is that limited that you really can't store any data on it.
you can only create folders 'within' the mounting points.
Let's assume you have your 'packages' partition mounted on /opt, then you only will be able to create a folder within /opt. Not in / (root)
let's also assume you have your 'data' partition mounted on /tmp/harddisk (or /mnt), then you only will be ablt to create a folder within /tmp/harddisk (or /mnt). Not in / (root)
Test if you can make a folder 'test' in /opt, and test if you can make a folder in your data partition.
Also,
take a look at the output of the 'mount' and 'df' command, this should tell you how your harddisks are actually mounted (and in which location), and how they are mounted (read, read/write)
HTH
Dear Wengi,
I managed to set up my router according to your protocol, everything works great. I can use my usb harddisk as a network drive, and can download torrents. However, I have the impression that watchdog is not run periodically by cron. I have set it up according to your protocol, but still completed torrents are not moved to the target directory and set to seed. This only happens after I press the watchdog button in the transmission webpage. Is there a way to check if cron works as it supposed to? I can see cron in the process list (ps), and the watchdog command is inserted in the crontab file. Did I forget something?
Thanks for your efforts, you've made a great manual!
Best regards,
Ecori:)
stefantriep
04-03-2008, 00:54
Nice tutorial. Everything works on my WL500G :
Telnet
SSH
IPKG
Mc
CRON
Transmission
SAMBA2 (plz don't forget your firewall settings at you pc when looking at samba server)
LYNX
Wengi can I donate on a paypal of yours?
Greetz Stefan
Hi all,
@ecori
watchdog is normaly running every full hour. You can run watchdog manually for testing or change it to run every 30 minutes.
So if your torrent finishes (e.g. at 13:01)it can take up to 59 minutes for watchdog to run (14:00). Be patient :)
There is nothing forgotten on this part.
@stefantriep
Nice to know it was hepfull. No, there is no paypal and i do not want any donations. This is fun for me and it should be fun for you :) If you want to donate: Donate your new knowledge to the newbies that will come :D
wengi
Dear Wengi,
This is sure fun making programming the router in such a way that it performs super. Still my transmission watchdog is not running as it supposed to. After the download has finished it ends in "status unkown" (if I have the correct text, at the moment I don't have a finished download to check), even if this occurs in the middle of the night. If I then push the watchdog button, the status changes in seeding (and the files are moved to the target folder). I interpret this that the watchdog has not checked every 30 minutes if the status of the torrent has changed, like download completed. It only changes if I actively run watchdog by clicking the button. THe command in the cron script is " */30 * * * * admin nice transmission_watchdog", does this not mean that the script should run every half hour? What does the command nice do?
Thx for your help,
Regards,
Ecori
Hi,
is cron running?
paste the result of "ps" and "ps axf".
wengi
PS:
[admin@blechbuechse root]$ nice --help
Usage: nice [OPTION] [COMMAND [ARG]...]
Run COMMAND with an adjusted niceness, which affects process scheduling.
With no COMMAND, print the current niceness. Nicenesses range from
-20 (most favorable scheduling) to 19 (least favorable).
-n, --adjustment=N add integer N to the niceness (default 10)
--help display this help and exit
--version output version information and exit
NOTE: your shell may have its own version of nice, which usually supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.
Report bugs to <bug-coreutils@gnu.org>.
alexeo4c2x07
06-03-2008, 17:40
io am un router asuswl 500w http://emag.ro/routere_wireless/router-asus-wl-500w--pWL-500W acum ruleaza cu firmware ii merge shi wireless ul inclusiv hdd ul extern merge download master dar numa ca merge cam greoi.... problema mea e ca vreau sa bag alt firmware cum ar fii dd wrt sau open wrt vreau sa instalez shi functiile
-server web cu php
-server mysql
-server email
-mediaserver
dar nu stiu ce anume sa pun dd wrt sau open wrt nici cum sa il instalez. Daca ma poate ajuta cineva cu un sfat si cu un tutorial ii multumesc anticipat si ii las id ul meu de mess c2x07
Hello wengi, thank you very much for the tutorial :)
Only problem i have in settings my profile: only when aliases works, and it seems logical to me is tmp/local/root/.profile you specified differnt dir and then the aliases not work.
Second questions is: is there any tutorial how to setup the ftp? e.g. pure ftpd ? I installed the ipkg pure-ftpd, but it looks that in this version it is not able to jail the user in home and link the directories from part3 of my usb hdd :( when i log in via ftp, i can see links but there is no possibility to cd to it.
thx for your help.
Hi Wengi,
ps axf result:
PID TTY STAT TIME COMMAND
1 ? S 0:01 /sbin/init
2 ? S 0:00 [keventd]
3 ? RN 2:21 [ksoftirqd_CPU0]
4 ? S 0:13 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:01 [mtdblockd]
59 ? S 0:01 telnetd
5606 pts/0 Ss 0:00 \_ -sh
5613 pts/0 R+ 0:00 \_ ps axf
64 ? S 0:02 httpd vlan1
71 ? S 0:00 [dnsmasq]
72 ? S 0:00 klogd
74 ? Ss 0:01 nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
77 ? S 0:00 [khubd]
86 ? Ss 0:00 lpd
88 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
91 ? Ss 0:00 waveservermain
93 ? Ss 0:00 rcamdmain
97 ? S 1:59 [usb-storage-0]
98 ? S 0:00 [scsi_eh_0]
131 ? Ss 0:00 infosvr br0
132 ? Ss 0:01 watchdog
135 ? Ss 0:00 \_ ntp
142 ? S 0:00 dropbear
145 ? S 0:00 [kjournald]
170 ? S 0:09 /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
173 ? Ss 0:00 /opt/sbin/cron
188 ? S 0:00 /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 800
199 ? Ss 0:00 /opt/sbin/smbd -D
4679 ? S 26:31 \_ /opt/sbin/smbd -D
201 ? Ss 0:00 /opt/sbin/nmbd -D
210 ? S 0:03 [kjournald]
212 ? S 0:01 stupid-ftpd
5612 ? S 0:00 \_ stupid-ftpd
5598 ? S 0:00 upnp -D -L br0 -W vlan1
Does this mean cron is running?
Thx,
Ecori
@ecori
cron is working:
173 ? Ss 0:00 /opt/sbin/cronPlease double check your crontab file. Also check /opt/var/log/messages for cron entries like
Mar 7 09:00:01 /opt/sbin/cron[235]: (admin) CMD (nice /opt/sbin/transmission_watchdog)
@keydee
have a look in /usr/etc/profile, which is the normal profile file. There is a line
[ -x /opt/etc/profile ] && . /opt/etc/profile which calls the /opt/etc/profile. Check if this file is executable.
There are several ftp servers available. Test another. i could not find a conf file for pure-ftpd. use search in forum.
@alexeo4c2x07
?????
wengi
wengi many thanx!!!!
could you recomend some ftp server which is easy to configure pls?:confused:
Hey KeyDee,
You could try to use vsftpd. (this is the ftp-server I use, and i'm very happy with it... delivers good speed.. almost 4 mbyte/sec in a wired-LAN environment)
http://www.macsat.com/macsat/content/view/25/29/
(I hope wengi doesn't mind me answering a question which was addressed to him)
Hi Wengi,
I checked the log, and find no cron entries. The contents of crontab is as it supposed to be acoording to your manual:
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
*/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
*/30 * * * * admin nice /opt/sbin/transmission_watchdog
0 0 * * * admin /opt/sbin/logrotate -f /opt/etc/logrotate.conf &>/dev/null
Could it be a path problem?
Thanks for thinking with me, it is very helpful!:)
Ecori
@keydee
have a look in /usr/etc/profile, which is the normal profile file. There is a line
[ -x /opt/etc/profile ] && . /opt/etc/profile which calls the /opt/etc/profile. Check if this file is executable.
There are several ftp servers available. Test another. i could not find a conf file for pure-ftpd. use search in forum.
wengi
checked that file, it is not executable, tried to change it but i ve got an error that the filesystem is read only, so dont know
Hi Wengi,
I think I solved the problem! The contents of crontab defines that the script is running for admin, I had to replace that by my login name! Now I can find the cron entry (/opt/sbin/cron[214]) in the log files running. THanks alot for your help:D
Now I am still struggling with qos, I got wshaper running up, but I would like to use my FTP at full speed when I access my harddisc from elsewhere. DO you have any idea to get that working? I use the ftp server included in the firmware of Oleg (stupid-ftp), what would be the advantage of vsftpd (Raas, why do you prefer this program as a server?)
Thanks alot guys, I really enjoy this working toghether!!
Ecori
Hi guys,
was away some days..
/opt/etc/profile must be executable. If you get a "read only" filesystem your hdd/partition is not mounted as it should.
wengi
Do you try to use samba as daemon or with xinetd?
daemon:
try to run /opt/etc/init.d/S80samba.
post the logfile if nmbd or smbd are not running
xinetd:
make sure xinetd is running or run /opt/etc/init.d/S10xinetd
Samba will only work if (smbd AND nmbd) OR xinetd are running (check with ps axf)
wengi
Can you explain me please witch is the differene between Daemon and Xinetd ? Sometimes i have speed problems when i try to watch an HDD movie from the hdd of asus.
I'm using Oleg's final firmware, and i've followed your tutorial up to (including) the torrents
i'm considerring to install samba 2 or 3, but i'm afraid about the memory limits. There is some way to " renice" the included samba ? Or i must install separate one ?
Thank you for your great tutoriall !
All the best !
P.S.
I have an WL500gP
Hi,
The Deamon is allways active.
Xinetd is listening on the samba port and when there is a request on this port the deamon is started.
There should be no difference in the performance when accessing samba over deamon or xinetd.
I prefer samba2 because samba3 needs more ressources and these are limited on WL-HDD.
wengi
Hi,
I have this error when I start torrent:
log from website of transmisiion:
Starting torrent /tmp/harddisk/torrent/work/name of torrent.torrent
Mar 12 00:55:52 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/6b4a3d1ee4b986d2bb3c63d708d593f0da09fd20-cgi" No such file or directory
Mar 12 00:55:52 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/6b4a3d1ee4b986d2bb3c63d708d593f0da09fd20" No such file or directory
Mar 12 00:55:52 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/6b4a3d1ee4b986d2bb3c63d708d593f0da09fd20-cgi" No such file or directory
Mar 12 00:55:52 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/6b4a3d1ee4b986d2bb3c63d708d593f0da09fd20" No such file or directory
I have tried four times from all over begining.
2 times with hard drive and two times with pendrive.
What have I done wrong?
PS: sorry for my english.
Did you try another torrent?
e.g. OpenOffice?
wengi
OpenOffice works, now I have 90% completed.
But error still occurs:
Mar 12 09:34:51 transmissiond[311]: Starting torrent /tmp/harddisk/torrent/work/OOo_1.1.5_Win32Intel_install.zip/OOo_1.1.5_Win32Intel_install.zip.torrent
Mar 12 09:36:25 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/54644f6fcb1c3eafb0011cf3ecad5f520617301d-cgi" No such file or directory
Mar 12 09:36:25 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/54644f6fcb1c3eafb0011cf3ecad5f520617301d" No such file or directory
Mar 12 09:36:25 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/54644f6fcb1c3eafb0011cf3ecad5f520617301d-cgi" No such file or directory
Mar 12 09:36:25 transmissiond[311]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/54644f6fcb1c3eafb0011cf3ecad5f520617301d" No such file or directory
Why torrents from TorrentLeech.org doesn`t work?
And when I did this od my Harddrive (Seagate-Sata) I have anothers errors(on flashdrive they don`t occurs):
Mar 10 00:54:01 transmissiond[219]: Transmission daemon 1.06+ (5187) started - http://transmission.m0k.org/ at port 65534
Mar 10 00:54:01 transmission_watchdog: Transmission daemon restarted!
Mar 10 00:54:23 dropbear[188]: exit after auth (admin): Exited normally
Mar 10 00:55:01 /opt/sbin/cron[226]: (admin) CMD (run-parts /opt/etc/cron.5mins)
Mar 10 00:55:30 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 9b 5e 3e 00 00 08 00
Mar 10 00:55:30 kernel: Current sd08:04: sns = 70 3
Mar 10 00:55:30 kernel: ASC=11 ASCQ= 0
Mar 10 00:55:30 kernel: Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
Mar 10 00:55:30 kernel: I/O error: dev 08:04, sector 3145736
Mar 10 00:55:30 kernel: EXT3-fs error (device sd(8,4)): read_inode_bitmap: Cannot read inode bitmap - block_group = 12, inode_bitmap = 393217
Mar 10 00:55:30 kernel: EXT3-fs error (device sd(8,4)) in ext3_new_inode: IO failure
Mar 10 00:55:49 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 9b 5e 3e 00 00 08 00
Mar 10 00:55:49 kernel: Current sd08:04: sns = 70 3
Mar 10 00:55:49 kernel: ASC=11 ASCQ= 0
Mar 10 00:55:49 kernel: Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
Mar 10 00:55:49 kernel: I/O error: dev 08:04, sector 3145736
Mar 10 00:55:49 kernel: EXT3-fs error (device sd(8,4)): read_inode_bitmap: Cannot read inode bitmap - block_group = 12, inode_bitmap = 393217
Mar 10 00:55:49 kernel: EXT3-fs error (device sd(8,4)) in ext3_new_inode: IO failure
Mar 10 00:55:49 transmissiond[219]: Starting torrent /tmp/harddisk/torrent/work/name_of_teoorent.torrent
Mar 10 00:55:49 transmissiond[219]: 1205106949 1 dl 0.00 ul 0.00 ld 0.66
Mar 10 00:56:26 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 9b 5e 3e 00 00 08 00
Mar 10 00:56:26 kernel: Current sd08:04: sns = 70 3
Mar 10 00:56:26 kernel: ASC=11 ASCQ= 0
Mar 10 00:56:26 kernel: Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
Mar 10 00:56:26 kernel: I/O error: dev 08:04, sector 3145736
Mar 10 00:56:26 kernel: EXT3-fs error (device sd(8,4)): read_inode_bitmap: Cannot read inode bitmap - block_group = 12, inode_bitmap = 393217
Mar 10 00:56:26 kernel: EXT3-fs error (device sd(8,4)) in ext3_new_inode: IO failure
Mar 10 00:58:28 transmissiond[219]: Couldn't create directory /tmp/harddisk/torrent/.transmission/torrents (Input/output error)
Mar 10 00:58:28 transmissiond[219]: Couldn't create directory /tmp/harddisk/torrent/.transmission/cache (Input/output error)
Mar 10 00:58:28 transmissiond[219]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/1a0cd2a540417a1b444a672b6c75acfa50b39bc4-cgi" No such file or directory
Mar 10 00:58:28 transmissiond[219]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/1a0cd2a540417a1b444a672b6c75acfa50b39bc4" No such file or directory
Mar 10 00:58:28 transmissiond[219]: Could not open file (/tmp/harddisk/torrent/.transmission/torrents/1a0cd2a540417a1b444a672b6c75acfa50b39bc4-cgi) (No such file or directory)
Mar 10 00:58:28 transmissiond[219]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/1a0cd2a540417a1b444a672b6c75acfa50b39bc4-cgi" No such file or directory
Mar 10 00:58:28 transmissiond[219]: Couldn't get information for file "/tmp/harddisk/torrent/.transmission/cache/1a0cd2a540417a1b444a672b6c75acfa50b39bc4" No such file or directory
Mar 10 00:58:28 transmissiond[219]: Couldn't open '/tmp/harddisk/torrent/.transmission/cache/1a0cd2a540417a1b444a672b6c75acfa50b39bc4-cgi' for writing
Mar 10 00:58:28 transmissiond[219]: Previous message repeated 1 times
Mar 10 00:58:28 transmissiond[219]: Couldn't open '/tmp/harddisk/torrent/.transmission/cache/1a0cd2a540417a1b444a672b6c75acfa50b39bc4-cgi' for writing
Mar 10 00:58:28 transmissiond[219]: Closing torrent /tmp/harddisk/torrent/work/name_of_teoorent.HDTV_XviD-FoV.torrent
Mar 10 00:58:28 transmissiond[219]: 1205107108 1 dl 0.00 ul 0.00 ld 0.53
hi,
do you use the latest version?
ipkg update && ipkg upgrade
wengi
do you use the latest version?
Yes, 1.06.
I have found answer why that torrent doesn`t work.
quote from transmission-forum:
Thats because they have DHT,this is not supported by Transmission
what a pitty:(
But i still have problem with this :
Mar 10 00:55:30 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 9b 5e 3e 00 00 08 00
Mar 10 00:55:30 kernel: Current sd08:04: sns = 70 3
Mar 10 00:55:30 kernel: ASC=11 ASCQ= 0
Mar 10 00:55:30 kernel: Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
Mar 10 00:55:30 kernel: I/O error: dev 08:04, sector 3145736
Mar 10 00:55:30 kernel: EXT3-fs error (device sd(8,4)): read_inode_bitmap: Cannot read inode bitmap - block_group = 12, inode_bitmap = 393217
Mar 10 00:55:30 kernel: EXT3-fs error (device sd(8,4)) in ext3_new_inode: IO failure
Mar 10 00:55:49 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 9b 5e 3e 00 00 08 00
Mar 10 00:55:49 kernel: Current sd08:04: sns = 70 3
Mar 10 00:55:49 kernel: ASC=11 ASCQ= 0
Mar 10 00:55:49 kernel: Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
Mar 10 00:55:49 kernel: I/O error: dev 08:04, sector 3145736
Mar 10 00:55:49 kernel: EXT3-fs error (device sd(8,4)): read_inode_bitmap: Cannot read inode bitmap - block_group = 12, inode_bitmap = 393217
Mar 10 00:55:49 kernel: EXT3-fs error (device sd(8,4)) in ext3_new_inode: IO failure
And evan when I use correct totrent , it works but still can`t acces those cashe files:
"/tmp/harddisk/torrent/.transmission/cache/54644f6fcb1c3eafb0011cf3ecad5f520617301d-cgi" No such file or directory
And is there any other torrent client which will work on my wl-500gp and support DTH?
Hi,
"Mar 10 00:55:30 kernel: I/O error: dev 08:04, sector 3145736" has nothing to do with transmission. These are kernel warnings.
I think you have a HDD problem!
Do a forum search for the torrent stuff.
Or a "ipkg list | grep -i torrent"
wengi
Thanks for all your help.
I think you have a HDD problem!
You were right. HDD is kaput:)
keeshardt
23-03-2008, 20:02
First of all, I need to say this is a great tutorial!
But I some problems. Everything works fine and exactly as described untill 4b. After adding the rules to post-boot as described in 4b, saving, flashfs'ing and rebooting, the trouble starts.
I can't connect to my asus via ssh anymore. Only telnet works. When I check via 'ps' I also don't see a running dropbear.
Next I check to see if the swap is correctly activated, but this does not seem the case:
total used free shared buffers
Mem: 13964 11424 2540 0 1580
Swap: 0 0 0
Total: 13964 11424 2540
Then I type 'df' and I get the following:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
/dev/discs/disc0/part2 988244 16440 921604 2% /tmp/mnt/disc0_2
/dev/discs/disc0/part3 479233648 131228 454758724 0% /tmp/mnt/disc0_3
It seems like post-boot is not correctly executed when rebooting or someting like this? I have followed the tutorial exactly as described, and also created the same three partitions as mentioned. The contents of my post-boot file:
#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
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
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
mount /dev/discs/disc0/part3 /tmp/harddisk
# Activate swap
swapon /dev/discs/disc0/part1
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
I have also copied the log-file from the web-interface and attached it to this post.
Anyone has an idea on how to solve?
Thanks in advance!
Hi,
is the post-boot executable?
wengi
keeshardt
24-03-2008, 16:22
Post-boot is executable:
[admin@WL-ASUSAP sbin]$ ls -al
drwxr-xr-x 1 admin root 0 Mar 23 19:24 .
drwxr-xr-x 1 admin root 0 Jan 1 2000 ..
-rwxr-xr-x 1 admin root 575 Mar 23 19:34 post-boot
-rwxr-xr-x 1 admin root 0 Mar 23 19:24 post-firewall
-rwxr-xr-x 1 admin root 0 Mar 23 19:24 post-mount
-rwxr-xr-x 1 admin root 0 Mar 23 19:24 pre-shutdown
When I execute post-boot manually everything seems to work ok.
When I execute post-boot whilst HDD has spinned down, I get the following (obvious) errors:
[admin@WL-ASUSAP sbin]$ post-boot
insmod: A module named scsi_mod already exists
mount: Mounting /dev/discs/disc0/part2 on /opt failed: No such file or directory
mount: Mounting /dev/discs/disc0/part3 on /tmp/harddisk failed: No such file or directory
swapon: Can't stat '/dev/discs/disc0/part1': No such file or directory
/usr/local/sbin/post-boot: /usr/local/sbin/post-boot: 34: /opt/etc/init.d/rc.unslung: not found
The problems described in my previous post all occured while the HDD was spinning (also after rebooting).
//Edit 27-03: It seems something must have gone wrong during the preparation. After formatting again and following this tutorial twice again, now everything works fine. Thanks for your help!
Hi Wengi,
I tried to find the way how to have my router with FS online but sometimes to switch USB HDD with data partition. I bought USB Stick created swap 512 (part1) on it, created the IPKG partition (part3). But the postboot scrip it not working properly anymore, it looks that router cant use two different USB drives? please see my postboot:
#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
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/disc1/part3 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
mount /dev/discs/disc0/part1 /tmp/harddisk
# Activate swap
swapon /dev/discs/disc1/part1
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
and please see my mounting after reboot:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
/dev/discs/disc0/part1 288451232 18813544 254985208 7% /tmp/harddisk
/dev/discs/disc1/disc 961528 16428 896256 2% /tmp/harddisk/part1
I really dont know why its not working:( Could you please help ? THX
EDIT: When I tried to mount it manually after umounting all I have this error:
[admin@(none) sbin]$ mount /dev/discs/disc1/part3 /opt
mount: Mounting /dev/discs/disc1/part3 on /opt failed: Invalid argument
Hi,
Firmware version?
Hardware?
There have been some issues with two usb storrage devices at the same time. But it can be solved. I simply do not remember how.
Do a forum search... (usb mount automount)
I am still on -8 firmware, so i cant test it.
wengi
You might want to try to change the usb port which is used per device.
eg.:
usb-key on lower usb-port and usb-drive on upper usb-port
TO:
usb-key on upper usb-port and usb-drive on lower usb-port
In my experience the lower usb-port is accessed first by the asus.
I've had a swap space on a usb-key for a while, but this would only work when drive was connected to lower port and key to upper port..
(small warning though.. if the asus uses the swap extensivly, it will not have a long life. Mine died after 6 months of heavy usage (and limited write cycles on a usb-key), though, the performance gain was impressive.)
HTH
clandmeter
02-04-2008, 12:56
Hi,
I new here and just started hacking my wl500gp. I have installed the latest oleg firmware 1.9.2.7-10 and attached a 20GB usb drive and mounted swap /opt and /mnt. I have installed transmission and clutch and have it running ok. I want to access the 20GB usb HD with ftp (vsftpd) or samba (v2) which are installed by default on this latest firmware, but after enabling them from the http admin interface they do not run. Can these application only be started from console with scripts, if so why are these option still available in the webinterface? Sorry if this has been asked before, i really did search for these questions.
TIA,
Carlo
Hi,
sorry, no experience on the -10 firmware.
Maybe anyone else can help?
wengi
nunbaggi
07-04-2008, 15:31
After using guide 4a this is what comes up..
#dmin@WL-001E8C6C8F08 root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /
/dev/discs/disc0/part2 8103964 131228 7561072 2% /tmp/mnt/disc0_2
/dev/discs/disc0/part3 952830572 131228 904298312 0% /tmp/mnt/disc0_3
Is this correct???
how do i connect to my pc now?
Hi,
i guess you are using version -9 or -10.
Some things have changed. Have a look at http://wl500g.info/showthread.php?t=13785
wengi
clandmeter
08-04-2008, 11:16
Hi,
sorry, no experience on the -10 firmware.
Maybe anyone else can help?
wengi
After checking it seems that if automount doesn't mount the USB partitions these applications don't run. NFS does seem to run even if automount doesn't run. I made the default firmware vsftpd run with configs and start-up files found on the forum and wiki's.
-carlo
Must wait for another fine tutorial .. ;-)
I did downgrade to v8 and all work great . as i am new in linux . i could not make the basic adjustment without the tutorial .. but still learning . maybe one day .. ;-)))
my question is ...
how to decrease manualy the speed of seeding .. in transmision ? i like to seed . but .. when i am downloadint 15 kb and uploading 200 kb .. that is a little . unfair :-) and my provider must go nuts :-)
thanks
have a look at /opt/etc/transmission.conf
There is an upload bandwidth limit.
wengi
yes .. i did .. but it is global .. some torrents i dont mind to share without limit .. because they are private .
some of them like mini..... i dont need to share so rapidly .. :-)
The global one is, as far as i know, the only possibility.
wengi
bejiboys
09-04-2008, 17:22
I have installed the tutorial flawlessly and have been downloading torrents already. My problem is with accessing the samba share using windows (XP). I can see the hostname from network neigborhood, going to the workgroup itself (or from explicitly doing a run \\hostname\sharename). Apparently, an authentication box apprears with hostname defaulting to "hostname\Guest" and is grayed out - uneditable, giving only the option to input password. I have followed the following to the dot:
Goto "Globals":
- Change "workgroup" to your workgroup.
- "netbios name" is the name of your asus (for me again blechbuechse).
- "hosts allow" should be your subnet e.g. "192.168.1." (leave out the last number)
- "guest account" is 'admin'.
Commit changes with "Commit Changes". (You never would have known this )
Changes in globas need a restart to take effect!
goto "Shares":
- Insert "torrent" beside "create share" and press "create share".
- "comment": "torrent files"
- "path": "/tmp/harddisk/torrent"
- "read only" NO
- "guest ok" YES
- "browseable" YES
- Press "commit changes".
I am using the default "admin" account, and not root.
Any inputs? Thank you.
stashcat
11-04-2008, 09:20
At first thank you for this work.
While following "14. Automate SSH login" I make authorized_keys with vi and copy-paste public key from puttygen into vi. Save file from vi and then can`t connect with correct private key from putty. I check rights and attribute of the file with ls -la, list it contents with cat and find no errors at all. I even place and remove newline after line with a key in vi with no success. Next day I use same key and echo it`s public part into authorized_keys file and all is correct and works fine.
Putty version is 0.60. Firmware is 1.9.2.7-10
hi when i do
mkdir /opt/tmp
i get
cannot create directory `/tmp/tmp': Read-only file system
I am a totally n00b, can somebody explain to me how to enable to create a dir in the map opt??
Hi,
your HDD is not mounted on /opt. Thats why you get this error.
Type "mount" and you will see the mounts.
but:
AT ALL:
I am reviewing the howto and it will be completely updated within the next days. There have been many changes since firmware version -9 and -10.
The howto as it is at the moment will not work properly with the newest firmwares!
So stay tuned
wengi
PS: If you want a preview have a look at the german version.
copilul_mit
15-04-2008, 16:47
Thank you wengi, for this nice [How To]!
I have wl500gp and I followed your tutorial and everything works with firmware 1.9.2.7-8.
I have two questions for you:
1) please tell me the steps that I must follow, when I want to take off the hdd from router? I ask you this because with samba I transfer with 1MB/s and I had install a program ext2ifs (http://www.fs-driver.org/) on my computer. The problem is when I connect the hdd to the computer and I want to access the third partition I get a error: "The disk is not formated! Do you want to format?" and this error apears because I don't disconnect corect the hard from router. I have tried with the eject button from web interface and with the comand "halt" but it doesn't work!
2) if I do step 15. Optimize performance from your [How To], how I start/stop samba with xinetd? It is a command?
Thanks and sorry for my english.
All the best for you!
hello,
i did this as said in tutorial
ipkg install xinetd
ipkg install samba2
Edited the conf of xinetd:
Save... reboot...
but after reboot samba is not running
only executing /opt/etc/init.d/S80samba i can see it in ps axf
what is wrong?
thanx in advence
Hi copilul_mit & Egres,
i think your questions are nearly the same.
After a boot you have to be sure that xinetd is running!
You will NOT find an *mbd in the output of ps.
If xinetd is running and configured like my howto it will start this services if a computer tries to access the configured tcp/udp ports.
You will find smbd and nmbd after accessing samba from the network.
There is a misconfig if the services do not start.
For the usb-hdd question: You should unmount and mount readonly befor detaching:
mount -oremount,ro /mountpoint
There are also other solutions in the forum. Search.
wengi
Hi wengi,
thank you for reply and nice tutorial
my problem is that xinetd is not starting on boot i can start it manual by
/opt/etc/init.d/S10xinetd then i can acces swat but still have to start samba
in web interface coz it doesn't auto strat
i'm usin 2 drives first is a flash-usb on which i have swap and /opt and
usb-hdd for /tmp/harddisk
i really dont know what the problem is, here are some configs hope it can help to find what's wrong
[admin@ASUS root]$ free
total used free shared buffers
Mem: 30116 12656 17460 0 2040
Swap: 501880 0 501880
Total: 531996 12656 519340
[admin@ASUS root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part2 1447472 94028 1279916 7% /opt
/dev/discs/disc1/part1 7700668 1464992 5844496 20% /tmp/harddisk
[admin@ASUS root]$ ps
PID Uid VmSize Stat Command
1 admin 564 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]
63 admin 308 S telnetd
68 admin 376 S httpd
70 admin 500 S nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
72 admin 400 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
73 admin 368 S klogd
74 admin SW [khubd]
83 admin 276 S lpd
85 admin 260 S p9100d -f /dev/usb/lp0 0
89 admin 340 S waveservermain
91 admin 320 S infosvr br0
92 admin 468 S watchdog
93 admin 340 S ntp
101 admin 480 S dropbear
106 admin SW [usb-storage-0]
107 admin SW [scsi_eh_0]
108 admin SW [usb-storage-1]
109 admin SW [scsi_eh_1]
112 admin SW [kjournald]
118 admin 500 S /bin/sh /usr/local/sbin/scsi-stop.sh /dev/scsi/host1/bus0
131 admin SW [kjournald]
136 admin 748 S dropbear
144 admin 556 S -sh
314 admin 276 S /bin/sleep 30
315 admin 404 R ps
and my post-boot
#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
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
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
mount /dev/discs/disc1/part1 /tmp/harddisk
# Activate swap
swapon /dev/discs/disc0/part1
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
echo "nameserver 194.134.5.55" > /etc/resolv.conf
#disk spindown script
/usr/local/sbin/scsi-stop.sh /dev/scsi/host1/bus0/target0/lun0/disc &
sorry for the troubles i found my problem
my rc.unslung had mistake in config
once more thanx for a nice tutorial :)
my problem is that xinetd is not starting on boot i can start it manual by
/opt/etc/init.d/S10xinetd then i can acces swat but still have to start samba
in web interface coz it doesn't auto strat
STOP!
Which firmware version?
Do you use the firmware internal samba or the ipkg-installed version?
If firmware: This will not work with xinetd at the moment. You will have to wait for the New Version of my HowTo or have a look at the german version, which is already up to date.
If ipkg: NEVER activate the webinterface-samba.
wengi
Hi Wengi!
Thx for this nice tutorial!
Almost everything is working fine. :)
I build up this all on a WL-500gP and this is my router as well.
I have done the NAT-Virtual Server ( 192.168.1.1 65534 port) on the router .
I can not set up the Upnp nor the NAT for Transmission.
Apr 14 18:50:04 transmissiond[192]: Transmission daemon 1.05+ (5051) started - http://transmission.m0k.org/ at port 65534
Apr 14 18:55:18 transmissiond[192]: Port Mapping (NAT-PMP): If your router supports NAT-PMP, please make sure NAT-PMP is enabled!
Apr 14 18:55:18 transmissiond[192]: Port Mapping (NAT-PMP): NAT-PMP port forwarding unsuccessful, trying UPnP next
Apr 14 18:55:18 transmissiond[192]: Port Mapping (UPNP): upnpDiscover returned NULL (errno 2 - No such file or directory)
Apr 14 18:55:18 transmissiond[192]: Port Mapping (UPNP): UPNP_GetValidIGD failed. (errno 0 - Success)
Apr 14 18:55:18 transmissiond[192]: Port Mapping (UPNP): If your router supports UPnP, please make sure UPnP is enabled!
This is the log for the error.
Today I got another error message:
[admin@PSQ10 root]$ cron
cron: can't lock /opt/var/run/cron.pid, otherpid may be 161: Resource temporarily unavailable
So now I have no cron running in the backround.
My firmware release : 1.9.2.7-8
Can U help me what did I wrong?
Thanks in advance:
MrPeeth
Hi,
i am not sure if upnp will work properly on the asus itself... no experience.
Simply open that port in the firewall and disable upnp.
Is the cron error permanent?
It seems that cron coulnd not write to /opt/var/run. Thats strange...
wengi
I still have a problem with mkdir /opt/tmp
This is after df :
$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2944 2944 0 100% /
/dev/discs/disc0/part1 195307264 128 195307136 0% /tmp/harddisk
/dev/discs/disc0/part2 3212240 65628 2983440 2% /tmp/harddisk/part1
after mkdir /opt/tmp:
mkdir: Cannot create directory `/opt/tmp': Read-only file system
What am I doing wrong?
Hi Wengi,
I restarted the router and cron displayed this error message:
Apr 17 19:21:30 /opt/sbin/cron[158]: (CRON) STARTUP (V5.0)
Apr 17 19:21:30 /opt/sbin/cron[158]: (*system*) BAD FILE MODE (/opt/etc/crontab)
I guess you I right!
What should I do?
thx:
MrPeeth
Hi!
Now I got this error:
mount: Mounting /dev/discs/disc0/part2 on /opt failed: No such file or directory
mount: Mounting /dev/discs/disc0/part3 on /tmp/harddisk failed: No such file or directory
swapon: Can't stat '/dev/discs/disc0/part1': No such file or directory
/usr/local/sbin/post-boot: /usr/local/sbin/post-boot: 45: /opt/etc/init.d/rc.unslung: not found
/usr/local/sbin/post-boot: /usr/local/sbin/post-boot: 48: /opt/etc/init.d/S10cron: not found
/usr/local/sbin/post-boot: /usr/local/sbin/post-boot: 49: transmission_watchdog: not found
/usr/local/sbin/post-boot: /usr/local/sbin/post-boot: 50: /opt/etc/init.d/S80busybox_httpd: not found
/usr/local/sbin/post-boot: /usr/local/sbin/post-boot: 51: /opt/etc/init.d/S10xinetd: not found
[admin@PSQ10 root]$
I guess it means something strange. :confused::eek:
I know the datas are in safe on the HDD but the config?
Thanks for any help:
MrPeeth
@funmen:
your mount points are wrong.
Check for the mount for /opt in post-boot!
@MrPeeth
same for you. It seems your /opt is not mounted.
have a look at "mount" and your post-boot.
wengi
@ALL
I started to review the whole tut. Do NOT use it at the moment.
This will take some days.
wengi
Hi wengi
i have a problem with swap mounting
[serge@ASUS root]$ mount -a
mount: Mounting /dev/discs/disc0/part1 on none failed: No such file or directory
#device Mountpoint FStype Options Dump Pass#
/dev/discs/disc0/part1 none swap sw 0 0
/dev/discs/disc0/part2 /opt ext3 rw,noatime 1 1
/dev/discs/disc0/part3 /tmp/mnt/disc0_3 ext3 rw,noatime 1 1
[serge@ASUS root]$ fdisk -l
Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2021 MB, 2021654528 bytes
63 heads, 62 sectors/track, 1010 cylinders
Units = cylinders of 3906 * 512 = 1999872 bytes
Device Boot Start End Blocks Id System
/dev/scsi/host0/bus0/target0/lun0/part1 1 257 501890 82 Linux swap
/dev/scsi/host0/bus0/target0/lun0/part2 258 514 501921 83 Linux
/dev/scsi/host0/bus0/target0/lun0/part3 515 1010 968688
83 Linux
and mounting partition 3 to /tmp/harddisk in fstab ignored at boot and set to /tmp/mnt/disc0_3
Thanks a lot for this tutorial, I have no Linux experience, so would never have succeded in setting up my WL500gP without this tutorial.
Had one or two problems though, first time around it wouldn't activate my swap automatically, but started over from scratch and it worked. Don't know what I did wrong.
Another problem was really weird though, when rebooting the router it would hang, and I discovered that it was writing an endless log file to /opt/var/log/message.0, it would simply carry on till my disk was full. I solved it by removing the link to the original syslog and prevent it from copying content between the two.
wengi I have installed on new asus wl-500gp v2 a version 10 of oleg's firmware.
I have used the deutsche HowTo to config the router.
I have actived from web interface (internal samba) the Samba.
In "Samba File Share" i've selected "All Partition", in "Default Access Level" I've selected "Read/Write" and, finally, I've imposted hostname adn workgroup.
Samba doen't work. If I try to find the share from my PC I get error.
I've tried to active the internal FTP. FTP doe'nt work!
If I type
ps xaf
I don't see in process list neither smb neither vsftpd
Can you help me?
Thanks a lot for this tutorial, I have no Linux experience, so would never have succeded in setting up my WL500gP without this tutorial.
Had one or two problems though, first time around it wouldn't activate my swap automatically, but started over from scratch and it worked. Don't know what I did wrong.
Another problem was really weird though, when rebooting the router it would hang, and I discovered that it was writing an endless log file to /opt/var/log/message.0, it would simply carry on till my disk was full. I solved it by removing the link to the original syslog and prevent it from copying content between the two.
Hi. I had the same problem but did not solve it yet. When I reboot it is fine but when I save to flash, commit and reboot (with appriopriate command) then I have the same issue. The drive is being filled in with the message.0 file (opt/var/log/) However I can't reslove that issue. I removed the 'executable' flag from /usr/local/sbin/pre-shutdown but I dont't think it helped...
Also I cannot connect to my samba with WinXp. When I go to the network neighbourhood or put the IP directly, my winxp opens the window with login to the guest account and pass. Whatever I put as a pass it won;t work. Can you help?
PS.
Nevertheless many thanks to Wengi for a great guide! :D
Problem could be in init startup script of syslogd.
This issue comes if you use the old syslog config with the new rc.unslung.
be sure you have both the newest version.
wengi
Thanks for the answer. Will try to update as soon as I get back home from work. Which also reminds me of another issue. Can someone please tell me where (or how) I can open port 22 for SSH so I can login from anywhere?
Also the issue with WinXP asking for password - anyone?
EDIT:
I found the answer for the SSH ine the forum - sorry for being so lame ;) Should've checked earlier :)
mrbazsee
21-04-2008, 21:31
This issue comes if you use the old syslog config with the new rc.unslung.
be sure you have both the newest version.
wengi
I have the same problem but have no idea what to do... :) I followed the steps as you writed down, so i guess there is the source of the problem. could you tell me what should i do now to make it work?
Hi,
@ALL:
The HowTo is updated!! Please double check if your installation is up to date before posting requests here!
Have an eye on rc.unslung and startup scripts! They changed!!!
@ mrbazsee, yarosh, sarlacc, Garluk and others:
Your problems are a result of a not working HowTo version.
There was a reason why i stated the review status in bold red at the beginning of the howto until today ;-)
wengi
EDIT: Please report if you have problems by following the HowTo from scratch! There may still be failures..
keeshardt
23-04-2008, 19:26
Wengi, thumbs up for your great work! I will try to follow your new tut one of the following days and report back if there is anything not working.
Thanks again!
May the force be with you http://www.redhotsweeps.com/forum/images/smilies/hae_73.gif http://www.redhotsweeps.com/forum/images/smilies/hae_61.gif
wengi
thohmann
24-04-2008, 21:48
Hi all,
I have installed Olegs Firmware 1.9.2.7-9 to my router. After reboot the router starts and web interface for configuration is running and reachable. I have installed dropbear and startet it. After this I worked with Putty in order to do the rest of my configuration. Internet access is ok, DNS is working. I have partinioned my disk to 512MB swap and rest for a share.
I tried to mount both partitions without success.
[root@WL500GP etc]$ mount -a
mount: Mounting /dev/discs/disk0/part1 on none failed: No such file or directory
mount: Mounting /dev/discs/disk0/part2 on /opt failed: No such file or directory
I tried to create necessary subdirectories but I got:
Cannot create directory
What did I wrong?
See System log:
Jan 1 01:00:06 kernel: SCSI subsystem driver Revision: 1.00
Jan 1 01:00:06 kernel: Initializing USB Mass Storage driver...
Jan 1 01:00:06 kernel: usb.c: registered new driver usb-storage
Jan 1 01:00:06 kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jan 1 01:00:06 kernel: Vendor: SAMSUNG Model: SP2514N Rev: 0811
Jan 1 01:00:06 kernel: Type: Direct-Access ANSI SCSI revision: 02
Jan 1 01:00:06 kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jan 1 01:00:06 kernel: SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
Jan 1 01:00:06 kernel: Partition check:
Jan 1 01:00:06 kernel: p1 p2
Jan 1 01:00:06 kernel: USB Mass Storage support registered.
Jan 1 01:00:07 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
May I ask for for help?
Thanks in advance,
Thomas
Are the partitions formated?
Do an e2fsck on the partitions.
If this does not help: give us some infos:
fdisk -l
free
mount
wengi
thohmann
25-04-2008, 10:33
Are the partitions formated?
Do an e2fsck on the partitions.
If this does not help: give us some infos:
fdisk -l
free
mount
wengi
Wengi,
thanks a lot for your quick feedback. I resolved the problem. I have formatted the disk with Partition Expert and tried to mount it without access. After a lot of trials (disk was identified and available under /dev/ide/host0/bus0/target0/lun0/partx,y,z but not mountable) I decided to re-partition the disk but this time using fdisk. After that I was able to mount all partitions execpt the biggest share which should be mounted to /tmp/harddisk via symbolic link from /tmp/mnt/disc0_6. ---strange behavior---
I did a ln -s /...... created the link and all partitions are working now.
Your tutorial said "If you allready partitioned your HDD as you want (incl. swap) go to the next chapter." ..... but I think this is not possible in all cases.
Let me thank you also for your great tutorial and your feedback.
Have a great and successful day.
BR, Thomas
Hi,
good to know it works.
I will mention this in the howto.
wengi
Hi all,
i edited the xinetd part and will do some more changes within the next days.
The problem is the file S10xinetd because it does not support the start|stop feature of rc.unslung.
Check your config if you are using xinetd.
wengi
thanks for the tut.
all working. web interface is slow for me...
anyone got samba and osx talking?
Nice tutorial, but now transmission is bringing the cpu to 100%.
Every time I operate on the web interface I have a new "transmission.cgi" and "busybox_httpd" between my tasks:
top - 00:58:44 up 12 min, 0 users, load average: 1.94, 1.38, 0.73
Tasks: 34 total, 3 running, 31 sleeping, 0 stopped, 0 zombie
Cpu(s): 96.3% user, 3.7% system, 0.0% nice, 0.0% idle
Mem: 13964k total, 12580k used, 1384k free, 812k buffers
Swap: 506008k total, 1504k used, 504504k free, 5124k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
274 admin 19 0 596 592 576 R 46.9 4.2 1:21.32 transmission.cg
244 admin 20 0 588 532 516 R 46.6 3.8 9:15.94 transmission.cg
279 admin 17 0 672 672 508 R 6.0 4.8 0:00.45 top
67 admin 9 0 480 400 376 S 0.3 2.9 0:00.73 watchdog
214 admin 9 0 644 560 492 S 0.3 4.0 0:03.24 dropbear
1 admin 8 0 472 336 336 S 0.0 2.4 0:02.58 init
2 admin 9 0 0 0 0 S 0.0 0.0 0:00.01 keventd
3 admin 18 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd_CPU0
5 admin 9 0 0 0 0 S 0.0 0.0 0:00.00 bdflush
6 admin 9 0 0 0 0 S 0.0 0.0 0:00.00 kupdated
59 admin 9 0 436 336 332 S 0.0 2.4 0:00.00 udhcpc
60 admin 9 0 0 0 0 S 0.0 0.0 0:00.00 khubd
52 admin 9 0 412 344 288 S 0.0 2.5 0:00.02 httpd
69 admin 8 0 384 300 264 S 0.0 2.1 0:00.05 ntp
76 admin 9 0 400 316 312 S 0.0 2.3 0:00.01 dropbear
93 admin 9 0 0 0 0 S 0.0 0.0 0:00.02 kjournald
4 admin 9 0 0 0 0 S 0.0 0.0 0:00.09 kswapd
96 admin 9 0 888 708 588 S 0.0 5.1 0:00.14 nmbd
98 admin 9 0 744 424 424 S 0.0 3.0 0:00.00 smbd
7 admin 9 0 0 0 0 S 0.0 0.0 0:00.48 mtdblockd
46 admin 9 0 312 244 236 S 0.0 1.7 0:00.01 telnetd
139 admin 9 0 400 312 304 S 0.0 2.2 0:00.01 busybox_httpd
57 admin 9 0 364 300 292 S 0.0 2.1 0:00.10 klogd
217 admin 9 0 1692 1632 1292 S 0.0 11.7 0:00.28 transmissiond
220 admin 9 0 1692 1632 1292 S 0.0 11.7 0:00.00 transmissiond
221 admin 9 0 1692 1632 1292 S 0.0 11.7 0:00.10 transmissiond
222 admin 9 0 556 552 424 S 0.0 4.0 0:00.51 sh
230 admin 9 0 452 404 356 S 0.0 2.9 0:00.02 busybox_httpd
231 admin 9 0 588 584 568 S 0.0 4.2 0:00.34 transmission.cg
94 admin 9 0 0 0 0 S 0.0 0.0 0:00.01 kjournald
255 admin 9 0 452 408 356 S 0.0 2.9 0:00.03 busybox_httpd
256 admin 9 0 596 592 576 S 0.0 4.2 0:00.35 transmission.cg
124 admin 9 0 400 332 304 S 0.0 2.4 0:00.02 syslogd
130 admin 9 0 408 376 352 S 0.0 2.7 0:00.01 cron
[admin@WL-HDD root]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:02 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
46 ? S 0:00 telnetd
52 ? S 0:00 httpd
57 ? S 0:00 klogd
59 ? S 0:00 udhcpc -i br0 -p /var/run/udhcpc_lan.pid -s /tmp/landhcpc
60 ? S 0:00 [khubd]
67 ? Ss 0:00 watchdog
69 ? Ss 0:00 \_ ntp
76 ? S 0:00 dropbear
214 ? Ss 0:03 \_ dropbear
222 pts/0 Ss 0:00 \_ -sh
278 pts/0 R+ 0:00 \_ ps axf
93 ? S 0:00 [kjournald]
94 ? S 0:00 [kjournald]
96 ? Ss 0:00 /usr/sbin/nmbd -D
98 ? Ss 0:00 /usr/sbin/smbd -D
124 ? S 0:00 /sbin/syslogd -m 0 -O /opt/var/log/messages.log -S -l 6 -s 0
130 ? Ss 0:00 /opt/sbin/cron
139 ? S 0:00 /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
230 ? S 0:00 \_ /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
231 ? S 0:00 | \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
244 ? R 8:59 | \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
255 ? S 0:00 \_ /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
256 ? S 0:00 \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
274 ? R 1:05 \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
217 ? Ss 0:00 transmissiond -p 65534 --nat-traversal -e -w 300 -u 10 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
220 ? S 0:00 \_ transmissiond -p 65534 --nat-traversal -e -w 300 -u 10 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
221 ? S 0:00 \_ transmissiond -p 65534 --nat-traversal -e -w 300 -u 10 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
[admin@WL-HDD root]$
Any idea?
There is a prob with transmission.cgi hanging after loading some kb of the webinterface.
I didnt solve this until now because i have no idea where to start from.
If you use ctrl+c to exit lynx or close your browser the transmission.cgi is hanging and using 100% CPU.
killall transmission.cgi
will help...
wengi
PS: The download itself is working normaly...
I know that the download is working fine, but without a web interface it is impossible to choose something to download and so on.
Are you using a different web interface for transmission?
No. i am using the command line atm.
But i am going to post a thread for this.
wengi
Hi,
there was a change in S05syslog:
Loglevel has to be 7 for transmission to log properly
please check:
OPTIONS="-m 0 -O $LOG_NEW/$LOGFILE -S -l 7 -s 0"wengi
Hi Wengi,
Please look at this piece from your startup script for syslog:
# Startup script for syslog
...
LOGFILE=messages.log
KERNLOGFILE=kern.log
LOG_OLD=/tmp
LOG_NEW=/opt/var/log
...
# Copy old syslog and create symlink to new
if [ ! -L /tmp/syslog.log ]; then
cat $LOG_OLD/$LOGFILE >> $LOG_NEW/$LOGFILE
mv $LOG_OLD/$LOGFILE $LOG_NEW/$KERNLOGFILE
ln -s $LOG_NEW/$LOGFILE $LOG_OLD/$LOGFILE
fi
...
If you REALLY want the name messages for syslog you need to use:
LOGFILE_OLD=syslog.log
LOGFILE_NEW=messages.log
But IMHO LOGFILE=syslog.log is an better approach!
Otherwise, many thanks for your work in community service... :D
Hi,
you are right. And logrotate also had the wrong filename.
I changed both to syslog.log.
messages was for historical reasons and transmission....
wengi
messages was for historical reasons...
Yes I know, I'm still searching for logs in /var/adm/messages... ;)
nunbaggi
12-05-2008, 22:19
Hi..
I think transmission is very slow downloadind..
Is it only possible to download one torrent at the time??
No,
you can download multiple torrents at the same time.
check your conf file.
wengi
alegatorul
13-05-2008, 18:39
USB stick not found
I installed last ver of Oleg fw..i schoose the steps to install dropbear..everything was ok..
1.i insert the USB stik, after i connected the cord extension..and i was wondering why doesn't blinck the stick..the led isn't show me that is worrking..
2.i wanna make partitions via a test stick with 256 mb..but i can't do fdisk cause i can't see the disk.. df show me only 3008..or some..not usb stick
what should i do?
p.s...samba and ftp disabled..as it should ...!:confused:
Hi,
which hardware are you using?
please post results of
lsmod
ls -la /dev/discs
This will show if the usb modules are loaded and which discs are known.
Also check your syslog for usb-specific entries.
wengi
hello wengi, I used your tutorial already a few months back ago.
because I saw you changed some stuff, I tried to set up the way you did it.
I noticed after a reboot that nothing was mounted for some reason and that's why I made a mix of your new how-to and old one.
it's working fine now, exept for 1 thing:
1096 root 32 R cat /tmp/syslog.log
this thing is coming up every time I start a reboot, or just randomly.
it uses almoast 100% of the cpu and writes full my whole /opt :eek:
I have 4gb of /opt space, but it just keeps writing till it has more than 3.5gb!
check your /opt/etc/init.d/S05syslogd and use the new version.
I do NOT recommend a mix of old and new files/configurations!!!
wengi
check your /opt/etc/init.d/S05syslogd and use the new version.
I do NOT recommend a mix of old and new files/configurations!!!
wengi
So where do I get this new syslog from? till I used your old boot version I had no problems, the only thing I touched the couple of days is the boot section.
also /usr/local/sbin/post-mount is NOT executed at boot, while it's executable.
therefor I use post-boot with the old startupscript.
also your newer boot files don't contain the drobear start neither does it contain the scsi mod to start usb drives :rolleyes:
EDIT:
never mind about the syslog, I found it:p
For all:
The behaviour of rc.unslung changed!!!
There is a start/stop parameter required for all new startup Scripts.
Check all startup scripts in /opt/etc/init.d/
Use the scripts from the howto.
wengi
So where do I get this new syslog from? till I used your old boot version I had no problems, the only thing I touched the couple of days is the boot section.
also /usr/local/sbin/post-mount is NOT executed at boot, while it's executable.
therefor I use post-boot with the old startupscript.
also your newer boot files don't contain the drobear start neither does it contain the scsi mod to start usb drives :rolleyes:
EDIT:
never mind about the syslog, I found it:p
Hi, wpte.
I've had problems too, when I switched to the newer firmware. In the end it turned out I've made some faults when configuring things.
- The newer firmware doesn't need to start the scsi mod for usb drives. It's in the original firmware already and you can enable it through the standard website of the asus.
- mounting is done through fstab
- the only content the post-boot file now has is 'dropbear' to start dropbear, as the unslung file is started in the post-mount file. If you think the post-mount file doesn't work, take a look a the rc.unslung file. There might be a problem there. (and remind to start it with a parameter, because its behaviour changed in order to gracefully stop and restart services/daemons.)
The problems I've had are in : http://www.wl500g.info/showthread.php?t=14255
And the solutions are in: http://wl500g.info/showthread.php?t=13785
(I had the syslogd and xinetd startup files mixed which resulted in strange errors and writing 4gb's of a log on a reboot.)
I still did not manage to run xinetd properly, but currently I don't have a service/daemon depending on that one.
I must say, after I've had these problems sorted out its stable, and best of all, data is 'more' secure after reboot/power failure/disconnect.
I'll start reading then;)
I don't like the firmware to do the mods, it feels a bit less in control then starting them yourself.
I also made some changes to the check before the disk mount.
I set them after every 10 mounts a quick check (fsck)
and after 50 mounts a full check (e2fsck -fy)
:)
I also made the disk spin down, wich is quite hard because every few moments mysql wants to read something... but sometimes it keeps quiet for 2 min, fair enough:D
I also made the disk spin down, wich is quite hard because every few moments mysql wants to read something... but sometimes it keeps quiet for 2 min, fair enough:D
Do you have cron running? This also prevents the hdd from spinning down.
I still did not manage to run xinetd properly, but currently I don't have a service/daemon depending on that one.
What is the problem with your xinetd?
Do you have cron running? This also prevents the hdd from spinning down.
well.. i run the swap now on a usb disk wich is actually faster than my hdd. also i set the limit on 1min, so if nothing accessed the drive in 1min, it spins down.
in the night it sometimes start again for cron wich is regulairy updating my websites an backing them up. (incredimental :p )
but apart from that, the drive spins down, only when pcs are on it spins up quite a lot :)
i changed a bit on the boot scripts now, just the final touch :)
but im not going to use the firmware mount, i like the manual one :D
also, i think fsck is less complete scanning than e2fsck because its done in 5min and the e2fsck in 30 :p
What is the problem with your xinetd?
Hi Serpent, I wish I'd know..
It seems that the service starts (there's a process), But the services that have to be started by xinetd (eg. vsftpd) will not start.
I'm 99% sure I've misconfigured something, but haven't had the the time to haunt that problem..
(problem for me was that I really need ftp, work related, so I installed proftpd, not as fast, but at least I have a FTP service running)
it might be something I don't see with my basic *nix knowledge, therefore I post the S10xinetd file (/opt/etc/init.d)
#! /bin/sh
#
# Startup script for xinetd
#
prefix=/opt
sbindir=${prefix}/sbin
NAME=xinetd
DAEMON=${sbindir}/${NAME}
DESC="xinetd"
PIDFILE="/var/run/xinetd.pid"
OPTIONS="-pidfile $PIDFILE"
CONFDIR="/opt/etc/xinetd.d"
# installation check
test -x ${DAEMON} || exit 0
case "$1" in
start)
if [ -z "`pidof ${NAME}`" ] ; then
printf "Starting ${DESC}: "
${DAEMON} ${OPTIONS}
printf "${NAME}.\n"
fi
;;
stop)
if [ -n "`pidof ${NAME}`" ]; then
printf "Stopping ${DESC}: "
kill -SIGTERM `cat $PIDFILE`
printf "${NAME}.\n"
for i in ${CONFDIR}/* ; do
if [ -n "`grep "^[[:space:]]*disable[[:space:]]*=[[:space:]]*no"
${i}`" ] ; then
daemon="`basename $(awk -F=
'/^[[:space:]]*server[[:space:]]*=[[:space:]]*.*/{print $2}' ${i})`"
printf "Stopping ${daemon}: "
kill "`pidof ${daemon}`" > /dev/null 2>&1
printf "${daemon}.\n"
fi
done
fi
;;
reload|reconfigure)
if [ -n "`pidof ${NAME}`" ]; then
printf "Reloading ${DESC}: "
kill -SIGHUP `cat $PIDFILE`
printf "${NAME}.\n"
fi
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
printf "Usage: $0
{start|stop|reload|reconfigure|restart|force-reload}\n" >&2
exit
;;
esac
exit 0
and my unslung
#! /bin/sh
# Start/stop all init scripts in /opt/etc/init.d
# starting them in numerical order and
# stopping them in reverse numerical order
#
if [ $# -ne 1 ]; then
printf "Usage: $0 {start|stop}\n" >&2
exit 1
fi
daemons=`echo $(/usr/bin/dirname $0)/S??*`
[ $1 = "stop" ] && daemons=`echo $daemons | /usr/bin/tr " " "\n" |
/usr/bin/sort -r`
for i in $daemons; do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
# Write to syslog
logger -t rc.unslung "$1 service $i"
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set $1
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i $1
;;
esac
done
right now.. I removed the vsftpd package, and the one in the firmware is also not working.
I've followed wengi's (section 10a from his tut.) advice on how to start 'something' (samba) with xinetd, but that didn't work, Samba wouldn't run, so I reverted to my old settings and samba did work again.
well.. i run the swap now on a usb disk wich is actually faster than my hdd. also i set the limit on 1min, so if nothing accessed the drive in 1min, it spins down.
in the night it sometimes start again for cron wich is regulairy updating my websites an backing them up. (incredimental :p )
but apart from that, the drive spins down, only when pcs are on it spins up quite a lot :)
i changed a bit on the boot scripts now, just the final touch :)
but im not going to use the firmware mount, i like the manual one :D
also, i think fsck is less complete scanning than e2fsck because its done in 5min and the e2fsck in 30 :p
Nice.. usb-swap-key is so much faster, I'm curious how long it survives in your setup. I've had it to, after 5-6 month I got all kinds of error which I couldn't explain.. switched the swap back to the hdd, and all the problems where gone... But you're right, the system is much faster with such a swap.
Nice.. usb-swap-key is so much faster, I'm curious how long it survives in your setup. I've had it to, after 5-6 month I got all kinds of error which I couldn't explain.. switched the swap back to the hdd, and all the problems where gone... But you're right, the system is much faster with such a swap.
hmm, yeh I got some weird things too, but I think it's more the spindown and windows think it's a timeout:rolleyes:
I use a pretty old key, it has been in the washing machine :p but I could not find errors on it while checking it, so I guess it's ok:)
but I could not find errors on it while checking it, so I guess it's ok
same here. but it seems that somehow the 'quality' of the flash mem is affected. (which is a known characteristic of flash mem when overwritten thousands/milllions of times)