Skip to content

Commit 5395875

Browse files
committed
LUKS: make /usr writable
Since systemd commit ffc1ec73b3 ("pid1: add ProtectSystem= as system-wide configuration, and default it to true in the initrd"), systemd makes /usr read-only by default and it will cause dracut to not wait for the LUKS-encrypted devices to be unlocked, dracut-cmdline[296]: mv: inter-device move failed: '/tmp/294-daemon-reload.sh' to '/lib/dracut/hooks/initqueue/daemon-reload.sh'; unable to remove target: Read-only file syste dracut-cmdline[294]: /sbin/initqueue: line 71: /lib/dracut/hooks/initqueue/work: Read-only file system dracut-cmdline[221]: /lib/dracut-dev-lib.sh: line 118: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fmyvg\x2fluks_lv.sh: Read-only file system dracut-cmdline[221]: /lib/dracut-dev-lib.sh: line 103: /lib/dracut/hooks/emergency/80-\x2fdev\x2fmyvg\x2fluks_lv.sh: Read-only file system Fix the above issue by making /usr writable. Signed-off-by: Coiby Xu <[email protected]>
1 parent d0203f9 commit 5395875

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dracut/99kdumpbase/module-setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,13 @@ $CRYPTSETUP_PATH luksOpen --volume-key-keyring \
11351135
EOF
11361136
done
11371137

1138+
# latest systemd makes /usr read-only by default
1139+
mkdir -p "${initdir}/etc/systemd/system.conf.d"
1140+
cat << EOF > "${initdir}/etc/systemd/system.conf.d/kdump_luks.conf"
1141+
[Manager]
1142+
ProtectSystem=false
1143+
EOF
1144+
11381145
dracut_need_initqueue
11391146
}
11401147

0 commit comments

Comments
 (0)