Bug#940875: live-boot does not allow rootflags for plainroot backing filesystem mount
Source: live-boot
Version: 1:20190614
Severity: wishlist
Tags: patch
live-boot doesn't currently have a way to pass mount options for the
live system's backing store. I use plainroot off a btrfs subvol, which
requires the subvol=${subvolname} mount option to be passed.
I'm currently using the attached patch to make this work, but it's not a
general solution to passing mount options for live-boot backing stores,
it explicitly only supports my plainroot use case (but I'm unsure of how
much utility there would be on supporting mount options for other use
cases).
-- System Information:
Debian Release: 10.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-5-amd64 (SMP w/16 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -ur debian-live-10.0.0-amd64-standard/usr/lib/live/boot/9990-cmdline-old live/usr/lib/live/boot/9990-cmdline-old
--- debian-live-10.0.0-amd64-standard/usr/lib/live/boot/9990-cmdline-old 2019-06-14 09:55:07.000000000 +0000
+++ live/usr/lib/live/boot/9990-cmdline-old 2019-09-08 02:33:06.434062300 +0000
@@ -239,6 +239,12 @@
export PLAIN_ROOT
;;
+ plainrootflags=*)
+ PLAIN_ROOT="true"
+ PLAIN_ROOT_FLAGS="${_PARAMETER#plainrootflags=}"
+ export PLAIN_ROOT PLAIN_ROOT_FLAGS
+ ;;
+
skipunion)
SKIP_UNION_MOUNTS="true"
export SKIP_UNION_MOUNTS
diff -ur debian-live-10.0.0-amd64-standard/usr/lib/live/boot/9990-overlay.sh live/usr/lib/live/boot/9990-overlay.sh
--- debian-live-10.0.0-amd64-standard/usr/lib/live/boot/9990-overlay.sh 2019-06-14 09:55:07.000000000 +0000
+++ live/usr/lib/live/boot/9990-overlay.sh 2019-09-08 02:48:30.213017609 +0000
@@ -120,7 +120,7 @@
# we have a plain root system
mkdir -p "${croot}/filesystem"
log_begin_msg "Mounting \"${image_directory}\" on \"${croot}/filesystem\""
- mount -t $(get_fstype "${image_directory}") -o ro,noatime "${image_directory}" "${croot}/filesystem" || \
+ mount -t $(get_fstype "${image_directory}") -o "${PLAIN_ROOT_FLAGS:-ro}",ro,noatime "${image_directory}" "${croot}/filesystem" || \
panic "Can not mount ${image_directory} on ${croot}/filesystem" && \
rootfslist="${croot}/filesystem ${rootfslist}"
# probably broken:
Reply to: