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
Printable View
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
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
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
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)
and my unslungCode:#! /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
right now.. I removed the vsftpd package, and the one in the firmware is also not working.Code:#! /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
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.
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.
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)Quote:
but I could not find errors on it while checking it, so I guess it's ok
Ah well, I'm now totally on your script wengi:)
I still got some modified parts to keep it running in my way.
I also used the firmware scsi mod.
now I have only one problem, I can''t get my FTP to working because I mount part3 as /mnt
this was the original script to let the ftp work:
now I have this configuration:Quote:
#Mount for ftp
mount /dev/discs/disc0/part2 /tmp/mnt/disc0_2
mount /dev/discs/disc0/part3 /tmp/mnt/disc0_3
I expect to use the same options as the other mounts, but it''s not workingQuote:
#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 /mnt ext3 rw,noatime 1 1
/dev/discs/disc0/part2 /tmp/mnt/disc0_2 ext3 rw,noatime 1 1
/dev/discs/disc0/part3 /tmp/mnt/disc0_3 ext3 rw,noatime 1 1
/dev/discs/disc1/part1 /tmp/mnt/disc1 ext3 rw,noatime 1 1
The mounting stops at /tmp/mnt/disc0_2.
so I get this:
there should be 2 ways to solve this problem:Quote:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /
/dev/discs/disc0/part2 3850320 294316 3360416 8% /opt
/dev/discs/disc0/part3 476331024 118224836 333909892 26% /mnt
1 - get the mounts right
2 - make the vsftpd work on /mnt and /opt
the 2nd option is just a giant mystery for me how to do it:p
it must be some nvram... but how do you know witch:confused:
thanks wengi for the scripts, they are working better than the old ones:)
Hi,
check your fstab! Why do you mount to /mnt?
If you can give me a clean description of what you want to be mounted to where i can give you advice...
Normaly the fstab of my howto should be ok for your config.
I didn't try the ftp but maybe the ftpd will not follow the symlink /tmp/harddisk.
Try to change the rootdir in the ftp config in a second step.
wengi
EDIT: No news on transmission.
As far as I know the ftpd won't start as long no harddrives are mounted on /tmp/mnt
it's a value that can not be changed in the web admin as far as I know.
ok:
I want to mount the opt partition to: /opt and /tmp/mnt/disc0_2
the data partition to: /mnt and /tmp/mnt/disc0_3
I mount the data partition to /mnt because it's shorter (and I'm a bit lazy:p)
and I showed you my fstab in the previous post, I tought it should be done like that;)
Can you mount the partitions by hand?
Try to create the directories
/tmp/mnt/disc0_2
/tmp/mnt/disc0_3
/tmp/mnt/disc1
before mounting.
As far as i know using fstab the process itself should create the dirs before mounting, but maybe i am wrong or there is a bug...?!
wengi