Additional LKM not added after upgrading to Ubuntu 18.04 (maybe be a bug in "libkmod")

Bug #1781143 reported by Lancillotto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dracut (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi, I have reported on Dracut GitHub the following issue https://github.com/dracutdevs/dracut/issues/426 .

After upgrading to Ubuntu 18.04 (Linuxmint 19) dracut does not add additional drivers.

After a lot of investigation I found a problem into the libkmod.

---------------------------------------------
Here is a sample code to replicate the issue:
---------------------------------------------

#include <libkmod.h>
#include <stdio.h>

#define _cleanup_(x) __attribute__((cleanup(x)))

static inline void kmod_module_unref_listp(struct kmod_list **p) {
        if (*p)
                kmod_module_unref_list(*p);
}

#define _cleanup_kmod_module_unref_list_ _cleanup_(kmod_module_unref_listp)

static inline void kmod_module_info_free_listp(struct kmod_list **p) {
        if (*p)
                kmod_module_info_free_list(*p);
}

#define _cleanup_kmod_module_info_free_list_ _cleanup_(kmod_module_info_free_listp)

static inline void kmod_unrefp(struct kmod_ctx **p) {
        kmod_unref(*p);
}

#define _cleanup_kmod_unref_ _cleanup_(kmod_unrefp)

int main(int argc, char** argv) {
    _cleanup_kmod_unref_ struct kmod_ctx *ctx = NULL;
    _cleanup_kmod_module_unref_list_ struct kmod_list *list = NULL;
    int err;

    //char alias[2048] = "cryptd";
    char alias[2048] = "ahci cryptd";

    char kerneldir[256] = "/lib/modules/4.15.0-24-generic/";

    printf("libkmod tester...\n");

    ctx = kmod_new(kerneldir, NULL);
    err = kmod_module_new_from_lookup(ctx, alias, &list);

    if (err < 0) {
        printf("Error (%d) looking for aliases \"%s\"\n.", err, alias);
        return 1;
    }

    printf("Got list pointer 0x%lx .\n.", (unsigned long)(void *)list);

    return 0;
}

----------------------------------------
And here the script to build and run it:
----------------------------------------

#!/bin/bash

CUR_DIR=$(dirname $0)
EXE_NAME=kmod-tester

gcc -Wall *.c -lkmod -o ${EXE_NAME} && \
${CUR_DIR}/${EXE_NAME}

Regards,
Antonio Petricca

---------------
lsb_release -rd
---------------

Description: Linux Mint 19 Tara
Release: 19

-------------------------
apt-cache policy libkmod2
-------------------------

libkmod2:
  Installed: 24-1ubuntu3
  Candidate: 24-1ubuntu3
  Version table:
 *** 24-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Lancillotto (antonio-petricca) wrote :
Revision history for this message
Lancillotto (antonio-petricca) wrote :

Sorry, could the admin move my post to the dracut package?

Revision history for this message
Lancillotto (antonio-petricca) wrote :

I have added on my own affected packages. Thank you

no longer affects: man-db (Ubuntu)
tags: added: dracut
tags: added: initramfs-tools kmod
Revision history for this message
Lancillotto (antonio-petricca) wrote :
Revision history for this message
Stefan Puiu (stefanpuiuro) wrote :

I'm also seeing this. I have a bionic VM running in VirtualBox and, a few days ago, I wanted to install the newer version of the guest additions, and got an error from dracut:

dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.NHsS4s/initramfs --kerneldir /lib/modules/4.15.0-65-generic/ -m crc32c

If I comment the 'add_drivers+="crc32c "' in /etc/dracut.conf.d/10-debian.conf, I'm able to run the dracut command line above just fine.

Revision history for this message
Stefan Puiu (stefanpuiuro) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.