Installation fails when v4l2loopback-dkms is added to the image

Asked by IK_428

Hello,

first of all thanks for the incredible work done on this tool.

I have an issue with a custom image I'm creating:
The image is base on ubuntu server 20.04.3

I already have created several functioning images with my custom repos and various customization.
Now I would like to have also v4l2loopback-dkms installed by default on the image.

v4l2loopback-dkms 0.12.3-1ubuntu0.4 all Source for the v4l2loopback driver (DKMS)

Since when I added this package I cannot produce an installable image, the error I'm getting during the installation phase is the following.
Consider that I use ubuntu new "Automated Server Installs"
https://ubuntu.com/server/docs/install/autoinstall

2021-11-02 11:32:57,764 ERROR root:39 finish: subiquity/Install/install/curtin_install/cmd-install/stage-curthooks/builtin/cmd-curthooks/installing-kernel: FAIL: installing kernel
2021-11-02 11:32:57,767 ERROR root:39 finish: subiquity/Install/install/curtin_install/cmd-install/stage-curthooks/builtin: FAIL: running 'curtin curthooks'
2021-11-02 11:32:57,768 ERROR root:39 finish: subiquity/Install/install/curtin_install/cmd-install/stage-curthooks: FAIL: configuring installed system
2021-11-02 11:32:58,451 ERROR root:39 finish: subiquity/Install/install/curtin_install: FAIL: Command '['systemd-cat', '--level-prefix=false', '--identifier=subiquity_log.2532', '/snap/subiquity/2651/usr/bin/python3', '-m', 'curtin', '--showtrace', '-c', '/var/log/installer/subiquity-curtin-install.conf', 'install']' returned non-zero exit status 3.
2021-11-02 11:32:58,491 INFO subiquitycore.common.errorreport:407 saving crash report 'install failed crashed with CalledProcessError' to /var/crash/1635852778.453449011.install_fail.crash

Is there a way to have that package installed and the installation script working?
Please let me know if more details are needed.

In case the other option that came to my mind is to load the package into the image and install it at the first boot but is not a clean solution.

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
IK_428
Solved:
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said (last edit ):
#1

I'm not familiar with v4l2loopback-dkms.

However, my experience with dkms is that it installs for the current running kernel version.
This is actually the host machine's kernel version, and it is shown at the top right on Cubic's Terminal page.
Try installing the same kernel into Cubic as what you have on your host machine.
Once installed, you should see the corresponding initrd and vmlinuz files in the /boot directory.
Then install v4l2loopback-dkms.
Then, (if you need to) update your kernel to another version.
This should allow v4l2loopback-dkms to update itself to the new kernel.
For good measure, execute:
    $ update-initramfs -k all

Revision history for this message
IK_428 (ik-428) said (last edit ):
#2

Hello,

sorry for the late reply but it took me some time before I had a chance to do some more debugging.

You pointed me in then right direction.
It turn out that ubuntu server 20.04.3 uses kernel 5.4.0-81
Using a machine with kernel 5.4.0-90 for creating the image was generating the problem

I forced the installation of the following packages in order to fix the problem
apt install --reinstall linux-headers-5.4.0-81 linux-headers-5.4.0-81-generic linux-image-5.4.0-81-generic -y

In case someone runs into a similar problem with dkms, also remember to select the "vmlinuz
initrd" in the kernel selection pannel

selecting the vmlinuz-VERSION initrd-VERSION will not work

many thanks,
have a great day!