]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(base): ensure that /run survives switch_root
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 7 Feb 2026 20:10:48 +0000 (15:10 -0500)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sun, 8 Feb 2026 01:35:54 +0000 (20:35 -0500)
Ensure /run survives switch_root not only systemd enabled initramfs,
but initramfs without systemd.

This change makes systemd and non-systemd initramfs behaves similarly.

This change also enables the newly added test case for hooks to pass
on the busybox CI container.

This PR has no impact on systemd enabled initramfs.

.github/workflows/daily-busybox-x64.yml
modules.d/80base/init.sh

index 4b2ee2b6f7210a100d7e05074be1d427d2b94685..7e00d0f833308e0db081f7db1b8a2007ae5b6157 100644 (file)
@@ -32,6 +32,7 @@ jobs:
                     - '11'
                     - '12'
                     - '13'
+                    - '14'
                     - '20'
                     - '26'
                     - '50'
index 26b554ab507c094bba77000d90eda1e552569698..36e7dbaf7c4e4dcab42825bf2bba1d6bf80b2b14 100755 (executable)
@@ -365,6 +365,8 @@ if ! [ -d "$NEWROOT"/run ]; then
     NEWRUN=/dev/.initramfs
     mkdir -m 0755 -p "$NEWRUN"
     mount --rbind /run/initramfs "$NEWRUN"
+else
+    mount --move /run "$NEWROOT"/run
 fi
 
 wait_for_loginit