1 diff -urpa dracut-056.orig/modules.d/99base/init.sh dracut-056/modules.d/99base/init.sh
2 --- dracut-056.orig/modules.d/99base/init.sh 2022-02-18 12:32:53.000000000 +0100
3 +++ dracut-056/modules.d/99base/init.sh 2022-08-28 19:12:37.568702916 +0200
4 @@ -271,6 +271,26 @@ getarg 'rd.break=cleanup' -d 'rdbreak=cl
7 # By the time we get here, the root filesystem should be mounted.
9 +# Remount /proc and /sys with options from $NEWROOT/etc/fstab,
10 +# keep defaults just in case.
11 +procopts="nosuid,noexec,nodev,"
12 +sysopts="nosuid,noexec,nodev,"
13 +if [ -f "$NEWROOT/etc/fstab" ] \
14 + && ! [ -L "$NEWROOT/etc/fstab" ]; then
15 + while read dev mp fs opts dump fsck; do
17 + [ "${dev%%#*}" != "$dev" ] && continue
18 + if [ "$mp" = "/proc" ]; then
20 + elif [ "$mp" = "/sys" ]; then
23 + done < "$NEWROOT/etc/fstab"
25 +mount -o remount,$procopts /proc 2>&1
26 +mount -o remount,$sysopts /sys 2>&1
29 for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbin/init; do
30 [ -n "$i" ] || continue