Check if kbd_mode even exists before resetting the modes.
Run dpkg --configure -a in the preparation script.
Always auto-unmount with -y when exiting the chroot.