Open jnm27 opened 1 year ago
Hmm, I had thought we had solved this with #1 (merged as https://github.com/NVIDIA/yum-packaging-nvidia-kmod-common/commit/896d3dce59b4c09be31558ae3fee115fecf8891e) by first sourcing the existing GRUB config.
Actually, I wonder if this is due to the lack of double-quotes, which was added in #2 (merged in 530
as https://github.com/NVIDIA/yum-packaging-nvidia-kmod-common/commit/e7941a2c729ce0ffaf9a3236a7005e3f4f48b321).
@jnm27 could you please check if this reproduces with 530 driver packages?
Also might be helpful if you could post cat /proc/cmdline
from reboot after installation, to see if it is preserving the previous config partially or not at all.
yeah, we actually can't reboot after this happens, because we need the ahci blacklist in order to boot. The cmdline in the output above does get set.
I don't think #2 would fix it because the code in that commit only applies if GRUB_CMDLINE_LINUX doesn't already exist in /etc/default/grub
I'd say do something like, get the existing blacklist param, and if nouveau is already in the param, don't do anything, else append ,nouveau to it.
It might be nice to have an option to not modify grub at all, for users that know that nouveau needs to be blacklisted and already have that in their config.
It's actually the grubby --args which is overwriting it, after which point it's too late to check the existing GRUB_CMDLINE_LINUX, because it would be overwritten already
To workaround this, I'm just going to overwrite checkGrubby=1 in the spec file to skip the check.
This is being overhauled for a newer release of the drivers like the following:
We have ahci blacklisted in /etc/default/grub. But when we install nvidia-kmod-common, it wipes out that change.
https://github.com/NVIDIA/yum-packaging-nvidia-kmod-common/blob/main/nvidia-kmod-common.spec#L13
By default this is our command line:
GRUB_CMDLINE_LINUX="blacklist=nouveau,ahci rd.driver.blacklist=nouveau,ahci initcall_blacklist=efifb_driver_init crashkernel=256M rd.lvm.lv=rootvg/rootlv rd.lvm.lv=rootvg/swaplv rd.lvm.lv=rootvg/usrlv biosdevname=0 net.ifnames=1 audit=1 audit_backlog_limit=8192 rhgb quiet"
This is what happens when we install: