Failed to unmount /oldroot on shutdown

my shutdown problem is back …
I use dual boot > EOS w/ Manjaro both have a real swap partition. I suspect it’s related to the dual boot or because it uses MBR no EFI (UEFI).

This error message is only displayed on the screen and does not appear in the log files
system just hangs for about 1 minute on shut down and shows:

Shutdown:Failed to unmount /oldroot

same issue w/ default EOS kernel

Operating System: EndeavourOS
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1
Kernel Version: 5.9.8-zen1-1-zen
OS Type: 64-bit
Processors: 8 × AMD FX™-8350 Eight-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: GeForce GT 630/PCIe/SSE2

journalctl -b -1
Nov 18 07:57:11 mycomputer systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway.
...
Nov 18 19:58:44 mycomputer systemd-logind[561]: System is powering down.
Nov 18 19:58:44 mycomputer sddm[820]: Authentication error: "Process crashed"
Nov 18 19:58:44 mycomputer dbus-daemon[1134]: [session uid=1000 pid=1134] Activating via systemd: service name='org.kde.kglobalaccel' unit='plasma-kglobalaccel.service>
Nov 18 19:58:44 mycomputer sddm[820]: Auth: sddm-helper crashed (exit code 15)
Nov 18 19:58:44 mycomputer sddm[820]: Authentication error: "Process crashed"
Nov 18 19:58:44 mycomputer sddm[820]: Auth: sddm-helper exited with 15
Nov 18 19:58:44 mycomputer sddm[820]: Socket server stopping...
Nov 18 19:58:44 mycomputer sddm[820]: Socket server stopped.
Nov 18 19:58:44 mycomputer sddm[820]: Display server stopping...
Nov 18 19:58:44 mycomputer kglobalaccel5[22727]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may > Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland>
Nov 18 19:58:44 mycomputer systemd[1]: avahi-daemon.service: Succeeded.
Nov 18 19:58:44 mycomputer systemd[1]: Stopped Avahi mDNS/DNS-SD Stack.
Nov 18 19:58:44 mycomputer systemd[1]: Requested transaction contradicts existing jobs: Transaction for systemd-coredump@0-22956-0.service/start is destructive (powero>
Nov 18 19:58:44 mycomputer systemd[1]: systemd-coredump.socket: Failed to queue service startup job (Maybe the service file is missing or not a non-template unit?): Tr>
Nov 18 19:58:44 mycomputer systemd[1]: systemd-coredump.socket: Failed with result 'resources'.
Nov 18 19:58:44 mycomputer systemd[1104]: plasma-kglobalaccel.service: Main process exited, code=dumped, status=6/ABRT
Nov 18 19:58:44 mycomputer systemd[1104]: plasma-kglobalaccel.service: Failed with result 'core-dump'.
Nov 18 19:58:44 mycomputer systemd[1104]: Failed to start KDE Global Shortcuts Server.
Nov 18 19:58:45 mycomputer sddm[820]: Greeter starting...
Nov 18 19:58:45 mycomputer sddm[820]: Signal received: SIGTERM
Nov 18 19:58:45 mycomputer sddm[820]: Socket server stopping...
Nov 18 19:58:45 mycomputer sddm[820]: Socket server stopped.
Nov 18 19:58:45 mycomputer sddm[820]: Display server stopping...
Nov 18 19:58:45 mycomputer systemd-coredump[22972]: Failed to connect to coredump service: Connection refused
Nov 18 19:58:45 mycomputer systemd[1104]: plasma-kglobalaccel.service: Main process exited, code=dumped, status=6/ABRT
Nov 18 19:58:45 mycomputer systemd[1104]: plasma-kglobalaccel.service: Failed with result 'core-dump'.
Nov 18 19:58:45 mycomputer systemd[1104]: Failed to start KDE Global Shortcuts Server.
Nov 18 19:58:45 mycomputer sddm-helper[22976]: [PAM] Starting...
Nov 18 19:58:45 mycomputer sddm-helper[22976]: [PAM] Authenticating...
Nov 18 19:58:45 mycomputer sddm-helper[22976]: [PAM] returning.
Nov 18 19:58:45 mycomputer systemd[1104]: plasma-kglobalaccel.service: Scheduled restart job, restart counter is at 2.
Nov 18 19:58:45 mycomputer systemd[1104]: Stopped KDE Global Shortcuts Server.
Nov 18 19:58:45 mycomputer systemd[1104]: Starting KDE Global Shortcuts Server...
Nov 18 19:58:45 mycomputer kglobalaccel5[22979]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may > Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland>
Nov 18 19:58:45 mycomputer systemd-coredump[22980]: Failed to connect to coredump service: Connection refused
Nov 18 19:58:45 mycomputer systemd[1104]: plasma-kglobalaccel.service: Main process exited, code=dumped, status=6/ABRT
Nov 18 19:58:45 mycomputer systemd[1104]: plasma-kglobalaccel.service: Failed with result 'core-dump'.
Nov 18 19:58:46 mycomputer systemd[1104]: plasma-kglobalaccel.service: Main process exited, code=dumped, status=6/ABRT
Nov 18 19:58:46 mycomputer systemd[1104]: plasma-kglobalaccel.service: Failed with result 'core-dump'.
Nov 18 19:58:46 mycomputer systemd[1104]: Failed to start KDE Global Shortcuts Server.
Nov 18 19:58:46 mycomputer systemd[1104]: plasma-kglobalaccel.service: Scheduled restart job, restart counter is at 5.
Nov 18 19:58:46 mycomputer systemd[1104]: Stopped KDE Global Shortcuts Server.
Nov 18 19:58:46 mycomputer systemd[1104]: plasma-kglobalaccel.service: Start request repeated too quickly.
Nov 18 19:58:46 mycomputer systemd[1104]: plasma-kglobalaccel.service: Failed with result 'core-dump'.
Nov 18 19:58:46 mycomputer systemd[1104]: Failed to start KDE Global Shortcuts Server.
Nov 18 19:58:48 mycomputer dbus-daemon[555]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.ser>
Nov 18 19:58:48 mycomputer systemd[1]: Stopped target Network.
Nov 18 19:58:48 mycomputer dbus-daemon[555]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.nm-dispatcher.service': Refusing activation, D-Bus i>
Nov 18 19:58:48 mycomputer systemd[1]: Stopped target Remote File Systems.
Nov 18 19:58:48 mycomputer systemd[1]: Stopping Network Manager...
Nov 18 19:58:50 mycomputer systemd[1]: home.mount: Succeeded.
Nov 18 19:58:50 mycomputer systemd[1]: Unmounted /home.
Nov 18 19:58:50 mycomputer systemd[1]: Reached target Unmount All Filesystems.
Nov 18 19:58:50 mycomputer systemd[1]: systemd-fsck@dev-disk-by\x2duuid-d1d569a6\x2dc7fb\x2d4b32\x2d9aa1\x2dc321f358e835.service: Succeeded.
Nov 18 19:58:50 mycomputer systemd[1]: Stopped File System Check on /dev/disk/by-uuid/d1d569a6-c7fb-4b32-9aa1-c321f358e835.
Nov 18 19:58:50 mycomputer systemd[1]: Removed slice system-systemd\x2dfsck.slice.
Nov 18 19:58:50 mycomputer systemd[1]: Stopped target Local File Systems (Pre).
Nov 18 19:58:50 mycomputer systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.
Nov 18 19:58:50 mycomputer systemd[1]: Stopped Create Static Device Nodes in /dev.
Nov 18 19:58:50 mycomputer systemd-shutdown[1]: Syncing filesystems and block devices.
Nov 18 19:58:50 mycomputer systemd[1]: systemd-sysusers.service: Succeeded.
Nov 18 19:58:50 mycomputer systemd[1]: Stopped Create System Users.
Nov 18 19:58:50 mycomputer systemd[1]: systemd-remount-fs.service: Succeeded.
Nov 18 19:58:50 mycomputer systemd[1]: Stopped Remount Root and Kernel File Systems.
Nov 18 19:58:50 mycomputer systemd[1]: Reached target Shutdown.
Nov 18 19:58:50 mycomputer systemd[1]: Reached target Final Step.
Nov 18 19:58:50 mycomputer systemd[1]: systemd-poweroff.service: Succeeded.
Nov 18 19:58:50 mycomputer systemd[1]: Finished Power-Off.
Nov 18 19:58:50 mycomputer systemd[1]: Reached target Power-Off.
Nov 18 19:58:50 mycomputer systemd[1]: Shutting down.
Nov 18 19:58:50 mycomputer systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Nov 18 19:58:50 mycomputer haveged[292]: haveged: Stopping due to signal 15
Nov 18 19:58:50 mycomputer haveged[292]: haveged starting up
Nov 18 19:58:50 mycomputer systemd-journald[293]: Journal stopped

Could you show the contents of /etc/fstab on both systems?

And while at it, please show the output of command

  lsblk -fm
lsblk -fm
NAME   FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT          SIZE OWNER GROUP   MODE
loop0  vfat   FAT32        3369-2F57                                 2G    31% /home/globe/tcmnt   2,9G root  disk    brw-rw----
sda                                                                                              465,8G root  disk    brw-rw----
├─sda1 ext4   1.0          22782ea8-ae7e-4756-bb6c-603fb4f637a8                                   62,6G root  disk    brw-rw----
├─sda2 ext4   1.0          612bd403-a4e0-4ac6-bd7d-46ed4ca46d4e                                  156,7G root  disk    brw-rw----
└─sda3 ext4   1.0   data   2159e4ab-adff-4870-bad3-5f069740bda1   49,7G    74% /media/data       246,5G root  disk    brw-rw----
sdb                                                                                              223,6G root  disk    brw-rw----
├─sdb1 ext4   1.0          bfa462e8-9eef-4da6-b635-62ce1960588b   31,4G    37% /                  55,2G root  disk    brw-rw----
├─sdb2 ext4   1.0          d1d569a6-c7fb-4b32-9aa1-c321f358e835   65,6G    53% /home             160,5G root  disk    brw-rw----
└─sdb3 swap   1            f967bee2-5a1a-430b-93b4-bac60a8ea16c                [SWAP]              7,8G root  disk    brw-rw----
sdc                                                                                              465,8G root  disk    brw-rw----
└─sdc1 ext4   1.0   backup 22f69b44-c966-47a5-b394-320f24252ef3                                  465,8G root  disk    brw-rw----
sr0                                                                                               1024M root  optical brw-rw----

EOS

cat /etc/fstab
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=bfa462e8-9eef-4da6-b635-62ce1960588b /              ext4    defaults,noatime,barrier=0,commit=60 0 1
UUID=d1d569a6-c7fb-4b32-9aa1-c321f358e835 /home          ext4    defaults,noatime 0 2
UUID=2159e4ab-adff-4870-bad3-5f069740bda1 /media/data    ext4    defaults,noatime 0 2
UUID=f967bee2-5a1a-430b-93b4-bac60a8ea16c swap           swap    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

Manjaro

cat /etc/fstab
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=22782ea8-ae7e-4756-bb6c-603fb4f637a8 /              ext4    noatime,barrier=0,commit=60 0 1
UUID=612bd403-a4e0-4ac6-bd7d-46ed4ca46d4e /home          ext4    noatime,barrier=0 0 2
UUID=2159e4ab-adff-4870-bad3-5f069740bda1 /media/data    ext4    noatime,barrier=0 0 2
tmpfs                                     /tmp           tmpfs   noatime,mode=1777 0 0
/swapfile none swap defaults 0 0

EOS system installed on sdb1
Man system installed on sda1
/media/data > partition on sda3 (mounted in both systems)

What is that /oldroot? How do you mount it and where?

Do you have two systems for mounting /tmp?

You could share the swap partition, but now you have one swap partition and one swap file. Any reason for that?

1 Like
cat /usr/lib/initcpio/shutdown | grep /oldroot
        if [ -e "/oldroot/$p/$bin" ]; then
            cp "/oldroot/$p/$bin" "/usr/bin/$1"
umount --recursive /oldroot

https://wiki.archlinux.org/index.php/Reiser4#Copy_system

But the question should be what the heck is /oldroot ? something any mechanism is creating in some cases ?

2 Likes

each system is using their own mount points, there is no shared /tmp mount …

What is that /oldroot? How do you mount it and where?

cat /usr/lib/initcpio/shutdown | grep /oldroot
        if [ -e "/oldroot/$p/$bin" ]; then
            cp "/oldroot/$p/$bin" "/usr/bin/$1"
umount --recursive /oldroot

It looks the same for me, I have no idea …

No, I meant this:

tmp.mount: Directory /tmp to mount over is not empty, mounting anyway.

So you already have some files in /tmp, then mount on it?

The /oldroot thing seems to be something upstream will fix eventually. So I guess it doesn’t hurt anything, just looks annoying.

1 Like

content may not be completely deleted, but the error also occurs if I deactivate tmpfs in fstab …

the system just hangs for about 1 minute on shut down and shows:
Failed to unmount /oldroot

That might suggest some problem in how /tmp is set up…
Sorry, misread your post.

1 Like

/tmp is normally set up via
/usr/lib/systemd/system/tmp.mount
which tells us that it happens before local-fs.target.

It is cleaned according to
/usr/lib/tmpfiles.d/tmp.conf.

If you have an /etc/fstab entry for it as well, I imagine it could create conflicts.

1 Like

thanks, I will remove that entry from fstab & remount /tmp
sudo mount -o remount /tmp
afterwards tmp folder should be clean on reboot

oldroot, is, IIRC, a systemd thing.

I think it’s where your root filesystem is (re)mounted when systemd switches back into initramfs for shutdown. Or something like that, if my memory is working halfway correctly.

I found some info on oldroot a while ago via a Google search, but at the moment I’m unable to find it again. :man_shrugging:

1 Like

it seems to work now!

sudo nano /etc/mkinitcpio.conf

change:
HOOKS="base udev autodetect modconf block keyboard keymap filesystems fsck"
to:
HOOKS="base udev autodetect modconf block keyboard keymap filesystems fsck shutdown"

sudo mkinitcpio -P
sudo grub-mkconfig -o /boot/grub/grub.cfg

sudo systemctl restart systemd-coredump.socket
sudo systemctl reset-failed
2 Likes

unmounting all devices
unmount /oldroot/sys: target is busy
detaching loop devices
disassembling stacked devices
[57.822284]reboot: power down

please help me :,(