I have already tried mounting the filesystems without checking like this:
sudo -- mount -t proc /proc $chroot_dir/proc
sudo -- mount --bind /tmp $chroot_dir/tmp
However, this would corrupt the parent OS session if already mounted, and I would have to restart the OS. I want to check if they're mounted beforehand.
You can see in
/etc/mtabwhat's currently mounted:And analogously for
tmp.