Dear expert,
I tried to harden my almalinux n found that set the kernel.modukes_disabled=1 cause the lspcon failure.
Then, I tried to rescue it using Systemrescue n mountall command but I cannot locate the /etc/sysctl.d/99-*.conf that i was edited previously. My drive is encrypted and no root account enabled.
How to resolve it? Please help me. Thanks in advance.
Hi,
kernel.modules_disabled=1 prevents further kernel module loading until reboot.
Have you unlocked and mounted the encrypted root filesystem correctly?
Please check:
lsblk -f
findmnt
Once mounted, locate the setting:
grep -Rn 'modules_disabled' /mnt/etc/sysctl* /mnt/usr/lib/sysctl.d/ 2>/dev/null
Remove or comment out the setting, then reboot.
Thanks.
If mountall didn’t unlock the LUKS container, do it manually: cryptsetup luksOpen /dev/sdXn cryptroot, then vgchange -ay if LVM is used, and mount the root LV under /mnt. Run the grep against the mounted system, e.g. grep -R ‘modules_disabled’ /mnt/etc /mnt/usr/lib/sysctl.d 2>/dev/null, and also check /mnt/etc/sysctl.conf and /mnt/run/sysctl.d. Comment out the line, then reboot. Since modules_disabled only blocks new module loads until reboot, the LSPCON module should load normally afterward.