#Any external devices MNTD=`cat /proc/mounts | grep ' /media/' | awk '{print $2}'` for MDRV in $MNTD ; do if [ ! -d "$CHROOT$MDRV" ] ; then mkdir "$CHROOT$MDRV" fi mount -o bind "$MDRV" "$CHROOT$MDRV" done
The big news is that the chroot script is now BOOTABLE-DEBIAN-SAFE. I have taken out all of the file copy commands and put them into a separate script, called "synchroot" which makes a unique backup of all copied files. This script is only run when the user creates an empty file called ~/.synchroot (which is deleted when the script completes). This way, the files are only copied into the chroot when the user requests it, which may be never, in the case of those with custom setups. This will allow you to chroot into your OS2007 partition, for example, or into your bootable beta3 partition, without worrying about copying over any files. All you do is modify your ~/.chroot file. I have also included a closechroot script, which closes all chroot apps and unmounts the chroot. This is useful for changing chroots, etc. This also includes Benson's fixed debbie script.