From 52549ec563a25294cf3d45bfeb0b9cb95993998a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 13 Oct 2021 11:37:48 -0400 Subject: [PATCH] Fix module autoloading in diskless profiles The initramfs has a reduced set of modules to boot and then in diskless mode hands over to the 'real' OS for all userspace to use the more substantial root filesystem with all of the modules. However one exception is kernel module autoload, which induces modprobe to run in the initial mount namespace unconditionally. Thus, preserve the ramfs drivers (just in case) but have the autoloading pivot to the normal root filesystem to get the full complement of modules. --- .../el8-diskless/profiles/default/scripts/imageboot.sh | 2 ++ .../suse15-diskless/profiles/default/scripts/imageboot.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/el8-diskless/profiles/default/scripts/imageboot.sh index b0cfe3b7..554d5c49 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/imageboot.sh @@ -121,4 +121,6 @@ if grep installtodisk /proc/cmdline > /dev/null; then run_remote installimage exec reboot -f fi +mv /lib/modules/$(uname -r) /lib/modules/$(uname -r)-ramfs +ln -s /sysroot/lib/modules/$(uname -r) /lib/modules/ exec /opt/confluent/bin/start_root diff --git a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/imageboot.sh index 244749aa..3182f972 100644 --- a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/imageboot.sh @@ -136,4 +136,6 @@ if grep installtodisk /proc/cmdline > /dev/null; then run_remote installimage exec reboot -f fi +mv /lib/modules/$(uname -r) /lib/modules/$(uname -r)-ramfs +ln -s /sysroot/lib/modules/$(uname -r) /lib/modules/ exec /opt/confluent/bin/start_root