problem with config files in persistant home directory
The bugs place doesn't seem to be up, so I guess I'll post this here.
(When I wrote this I wrote it as if the recipient was one of the developers.)
Short story:
Can you make it not unmount my home directory when I have my config files saved in my home directory?
Long story:
I made a persistant home directory using the entire partition of my USB memory stick.
USB disk is now one partition formatted as ext2.
(I now have to boot with option home=/dev/sd[a..z]1 rather than home=scan.
Suggestion: if it finds an empty knoppix.img file on a partition, and the partition is ext2, then mount that partition as /home/knoppix or perhaps name the partition Knoppix and look for that.)
Back to the real problem.
I later saved the configuration on the same USB stick.
(booted with options: "knoppix home=/dev/sdb1 myconfig=scan")
(I added a line to the default knoppix.sh script to debug a bit.)
knoppix@ttyp0[knoppix]$ cat /mnt/sdb1/knoppix.sh
#!/bin/sh
[ "`id -u`" = "0" ] || { echo "You need root privileges to modify the system!" >&2 ; exit 1; }
[ -d "$1" ] && CONFIGS="$1/configs.tbz"
[ -f "$CONFIGS" ] || CONFIGS="/cdrom/KNOPPIX/configs.tbz"
[ -f "$CONFIGS" ] || CONFIGS="/mnt/floppy/configs.tbz"
if [ -f "$CONFIGS" ]; then
echo "Extracting config archive $CONFIGS..."
tar -jpPtf "$CONFIGS" | while read i; do rm -f "$i"; done
tar -jpPxf "$CONFIGS" ; chown -R knoppix.knoppix /home/knoppix
fi
mount >/tmp/mount.txt
So, when the configuration is loaded you can see that the home dir is mounted correctly.
knoppix@ttyp0[knoppix]$ cat /tmp/mount.txt
/dev/root on / type ext2 (rw)
/dev/cdrom on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw,size=817824k)
usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
/dev/sdb1 on /mnt/sdb1 type ext2 (rw,nosuid,nodev)
/mnt/sdb1 on /home/knoppix type none (rw,bind)
However, afterward it is unmounted for some strange reason.
knoppix@ttyp0[knoppix]$ mount
/dev/root on / type ext2 (rw)
/dev/cdrom on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw,size=817824k)
usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
/dev/sdb1 on /mnt/sdb1 type ext2 (rw,nosuid,nodev)
automount(pid592) on /mnt/auto type autofs (rw,fd=4,pgrp=592,minproto=2,maxproto=4)
I think this can be fixed by adding a few lines to /etc/rcS.d/S00knoppix-autoconfig Line 1058
Currently:
umount "$MYCONFMOUNTPOINT" 2>/dev/null
Suggestion:
Add a check to see if $MYCONFMOUNTPOINT is mounted as home.
(Sorry, I don't know shell scripting, so you'll have to finish this part on your own.)
Thanks,
Orson Jones