problem with config files in persistant home directory

Orson Jones <[email protected]>
Newsgroups gmane.linux.debian.knoppix
Message-ID <[email protected]>
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.) 
 
 [email protected][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. 
 
 [email protected][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. 
 
 [email protected][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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.