Linux refuses to remove a directory that is a mount point, so <chroot>/proc
should still exist. And Linux refuses to remove a directory that is not empty, so <chroot>
should still exist.
Taking what you wrote at face value, you tried to unmount /proc
, not <chroot>/proc
. So the kernel tried to unmount the none
filesystem mounted on /proc
. You should unmount the none
filesystem mounted at <chroot>/proc
with umount <chroot>/proc
then rmdir <chroot>/proc <chroot>
.
Note that if you moved <chroot>
, you must pass the new name to umount
. You can check what the kernel thinks is mounted by looking in /proc/mounts
.
In case umount
complains because your /etc/mtab
has somehow gone out of sync, use umount -n
.
If even umount -n <chroot>/proc
doesn't work, it's probably because some process is still running inside the chroot to access it. Use lsof
to locate the process and kill it.