Simplify mount point handling by using /run/live instead of /lib/live/mount
Currently live-boot mounts following things:
/lib/live/mount/medium: the live media mounted read-only
/lib/live/mount/rootfs/filesystem.{squashfs,ext*,...}: the root fs image
/lib/live/mount/overlay: the copy-on-write content from aufs
/lib/live/mount/findiso: the loop-mounted iso image when using findiso
/lib/live/mount/persistence/*: persistent devices with copy-on-write overlay
Some of these mounts are mounted in /live before they are moved to their
correct place. Since the final root filesystem is mounted in /root and
run-init switches to it, special care needs to be taken when moving the
mount points around.
/lib/live/mount/overlay is not accessible any more in the live system:
$ df -h
/dev/loop0 169M 169M 0 100% /lib/live/mount/rootfs/root.squashfs
tmpfs 744M 0 744M 0% /lib/live/mount/overlay
overlay 1,5G 1001M 536M 66% /
The early initramfs stage mounts tmpfs on /run which doesn't need to be
moved once the final root filesystem is in place. The mount points do
not need much space and can live on /run/live without problems. Since
these mount points are run-time variable data, they fit perfectly for
/run and comply with FHS 3.0.
Therefore move /lib/live/mount to /run/live and skip the intermedia
/live mount points. This reduces code and complexity.
See also for the previous larger layout change:
https://lists.debian.org/debian-live/2012/10/msg00021.html
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
Closes: #886328