From 9d08fd8c7e05380eb696dfe32cce7364c0f636d7 Mon Sep 17 00:00:00 2001 From: Steffen Maier Date: Thu, 31 Aug 2023 17:13:54 +0200 Subject: [PATCH] zdev/dracut: import persistent config of early devices into kdump initrd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing code can already determine the required devices for the actively running system. In case users would have a need to configure additional devices for early boot in kdump initrd, import those devices marked with "zdev:early=1" for completeness. Assuming this is a small number of devices and could even overlap between the root-fs and the kdump case, do not further distinguish those two sets of devices. Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/158 Reviewed-by: Vineeth Vijayan Acked-by: Vineeth Vijayan Acked-by: Peter Oberparleiter Signed-off-by: Steffen Maier Signed-off-by: Jan Höppner --- zdev/dracut/95zdev-kdump/module-setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zdev/dracut/95zdev-kdump/module-setup.sh b/zdev/dracut/95zdev-kdump/module-setup.sh index 328732ef..27fb9d75 100755 --- a/zdev/dracut/95zdev-kdump/module-setup.sh +++ b/zdev/dracut/95zdev-kdump/module-setup.sh @@ -81,6 +81,11 @@ install() { for_each_host_dev_and_slaves_all check_zdev sed -i -e 's/^\[active /\[persistent /' "$_tempfile" + # in addition to active devices above, also add persistent config + # of devices the user marked for early initrd use + chzdev --export - --persistent --by-attrib "zdev:early=1" --quiet \ + --type 2>/dev/null >> "$_tempfile" + ddebug < "$_tempfile" # Apply via --import to prevent other devices from being configured