Does Fedora use kernel-install when rpm/dnf updates the kernel?

Hi,

I followed fedora’s vmware guide on how to automate the compilation of vmware modules for each new kernel update by installing a plugin into /etc/kernel/install.d/. I had to modify it to additionally sign the kernel modules according to this article, but that’s besides the point.

Just today I updated the kernel using rpm/dnf, but it appears that the script did not run. Does fedora use kernel-install? I ran the script manually and it succeeded without issues, but maybe it failed for some other reason?

Thanks in advance!

kernel-install is run when (re)installing or upgrading kernel-core.

1 Like
$  dnf history info last | grep kernel
    Install  kernel-6.7.5-200.fc39.x86_64                                @updates
    Install  kernel-core-6.7.5-200.fc39.x86_64                           @updates
    Install  kernel-devel-6.7.5-200.fc39.x86_64                          @updates
    Install  kernel-modules-6.7.5-200.fc39.x86_64                        @updates
    Install  kernel-modules-core-6.7.5-200.fc39.x86_64                   @updates
    Install  kernel-modules-extra-6.7.5-200.fc39.x86_64                  @updates
    Upgraded kernel-6.6.14-200.fc39.x86_64                               @@System
    Upgraded kernel-core-6.6.14-200.fc39.x86_64                          @@System
    Upgraded kernel-devel-6.6.14-200.fc39.x86_64                         @@System
    Upgraded kernel-modules-6.6.14-200.fc39.x86_64                       @@System
    Upgraded kernel-modules-core-6.6.14-200.fc39.x86_64                  @@System
    Upgraded kernel-modules-extra-6.6.14-200.fc39.x86_64                 @@System

Hmm I guess that mean kernel-install did run? But maybe just didn’t run my plugin? Is there a way to debug what happened w/o logging from the plugin itself?

Anyone know? I suppose I can test things by writing a file somewhere, but then I have to wait for a kernel update to become available. It’d be much better if someone can tell me for certain if kernel-install scripts are run. :stuck_out_tongue:

This is how it works:

sudo tee /etc/kernel/install.d/99-local.install << "EOF" > /dev/null
#!/usr/bin/bash
exec &>> /tmp/kernel-install.log
echo ${@}
EOF
sudo chmod +x /etc/kernel/install.d/*
sudo dnf reinstall kernel-core --skip-broken

But using VMware is not recommended for multiple reasons.
Your best option on Fedora is KVM/QEMU + libvirt + virt-manager.

Thank you. Could it be because I was installing updates using gnome software center via restart & install? I read that it’s not the same as updating directly using dnf, which might explain why my scripts never ran.

I haven’t examined what you are trying to do in great detail, but I saw an example script that was trying to run git clone https://.... There are several ways that could fail. The networking might not be available at the stage that the offline install is run. The SELinux context the script is run under might also prevent it from establishing network connections.

Indeed I attempt git clone ... before compiling the vmware modules for recent kernels. Good point about not having network when doing offline install…that might be another issue I was running into.

I’d suggest cloning the repo locally and changing your script to something like git clone -b workstation-${VMWARE_VERSION} /srv/vmware-host-modules.git.

Closing loop:

I was able to verify that my script in /etc/kernel/install.d was run as part of sudo dnf upgrade during install of kernel-core. Thank you all.

1 Like