Bug#971639: live-boot: break=mountroot will make the boot process fail
Package: live-boot
Version: 1:20190614
Severity: important
Tags: upstream patch
When break=mountroot is specified in the kernel parameter, the
overiding maybe_break will pull in the functions defined in
/scripts/functions, overiding not only panic, but mount_* as well,
resulting those mount_* functions overriden by the stubs.
The following patch in #971638 can also fix this issue.
From 1dde5d3680e0f7c475b9d58cb8337fa99515bdaa Mon Sep 17 00:00:00 2001
From: Miao Wang <shankerwangmiao@gmail.com>
Date: Sun, 4 Oct 2020 04:57:40 +0800
Subject: [PATCH] Call orignial maybe_break in our overriden verison
Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
---
components/9990-initramfs-tools.sh | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/components/9990-initramfs-tools.sh b/components/9990-initramfs-tools.sh
index b251754..0954904 100755
--- a/components/9990-initramfs-tools.sh
+++ b/components/9990-initramfs-tools.sh
@@ -16,13 +16,12 @@ log_wait_msg ()
# Override maybe_break from scripts/functions
maybe_break()
-{
- if [ "${break}" = "$1" ]; then
- # Call original panic
- . /scripts/functions
- panic "Spawning shell within the initramfs"
- fi
-}
+(
+ # Call original maybe_break
+ # which will call panic defined there
+ . /scripts/functions
+ maybe_break "$@"
+)
# Override panic from scripts/functions
panic()
--
2.28.0
-- Package-specific info:
-- System Information:
Debian Release: 10.6
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-10-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Versions of packages live-boot depends on:
ii live-boot-initramfs-tools [live-boot-backend] 1:20190614
Versions of packages live-boot recommends:
pn live-boot-doc <none>
ii live-tools 1:20171207
pn rsync <none>
pn uuid-runtime <none>
Versions of packages live-boot suggests:
pn cryptsetup <none>
pn curlftpfs <none>
pn httpfs2 <none>
pn wget <none>
-- no debconf information
Reply to: