diff --git a/debian/changelog b/debian/changelog index f3805043..f8b3b122 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (2.441.5) UNRELEASED; urgency=medium + + [ Colin Watson ] + * Mount and unmount /dev recursively, to cope with setups where there are + interesting bind-mounts under /dev (e.g. loop devices bind-mounted by + LXD). LP: #1716465. + + -- Steve Langasek Mon, 11 Sep 2017 11:47:53 -0700 + livecd-rootfs (2.441.4) zesty; urgency=medium [ Balint Reczey ] diff --git a/live-build/functions b/live-build/functions index c72c59a2..f4dd0954 100644 --- a/live-build/functions +++ b/live-build/functions @@ -82,8 +82,7 @@ mount_image() { setup_mountpoint() { local mountpoint="$1" - mount --bind /dev "$mountpoint/dev" - mount devpts-live -t proc "$mountpoint/dev/pts" + mount --rbind /dev "$mountpoint/dev" mount proc-live -t proc "$mountpoint/proc" mount sysfs-live -t sysfs "$mountpoint/sys" mount -t tmpfs none "$mountpoint/tmp" @@ -144,11 +143,7 @@ umount_settle() { umount_partition() { local mountpoint=${1} mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" - for submnt in proc sys dev/pts dev tmp; - do - umount $mountpoint/$submnt - done - umount $mountpoint + umount -R $mountpoint udevadm settle if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then diff --git a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary index 0a1d51ce..e5c0d7a1 100755 --- a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary +++ b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary @@ -39,8 +39,7 @@ chroot binary/boot/squashfs.dir dpkg-divert --remove --local --rename /usr/sbin/ mv resolv.conf.tmp "binary/boot/squashfs.dir/etc/resolv.conf" umount "binary/boot/squashfs.dir/proc" umount "binary/boot/squashfs.dir/sys" -umount "binary/boot/squashfs.dir/dev/pts" -umount "binary/boot/squashfs.dir/dev" +umount -R "binary/boot/squashfs.dir/dev" umount "binary/boot/squashfs.dir/tmp" apt-get -qqy install squashfs-tools diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 32e57ca6..0773901f 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -155,8 +155,7 @@ umount "$SQUASH_ROOT" # Then we can start unmounting the "real" root: umount "binary/boot/squashfs.dir/proc" umount "binary/boot/squashfs.dir/sys" -umount "binary/boot/squashfs.dir/dev/pts" -umount "binary/boot/squashfs.dir/dev" +umount -R "binary/boot/squashfs.dir/dev" umount "binary/boot/squashfs.dir/tmp" apt-get -qqy install squashfs-tools