Bug#616560: umountfs: nothing to unmount if / is on UBI volume

Pierre Ynard linkfanel at yahoo.fr
Tue Feb 19 10:45:24 GMT 2019

I think this was fixed a long time ago by:


> 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

More information about the Debian-init-diversity mailing list