[Bug 1940514] Re: It will prompt "Failed to unmount /oldroot" when shutdown or reboot
Bin Li
1940514 at bugs.launchpad.net
Mon Jan 17 04:24:01 UTC 2022
Verified on 22.04, this issue is fixed.
And on 20.04, I installed finalrd 9 and plymouth 0.9.5, this issue is also gone.
Here is the patch for finalrd, but for plymouth, there are so many
changes from 0.9.4, so I gave up to find the patches, let's fix this
issue on 22.04.
diff --git a/finalrd.service b/finalrd.service
index e67d177..b31705f 100644
--- a/finalrd.service
+++ b/finalrd.service
@@ -6,6 +6,7 @@ Documentation=man:finalrd(1)
After=local-fs.target boot.mount boot.automount
Wants=local-fs.target
Conflicts=shutdown.target umount.target
+Before=shutdown.target
DefaultDependencies=no
[Service]
diff --git a/finalrd.sh b/finalrd.sh
index cffa94b..f623f8c 100755
--- a/finalrd.sh
+++ b/finalrd.sh
@@ -25,12 +25,11 @@ mount -o remount,exec /run
# our shutdown sequence is to be controled by systemd-shutdown which
# will unmount all the things, and run our hooks
-LD=`grep -Eow '/.*ld-.*.so' /proc/self/maps | head -1`
for bin in /bin/sh /lib/systemd/systemd-shutdown
do
rm -f /run/finalrd-libs.conf
touch /run/finalrd-libs.conf
- for lib in `$LD --list $bin | grep -Eow "/.* "`
+ for lib in `LD_TRACE_LOADED_OBJECTS=1 $bin | grep -Eow "/.* "`
do
if [ "$lib" = '=>' ]
then
** No longer affects: mdadm
** Also affects: plymouth (Ubuntu)
Importance: Undecided
Status: New
** Changed in: oem-priority
Status: Triaged => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to finalrd in Ubuntu.
https://bugs.launchpad.net/bugs/1940514
Title:
It will prompt "Failed to unmount /oldroot" when shutdown or reboot
Status in OEM Priority Project:
Won't Fix
Status in finalrd package in Ubuntu:
New
Status in plymouth package in Ubuntu:
New
Bug description:
Summary]
[ThinkPad]It will prompt error message after shutdown or reboot.
[Reproduce steps]
1. Preload Ubuntu OS 20.04.2
2. Boot and enter to the os
3. Shutdown or reboot the machine, it wouldn't show below error by default.
4. Then installed finalrd, and do reboot or shutdown.
Expected Result:
It will not prompt error message after shutdown or reboot.
Actual result:
It will prompt error message after shutdown or reboot as the attached 'the page after shutdown or reboot.jpg'.
sd-umoun[2406]: Failed to unmount /oldroot: Device or resource busy
sd-umoun[2407]: Failed to unmount /oldroot/dev/pts: Device or resource busy
sd-umoun[2408]: Failed to unmount /oldroot/dev: Device or resource busy
shutdown[1]: Failed to finalize file systems, ignoring
We met this issue on several OEM projects, such as
ThinkPad-P17-Gen-1, ThinkPad X13.
[Additional information]
Platform: ThinkPad X1 Titanium Gen1, ThinkPad X13, ThinkPad P17
systemd:245.4-4ubuntu3.11
finalrd: 6~ubuntu20.04.1
To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1940514/+subscriptions
More information about the foundations-bugs
mailing list