I think this was fixed a long time ago by: https://salsa.debian.org/debian/sysvinit/commit/14db7cc5f28dd368c6011ce1f8059deb62811938
> umountfs: Use more sophisticated sed expression for PROTECTED_MOUNTS > > This protects all mounts "up to the / ". However, such sed pattern > matches the root filesystem as "is mounted on path <slash> AND the > mount device starts with <slash>". If the root filesystem is mounted > from a node such as "aufs", the root line does not match, and all > mounts end up in PROTECTED_MOUNTS. > > I suppose the additional "/" constraint is a hack used to prevent > matching the initial "rootfs /" entry. I would rewrite this as: > > PROTECTED_MOUNTS="$(sed -n ':a;/^[^ ]* \//!{H;n;ba};{H;s/.*//;x;s/\n//;p}' > /proc/mounts)" > > This unmounts all entries down to the "base" root which is not the > kernel standard "rootfs". If / is mounted multiple times, this > unmounts all "stacked" entries as well. In the "aufs" case I described > above, this ensures the additional partitions are cleanly unmounted. As you can see, the issue it describes and meant to address is the same as here. So I believe this bug can be closed. -- Pierre Ynard