Skip to main content
1 of 2
slybloty
  • 1.3k
  • 4
  • 17
  • 39

You could try to make an alias for chroot to run your umount command or script after it completes, such as:

alias chroot='chroot; umount my/drive'

Or maybe use a different name for it.

Another option would be to have script running in the background watching for chroot processes and then umount the drive when the process is terminated.

slybloty
  • 1.3k
  • 4
  • 17
  • 39