Score:1

Skipping BTF generation xxx. due to unavailability of vmlunux on ubuntu 21.04 generic version

de flag

Kernel module build resulted on error "Skipping BTF generation 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 error.

Score:12
np flag

This worked for me on ubuntu 22.04. I no longer get the error 'Skipping BTF generation...'.

apt install dwarves
cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/build/

Of course, you first have to check that your vmlinux is indeed in /sys/kernel/btf.

YCN- avatar
ng flag
thanks, even though I'm not really what is the underlying reason for this warning.
Score:3
cn flag

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.

Nmath avatar
ng flag
I can't follow this answer. The majority of the answer seems to describe a problem, and the text after "SOLUTION" does not seem to contain any details about how to apply the solution. The only thing that looks like an answer is a link, and link-only answers are considered low quality because they become obsolete if the linked page changes. The most important part of an answer is the details about how to solve the problem, and that seems missing from this answer entirely. A link should only be used for reference or citation. Please edit your answer so your solution is clear and reproducible.
cl flag
Strong disagree with Nmath's comment. Steps of the solution are perfectly clear (just follow the big headers) and work fine. Kernel modules successfully signed and loaded on Xubuntu 21.10
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.