[debian-knoppix] problem with config files in persistant home directory
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.
(diff file below)
Thanks,
Orson Jones
PS. I added a couple lines to copy the skel files to /home/knoppix when you
don't load a persistent home directory.
1009,1011d1008
< else
< #if home not mounted from anywhere, then copy the skel files over.
< cp -r /etc/skel/* /home/knoppix
1060,1061d1056
< #echo "HomeDevice: $MYHOMEDEVICE ConfDevice: $MYCONFDEVICE HomeMount:
$MYHOMEMOUNTPOINT"
< if [[ "$MYHOMEDEVICE" != "$MYCONFDEVICE" && "$MYHOMEMOUNTPOINT" !=
"$MYCONFDEVICE" ]]; then
1065d1059
< fi
_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix
Reply to: