[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#261829: package is unusable in its current state

Package: diskless
Severity: grave

We've tried to setup diskless /diskless-image-simple and:

1) There seems to be an inconsistency in the naming scheme. Sometimes
configs are taken from the master from /etc/diskless-host (which does not
		exist) and in some version from /etc/diskless-image... on the client
only diskless-image is checked in /sbin/init , so booting a client fails.

2) If one fixes this one realizes that in /sbin/init only the /etc 
filesystem gets mounted all the rest (/dev /var /tmp) the client is 
supposed to deal with via the init.orig , i.e.
/etc/init.d/rcS -> /etc/rcS.d/S35mountall script. However that one does not
mount anything nfs related (nonfs nosmb etc in the very top of that file).
I suggest to mount everything in the /sbin/init wrapper like below (to not
		having to modify the standard S35mountall script etc).
Furthermore the WARNING: master... is almost invisible as the system boots
to fast, so there should be a timeout like the sleep 5 inserted below
(as this is only for administration it won't delay the standard client
 boot process). Also if the /etc/diskless-image/config does not exist or
the system cannot mount any /var /dev /tmp scripts for a client the system
should wait some minutes and then halt instead of go on booting...

# Don't do anything special if root is rw (ie master system).
if touch /test-rw 2>/dev/null
        rm /test-rw 2>/dev/null
        echo "WARNING: master system installed" >&2
        sleep 5
        exec /sbin/init.orig $*
        echo "FATAL ERROR: exec /sbin/init.orig failed" >&2
        exit 1

# Try and find configuration file
if [ -f /etc/diskless-image/config ]
        # Load config file
        . /etc/diskless-image/config

        # Get IP address, need to mount /proc first
        mount -n none /proc -t proc

        IP=`ifconfig | grep -A1 eth0 | grep -v eth0 | sed 's/^.*inet addr:\([0-9\.]\+\).*$/\1/'`
        echo "Client IP address is $IP"

        # Mount client's /etc directory
        echo -n "Mounting NFS-root directories..."
        echo -n "etc.."
        mount -n $nfsserver:/$nfshostsdir/$IP/etc /etc -orw,nolock >/dev/null

        # Update entries in /etc/mtab
        rm -f /etc/mtab~ /etc/nologin >/dev/null
        : > /etc/mtab >/dev/null
        mount -o remount / >/dev/null
        mount -o remount /etc >/dev/null
        echo -n "proc.."
        mount -o remount /proc >/dev/null

        echo -n "var.."
        mount $nfsserver:/$nfshostsdir/$IP/var /var -orw,nolock >/dev/null
        echo -n "dev.."
        mount $nfsserver:/$nfshostsdir/$IP/dev /dev -orw,nolock >/dev/null
        echo -n "tmp.."
        mount $nfsserver:/$nfshostsdir/$IP/tmp /tmp -orw,nolock >/dev/null

        # report success
        echo "done."
        echo "ERROR: Cannot find image config file"
        echo "       Not mounting NFS-root directories"

# Only should get here if something went wrong
exec /sbin/init.orig $*
echo "FATAL ERROR: exec /sbin/init.orig failed" >&2
exit 1

3) On the master: The /usr/lib/diskless-image should clearly go to /etc/diskless-image
and the former /etc/diskless-image should stay in /etc/diskless-host, as they contain
config files (e.g. templates in /usr/lib/diskless-image/templates).

4) The /lib/modules directory is not client writable thus it should become a
symlink to say /var/lib/modules

4) Furthermore there seems to be no documentation at all. While there is
some xml.gz file in /usr/share/doc... no html/text documentation is generated, as install-docs and dhelp are not found in the postinst script.

5) There are many minor issues like /etc/network/interfaces is getting
copied from the master (making the client fail as it gets the wrong network
		settings) which could be fixed by supplying a
template/network/interfaces... Also the diskless-newhost update rules in template/config require quite some updates to make certain programs work...

Reply to: