[elrepo] after kmod-nvidia el7 update during boot still use the old kmod

Phil Perry phil at elrepo.org
Mon Oct 26 19:00:03 EDT 2015


On 26/10/15 19:20, Farkas Levente wrote:
> On 10/25/2015 03:27 PM, Phil Perry wrote:
>> On 25/10/15 10:38, Farkas Levente wrote:
>>> hi,
>>> after upgrading to kmod-nvidia-352.55-1.el7.elrepo.x86_64 after boot
>>> i've only got black screen. and this happended with the previous version
>>> also. the reason is that during boot the kernel's initramfs still
>>> contains the old kmod. the relevant part of dmesg:
>>
>> But because it's not versioned this won't tell us if the initramfs image
>> gets updated on updating the driver or not.
>>
>> After updating to kmod-nvidia-352.55-1.el7.elrepo we can check if dracut
>> has been run on the initramfs images:
>>
>> So as expected we see dracut has been run twice on all kernels, once
>> during %post as the new kmod package is installed and once during
>> %postun as the old kmod is uninstalled.
>>
>> Rebooting after the kmod update proceeds as expected.
>>
> ...
>> Check the initramfs as I did above. Then update to
>> kmod-nvidia-352.55-1.el7.elrepo, watching what dracut does, and see if
>> you can replicate the issue.
>>
>> If we can work out what's happening, and why, then maybe we can come up
>> with a solution to make the process more robust.
>>
>> Note that in the %post script, on first install only, we do:
>>
>> /usr/bin/dracut --add-drivers nvidia -f /boot/initramfs-$KERNEL.img $KERNEL
> 
> so this last line solve my problem. and the reaon is this part only runs
> once, BUT not in the kmod's post sript but in the nvidia-x11-drv's post
> script. that's why i can't find it. why?
> 
> why not the kmod take cares about the kmod update in the initramfs?
> 
> is there any reason why this part put into the nvidia-x11-drv's post
> scripts?
> 

The nvidia drivers are comprised of a two package set - the kernel
module provided by kmod-nvidia and the X11 driver package, nvidia-x11-drv.

Because we do quite a bit of scripting in %post, we prefer to keep it
all together in one place so one can clearly see everything that is
happening - this makes it easier to maintain. It's simply easier to do
this in the conventional nvidia-x11-drv package rather than the
kmod-nvidia package, where any scripts would need to go into kmodtool.
This choice is reinforced by our policy to try to keep our kmodtool as
close as possible to that shipped by Red Hat. So that's the reasons we
prefer the scripting to be done in the nvidia-x11-drv package. However,
we can use kmodtool if necessary, but I would prefer not for the reasons
given above.

> anyway i still don't know why this do not properly set my initramfs
> during update.
> 

Me neither. We need to figure this out before we can fix it.

Did you try uninstalling, and reinstalling?

The weak-modules script is supposed to compare the list of modules
before and after by md5 checksum to determine if they have changed and
thus whether to install a new initramfs. If the old nvidia module is
still in the initramfs and the initramfs isn't being updated then it
would appear there is possibly a bug in either weak-modules or dracut.

> but thanks you solve my problem:-)
> 

Well we worked around it. I would prefer to figure out why it happened
in the first place and if necessary prevent it from happening.




More information about the elrepo mailing list