Looks like Meanie's distro doesn't include all the postinstall stuff that comes with Klaus Weidner's Pocket Workstation. Can you just check whether or not you have the following files under your Qtopia environment ?
/etc/debroot.conf # PERMS -rw-rw-rw-
/etc/rc.d/init.d/zdebian # PERMS -rwxr-xr-x
If not then you need to create them. I'm working from memory here, but I think that this should be all that you need. Proceed at your own risk. Don't blame me if this bricks your Zaurus etc, etc :-
debroot.conf
### /etc/debroot.conf
#
# Configuration for the Debian chroot environment startup process
#
# IMPORTANT: boolean settings (DEB_FOO=1) are true if not empty, so
# comment out the entry (put a '#' at the start of the line) if you
# want to deactivate it.
# The chroot directory for the Debian installation. Modify as required.
DEBROOT=/mnt/card/debroot
# The PATH to be used for programs running inside the chroot. Take your
# pick - the first one lets local programs override system defaults,
# the second one prevents that.
#
DEB_PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/games
#DEB_PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:$HOME/bin:/usr/X11R6/bin:/usr/games
# Disable this if you have a fixed QPE that permits VT switching
#DEB_QPE_WARNING=1
# Mount proc inside the chroot=
#DEB_DO_MOUNTS=1
# The following files are copied from the native
# system into the chroot environment on bootup.
# Use a path relative to '/', but omit the leading
# slash.
#
# The files are modified to contain '#' comments,
# so don't do this for files that don't support
# '#' as a comment character
#
#DEB_COPY_INTO_CHROOT="etc/resolv.conf"
# The following files are copied in the opposite
# direction - from the chroot into the native
# environment on bootup.
#
#DEB_COPY_INTO_NATIVE="etc/hosts"
# A list of services to launch on bootup inside
# the chroot. Make sure to avoid conflicts with the native
# system - don't try to run two network servers on the
# same port.
#
#DEB_RUN_SERVICES=""
#DEB_RUN_SERVICES="mysql"
#DEB_RUN_SERVICES="inetd ssh lpd"
#DEB_RUN_SERVICES="ssh"
# Launch the VNC server in the backround on startup?
#DEB_RUN_VNCSERVER=1
# Lauch framebuffer VNC client?
#DEB_RUN_FBVNC=1
#
#DEB_ZAPM_PROXY=1
# If you already have a 'zapmd' startup script (one is
# included in the native X11 environment for the zaurus),
# disable this entry.
#DEB_RUN_ZAPMD=1
# Start the rootcmd server? It forwards shell commands sent
# by 'cru' from the chroot environment to the native system.
# This way, you can run 'cru cardctl eject' and avoid the need
# to put PCMCIA tools and configuration into the chroot.
#
DEB_ROOTCMD=1
I've commented out everything except what you need to get the rootcmd server started.
zdebian
#!/bin/bash
## sh [linked to ash] doesn't exec cleanly, so set to bash
SHELLCMD=/bin/bash
DEBCONF=/etc/debroot.conf
[ ! -f $DEBCONF ] && {
echo "Can't find $DEBCONF, aborting..."
exit 1
}
. $DEBCONF
[ "$DEBROOT" ] || exit 1
if [ ! -d "$DEBROOT" ]; then
echo "Waiting for $DEBROOT to be fscked..."
while ps ax | grep -v grep | grep e2fsck >/dev/null
do
sleep 1
done
sleep 1
if [ ! -d "$DEBROOT" ]; then
echo "Waiting for $DEBROOT to be mounted..."
sleep 10
fi
fi
cd $DEBROOT || exit 1
ROOTCMD_FIFO=$DEBROOT/dev/rootcmd
ZAPMD=/dev/zapmd
rootcmd_server_start () {
rm -f $ROOTCMD_FIFO
mkfifo -m 600 $ROOTCMD_FIFO
(
while true
do
exec <$ROOTCMD_FIFO
read TTY CMD
$SHELLCMD -c "$CMD" $DEBROOT/$TTY 2>&1
sleep 1
done
) &
echo $! >/var/run/rootcmd.pid
}
rootcmd_server_stop () {
kill $(cat /var/run/rootcmd.pid)
rm -f /var/run/rootcmd.pid
}
zapm_proxy_start () {
rm -f $DEBROOT$ZAPMD
mkfifo $DEBROOT$ZAPMD
(
while true
do
[ -e $DEBROOT$ZAPMD ] || exit 0
exec < $DEBROOT$ZAPMD
read C
[ -e $ZAPMD ] && echo "$C" > $ZAPMD
sleep 1
done
) &
echo $! >/var/run/zapm_proxy.pid
}
zapm_proxy_stop () {
kill $(cat /var/run/zapm_proxy.pid)
rm -f /var/run/zapm_proxy.pid
rm -f $DEBROOT$ZAPMD
}
CR="env -i PATH=$DEB_PATH TERM=vt102 HOME=$HOME chroot $DEBROOT"
commented_copy_into_chroot () {
[ -f "/$1" ] && (
echo "### Do not edit this file - it was copied"
echo "### from the native system's /$1 by $0"
echo "### Edit $DEBCONF to deactivate this."
echo
cat "/$1"
echo
echo "### Do not edit this file - it was copied"
echo "### from the native system's /$1 by $0"
echo "### Edit $DEBCONF to deactivate this."
) > "$1"
}
commented_copy_into_native () {
[ -f "$1" ] && (
echo "### Do not edit this file - it was copied"
echo "### from $DEBROOT/$1 by $0"
echo "### Edit $DEBCONF to deactivate this."
echo
cat "$1"
echo
echo "### Do not edit this file - it was copied"
echo "### from $DEBROOT/$1 by $0"
echo "### Edit $DEBCONF to deactivate this."
) > "/$1"
}
case "$1" in
start)
if [ "$DEB_DO_MOUNTS" ]; then
[ ! -f proc/version ] && mount none proc -t proc
## FIXME: following breaks if debroot on cf card
# [ -L /mnt/cf ] && ln -sf $DEBROOT/mnt/cf /mnt/cf
fi
[ "$DEB_COPY_INTO_CHROOT" ] && for F in $DEB_COPY_INTO_CHROOT
do
commented_copy_into_chroot $F
done
[ "$DEB_COPY_INTO_NATIVE" ] && for F in $DEB_COPY_INTO_NATIVE
do
commented_copy_into_native $F
done
[ "$DEB_ROOTCMD" ] && rootcmd_server_start
[ "$DEB_ZAPM_PROXY" ] && zapm_proxy_start
[ "$DEB_RUN_SERVICES" ] && for S in $DEB_RUN_SERVICES
do
$CR /etc/init.d/$S start
done
[ "$DEB_RUN_VNCSERVER" ] && /usr/local/bin/Vncserver
[ "$DEB_RUN_FBVNC" ] && /usr/local/bin/Fbvnc
;;
stop)
if [ "$DEB_DO_MOUNTS" ]; then
umount proc
fi
[ "$DEB_ROOTCMD" ] && rootcmd_server_stop
[ "$DEB_ZAPM_PROXY" ] && zapm_proxy_stop
[ "$DEB_RUN_SERVICES" ] && for S in $DEB_RUN_SERVICES
do
$CR /etc/init.d/$S stop
done
[ "$DEB_RUN_VNCSERVER" ] && echo "Not stopping Xvnc, do that manually if you need to."
;;
restart)
$0 stop
$0 start
;;
esac
#echo "zdebian finished."
exit 0
Run /etc/rc.d/init.d/zdebian from the command line, then start up Debian and try "cru cardctl status" again. If this works, you can create the links so that zdebian (and rootcmd) will start up automatically when you boot the Z.
Create the necessary links to start up zdebian during boot :-
# ln -s /etc/rc.d/init.d/zdebian /etc/rc.d/rc5.d/S50zdebian
(or, rather that creating S50zdebian, you could just run "/etc/rc.d/init.d/zdebian start" when you start up Debian)
# ln -s /etc/rc.d/init.d/zdebian /etc/rc.d/rc0.d/K50zdebian
# ln -s /etc/rc.d/init.d/zdebian /etc/rc.d/rc1.d/K50zdebian
If everything is working okay, then my original script at the start of this thread should now work.
Good Luck!
Ian