Skipping BTF generation xxx. due to unavailability of vmlinux on Ubuntu 21.04
OK, this is sort of the answer.
Previously a start of any Virtual Machine under my Ubuntu 21.10 failed. The problem from VMWare's perspective was
Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.
(and vmnet
also)
This command: sudo vmware-modconfig --console --install-all
gave this error (and still does!)
Skipping BTF generation for /tmp/modconfig-9O1P2c/vmmon-only/vmmon.ko due to unavailability of vmlinux
SOLUTION
-
In my situation I was making a move of a Virtual machine from a Windows platform to a Ubuntu laptop installed with secure boot
-
Although the above compilation was not perfect it WAS CREATING the necessary binaries, but because they are not signed they cannot be loaded at Ubuntu boot time
-
So I got the BTF error messages that I thought was preventing VMNware to start but I was wrong.
-
This link https://github.com/mkubecek/vmware-host-modules/issues/87#issuecomment-800051833 explains the torture necessary to sign the binaries
# generate a key openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/" # import to UEFI database sudo mokutil --import MOK.der (generate a password need next step) # reboot system and import in UEFI BIOS # (use same password) sudo shutdown -r now # once rebooted need to sign the binaries sudo kmodsign sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon) sudo kmodsign sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet) # on reboot new signed binaries used sudo shutdown -r now # now good to start VMware and use any VM
-
Once the UEFI BIOS is informed and the driver binaries signed then VMware can operate fine and the world is saved again
So I did not totally fix the compilation issue, but it seems I was conflating this error message with the inability of VMware to run, which was wrong.
Related videos on Youtube

somayajulu aryasomayajula
Updated on September 18, 2022Comments
-
somayajulu aryasomayajula 3 months
Kernel module build resulted in an error
Skipping BTF generation [my module name] due to unavailabilty of vmlinux.
This operation worked fine in my previous 20.10 version of Ubuntu with kernel 5.8.0.55*. I recently updated to Ubuntu version 21.04 -- and my kernel module build gave this error.