[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696495: marked as done (underlying filesystems are hidden when using custom persistency with aufs)



Your message dated Tue, 12 Feb 2013 07:32:31 +0000
with message-id <E1U5ALv-0000d6-17@franck.debian.org>
and subject line Bug#696495: fixed in live-boot 3.0.0-1
has caused the Debian Bug report #696495,
regarding underlying filesystems are hidden when using custom persistency with aufs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
696495: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696495
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-boot
Version: 3.0~b10-1
Severity: important
Tags: patch

With commit 77dab1cb394c5fc2b9a848c6297d24f65a3b8259 the underlying
filesystems are no longer visible, because they are mounted to
/lib/live/mount before the root filesystem is mounted and masks them.

The attached patch fixes this by reverting part of that commit.
Filesystems are again mounted below /live first then moved
after the root filesystem is mounted. The move loop also moves all
filesystems mounted below /live and thus simplifies the code.

Gaudenz

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 5266dc2df1867d2a56dd6aa91c4745cb6d9fe57e Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaudenz@debian.org>
Date: Fri, 21 Dec 2012 16:40:23 +0100
Subject: [PATCH] Fix mounting of rootfs, cow and medium filesystems

This partly reverts commit 77dab1cb394c5fc2b9a848c6297d24f65a3b8259. The
underlying filesystems have to be moved to (/root)/lib/live/mount after the
root filesystems is mounted. Otherwise they will be masked by the root
filesystem.

This code reverts to mounting everything under /live in the initrd and
only moves the mount points to (/root)/lib/live/mount after the final root
filesystems is mounted.
---
 scripts/boot/9990-main.sh         |   23 +++++++++++++----------
 scripts/boot/9990-misc-helpers.sh |   14 +++++++-------
 scripts/boot/9990-overlay.sh      |   23 -----------------------
 3 files changed, 20 insertions(+), 40 deletions(-)

diff --git a/scripts/boot/9990-main.sh b/scripts/boot/9990-main.sh
index c696781..fd10e5d 100755
--- a/scripts/boot/9990-main.sh
+++ b/scripts/boot/9990-main.sh
@@ -135,6 +135,19 @@ Main ()
 		mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}"
 	fi
 
+	# At this point /root should contain the final root filesystem.
+	# Move all mountpoints below /live into /root/lib/live/mount.
+	# This has to be done after mounting the root filesystem to /
+	# otherwise these mount points won't be accessible from the running system.
+	for _MOUNT in $(cat /proc/mounts | cut -f 2 -d " " | grep -e "^/live/")
+	do
+		local newmount
+		newmount="${rootmnt}/lib/live/mount/${_MOUNT#/live/}"
+		mkdir -p "${newmount}"
+		mount -o move "${_MOUNT}" "${newmount}" > /dev/null 2>&1 || \
+		mount -o bind "${_MOUNT}" "${newmount}" > /dev/null || \
+		log_warning_msg "W: failed to move or bindmount ${_MOUNT} to ${newmount}"
+	done
 
 	if [ -n "${ROOT_PID}" ]
 	then
@@ -151,9 +164,6 @@ Main ()
 			;;
 	esac
 
-	# Move to the new root filesystem so that programs there can get at it.
-	mkdir -p /root/lib/live/mount/medium
-	mount --move /live/medium /root/lib/live/mount/medium
 
 	# aufs2 in kernel versions around 2.6.33 has a regression:
 	# directories can't be accessed when read for the first the time,
@@ -161,13 +171,6 @@ Main ()
 	# when booting FAI, this simple workaround solves it
 	ls /root/* >/dev/null 2>&1
 
-	# Move findiso directory to the new root filesystem so that programs there can get at it.
-	if [ -d /live/findiso ]
-	then
-		mkdir -p /root/lib/live/mount/findiso
-		mount -n --move /live/findiso /root/lib/live/mount/findiso
-	fi
-
 	# if we do not unmount the ISO we can't run "fsck /dev/ice" later on
 	# because the mountpoint is left behind in /proc/mounts, so let's get
 	# rid of it when running from RAM
diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh
index 71ba7e1..8219ea4 100755
--- a/scripts/boot/9990-misc-helpers.sh
+++ b/scripts/boot/9990-misc-helpers.sh
@@ -742,7 +742,7 @@ mount_persistence_media ()
 	device=${1}
 	probe=${2}
 
-	backing="${rootmnt}/lib/live/mount/persistence/$(basename ${device})"
+	backing="/live/persistence/$(basename ${device})"
 
 	mkdir -p "${backing}"
 	old_backing="$(where_is_mounted ${device})"
@@ -966,7 +966,7 @@ find_persistence_media ()
 	white_listed_devices="${2}"
 	ret=""
 
-	black_listed_devices="$(what_is_mounted_on ${rootmnt}/lib/live/medium)"
+	black_listed_devices="$(what_is_mounted_on /live/medium)"
 
 	for dev in $(storage_devices "${black_listed_devices}" "${white_listed_devices}")
 	do
@@ -1263,7 +1263,7 @@ do_union ()
 
 get_custom_mounts ()
 {
-	# Side-effect: leaves $devices with persistence.conf mounted in ${rootmnt}/lib/live/mount/persistence
+	# Side-effect: leaves $devices with persistence.conf mounted in /live/persistence
 	# Side-effect: prints info to file $custom_mounts
 
 	local custom_mounts devices bindings links
@@ -1302,7 +1302,7 @@ get_custom_mounts ()
 
 		if [ -n "${DEBUG}" ] && [ -e "${include_list}" ]
 		then
-			cp ${include_list} ${rootmnt}/lib/live/mount/persistence/${persistence_list}.${device_name}
+			cp ${include_list} /live/persistence/${persistence_list}.${device_name}
 		fi
 
 		while read dir options # < ${include_list}
@@ -1487,7 +1487,7 @@ activate_custom_mounts ()
 		rootfs_dest_backing=""
 		if [ -n "${opt_link}"]
 		then
-			for d in ${rootmnt}/lib/live/mount/rootfs/*
+			for d in /live/rootfs/*
 			do
 				if [ -n "${rootmnt}" ]
 				then
@@ -1519,7 +1519,7 @@ activate_custom_mounts ()
 			# has its own directory and isn't nested with some
 			# other custom mount (if so that mount's files would
 			# be linked, causing breakage.
-			cow_dir="${rootmnt}/lib/live/mount/overlay/lib/live/mount/persistence/$(basename ${links_source})"
+			cow_dir="/live/overlay/lib/live/mount/persistence/$(basename ${links_source})"
 			mkdir -p ${cow_dir}
 			chown_ref "${source}" "${cow_dir}"
 			chmod_ref "${source}" "${cow_dir}"
@@ -1536,7 +1536,7 @@ activate_custom_mounts ()
 			# bind-mount and union mount are handled the same
 			# in read-only mode, but note that rootfs_dest_backing
 			# is non-empty (and necessary) only for unions
-			cow_dir="${rootmnt}/lib/live/mount/overlay/${dest}"
+			cow_dir="/live/overlay/${dest}"
 			if [ -e "${cow_dir}" ] && [ -z "${opt_link}" ]
 			then
 				# If an earlier custom mount has files here
diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh
index dba042b..098111c 100755
--- a/scripts/boot/9990-overlay.sh
+++ b/scripts/boot/9990-overlay.sh
@@ -383,29 +383,6 @@ setup_unionfs ()
 		esac
 	done
 
-	# move all /live mountpoints that the custom persistence
-	# system depends on into /lib/live on the root filesystem
-	for _DIRECTORY in rootfs
-	do
-		if [ -d "/live/${_DIRECTORY}" ]
-		then
-			mkdir -p "${rootmnt}/lib/live/mount/${_DIRECTORY}"
-
-			for _MOUNT in $(ls /live/${_DIRECTORY})
-			do
-				mkdir -p "${rootmnt}/lib/live/mount/${_DIRECTORY}/${_MOUNT}"
-				mount -o move "/live/${_DIRECTORY}/${_MOUNT}" "${rootmnt}/lib/live/mount/${_DIRECTORY}/${_MOUNT}" > /dev/null 2>&1 || \
-					mount -o bind "/live/${_DIRECTORY}/${_MOUNT}" "${rootmnt}/lib/live/mount/${_DIRECTORY}/${_MOUNT}" || \
-					log_warning_msg "W: failed to mount /live/${_DIRECTORY}/${_MOUNT} to ${rootmnt}/lib/live/mount/${_DIRECTORY}/${_MOUNT}"
-			done
-		fi
-	done
-
-	mkdir -p "${rootmnt}/lib/live/mount/overlay"
-	mount -o move /live/overlay "${rootmnt}/lib/live/mount/overlay" > /dev/null 2>&1 || \
-		mount -o bind /live/overlay "${rootmnt}/lib/live/mount/overlay" || \
-		log_warning_msg "W: failed to mount /live/overlay to ${rootmnt}/lib/live/mount/overlay"
-
 	# Adding custom persistence
 	if [ -n "${PERSISTENCE}" ] && [ -z "${NOPERSISTENCE}" ]
 	then
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
Source: live-boot
Source-Version: 3.0.0-1

We believe that the bug you reported is fixed in the latest version of
live-boot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 696495@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-boot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 12 Feb 2013 08:23:17 +0100
Source: live-boot
Binary: live-boot live-boot-doc live-boot-initramfs-tools
Architecture: source all
Version: 3.0.0-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-boot  - Live System Boot Scripts
 live-boot-doc - Live System Boot Scripts (documentation)
 live-boot-initramfs-tools - Live System Boot Scripts (initramfs-tools backend)
Closes: 696494 696495 697873
Changes: 
 live-boot (3.0.0-1) unstable; urgency=low
 .
   [ Daniel Baumann ]
   * Updating manpage year handling for 2013.
 .
   [ Richard Nelson ]
   * Replace noprompt with noeject on manpage.
 .
   [ Daniel Baumann ]
   * Updating noeject description in manpage.
 .
   [ chals ]
   * Updating Spanish translation in respect to noeject.
 .
   [ Daniel Baumann ]
   * Dropping dpkg compression level.
   * Calling df with -P to avoid line wraps with overly long mountpoints.
 .
   [ Tails developers ]
   * Improving test for /etc/fstab.d support by testing for its existence
     instead of /run's one.
 .
   [ Daniel Baumann ]
   * Removing some dead code in netbase parts.
 .
   [ Gaudenz Steinlin ]
   * Fixing support for multiple squashfs images (Closes: #696494).
   * Fixing mounting of rootfs, cow and medium filesystems (Closes:
     #696495).
 .
   [ Daniel Baumann ]
   * Correcting persistence-label handling fwrt/ legacy live-boot 2.x
     support, thanks to Mike Gach <gach.mqt@gmail.com> (Closes: #697873).
Checksums-Sha1: 
 4b84d9ee3ccd6766f6e473bd09649925680ed44e 1369 live-boot_3.0.0-1.dsc
 18204a278c603005415dbcc93701421bc3deff74 58680 live-boot_3.0.0.orig.tar.xz
 b6f4422eaad02d9c41e265c9063466f5f8fb3d23 22336 live-boot_3.0.0-1.debian.tar.xz
 e9ff4053da5b1aba67a0f1d4e2705ea38912537f 48746 live-boot_3.0.0-1_all.deb
 372943dfba16ce1c99537d4816d1ae3b6eabf915 51726 live-boot-doc_3.0.0-1_all.deb
 f43e6e59f93a7e8d8b86b438fa0cb3c865f7a952 26280 live-boot-initramfs-tools_3.0.0-1_all.deb
Checksums-Sha256: 
 3fdb8f02bb3e5cce457af2e973922a1e9be6968c05f50d2e530c8d58088fd35b 1369 live-boot_3.0.0-1.dsc
 277b999f4fcd1511532479e21e8facbce2c288e1f3ed80bcf2cb54cec66615f0 58680 live-boot_3.0.0.orig.tar.xz
 868afb2615e4cfc471ec0ba574d963705d3a81ed0bbdf5fb5791416c70953db0 22336 live-boot_3.0.0-1.debian.tar.xz
 df253693957a1769dc48e477b745170d40999f3ce24261481d384778289a8387 48746 live-boot_3.0.0-1_all.deb
 58ee0163efe688a065392b1f6214f1359a48754325efc18b6d31a3433c4e05c0 51726 live-boot-doc_3.0.0-1_all.deb
 ca23c361bb08c886565c1daa3da4aac8f1f759bb7f6b828668b84a17b95be6fb 26280 live-boot-initramfs-tools_3.0.0-1_all.deb
Files: 
 61882150301dfe1137200d96d731de00 1369 misc optional live-boot_3.0.0-1.dsc
 a6859198d0782ca9c968b2f210eb9212 58680 misc optional live-boot_3.0.0.orig.tar.xz
 8fd7a18ad8e7c8ec5d80d4c03a98bc7d 22336 misc optional live-boot_3.0.0-1.debian.tar.xz
 9c1d72dcc5279a2a368ab0d84e40373e 48746 misc optional live-boot_3.0.0-1_all.deb
 13623fe33a1b96e291c8c244fa4a05bf 51726 doc optional live-boot-doc_3.0.0-1_all.deb
 dd630cd123e12348800670f97326c46d 26280 misc optional live-boot-initramfs-tools_3.0.0-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlEZ7tkACgkQ+C5cwEsrK566zwCfY/CoOcNqpe7n9TF3nxXwS6bc
qaEAoI3TfVvhGfo4wP47dr7Ykd32TaHA
=x8xo
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: