[RESOLVED] Liquorix 6.7.2-3 fails to boot with error "invalid module format"
uri_herrera
Status: New User - Welcome
Joined: 31 Jan 2024
Posts: 3
Location: Mexico
Reply Quote
I'm facing a problem when booting the latest Liquorix kernel when I create a new ISO for my distribution and try to boot it in bare metal; whenever I boot my new ISO, I get the following error:

:: Code ::

insmod: can't insert '/lib/modules/6.7.2-3-1iquorix-amd64/kernel/drivers/md/dm-mod.ko.zst': invalid module format
/proc/misc: No entry for device-mapper found
Is device-napper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
Command failed


From what I've searched, I've found the following:

:: Quote ::

The "Invalid module format" error occurs when the inserted module is compiled for a different kernel version or architecture.
This error can also occur if the module is not compiled correctly or if there is a mismatch between the kernel headers and the running kernel.
To fix this error, ensure that the module was compiled for the correct kernel version and architecture, and that the kernel headers match the running kernel.


I've also read that the compiler version used for the kernel and on the system should match. I checked this, and my ISO includes GCC 13.2.0-10; then, I checked the kernel, which reads GCC version 13.2.0-9.

I've booted previous ISO files I keep and rechecked this, and the compiler versions are indeed the same, i.e., 13.2.0-7. I don't know if this is the problem.

I'm using packages from Debian testing, and the kernel package is from the Liquorix Debian repository.

Here's the output of inxi -bGxxz of my desktop where my new ISO doesn't boot. I have the same kernel installed on a Debian testing VM, which boots fine (the ISO with this new kernel also boots in a VM).

:: Code ::

System:
  Kernel: 6.6.9-1-liquorix-amd64 arch: x86_64 bits: 64 compiler: gcc v: 13.2.0
    Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.11 wm: kwin_x11 dm: SDDM
    Distro: Nitrux 3.2.1 build.311223.se base: Debian testing/trixie
Machine:
  Type: Desktop Mobo: Gigabyte model: AX370-Gaming 5
    serial: <superuser required> UEFI: American Megatrends v: F30
    date: 04/18/2019
CPU:
  Info: 8-core AMD Ryzen 7 2700X [MT MCP] arch: Zen+ speed (MHz): avg: 4022
    min/max: 2200/4025
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: eVga.com. driver: nvidia
    v: 545.29.06 arch: Pascal pcie: speed: 8 GT/s lanes: 8 ports: active: none
    off: DP-3 empty: DP-1, DP-2, DVI-D-1, HDMI-A-1 bus-ID: 08:00.0
    chip-ID: 10de:1b80
  Device-2: NVIDIA GP104 [GeForce GTX 1080] driver: nvidia v: 545.29.06
    arch: Pascal pcie: speed: 2.5 GT/s lanes: 4 ports: active: none empty: DP-4,
    DP-5, DP-6, DVI-D-2, HDMI-A-2 bus-ID: 09:00.0 chip-ID: 10de:1b80
  Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 108
  Monitor-1: DP-3 mapped: DP-4 note: disabled model: Mi Monitor
    res: 2560x1440 dpi: 108 diag: 685mm (27")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: nvidia
    device: 4 drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11:
    drv: nvidia inactive: wayland,device-2,device-3
  API: OpenGL v: 4.6.0 vendor: nvidia v: 545.29.06 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2
  API: Vulkan v: 1.3.268 surfaces: xcb,xlib device: 0 type: discrete-gpu
    driver: nvidia device-ID: 10de:1b80 device: 1 type: discrete-gpu
    driver: nvidia device-ID: 10de:1b80 device: 2 type: cpu
    driver: mesa llvmpipe device-ID: 10005:0000
Network:
  Device-1: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel
    pcie: speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 05:00.0 chip-ID: 8086:1539
  Device-2: Qualcomm Atheros Killer E2500 Gigabit Ethernet vendor: Gigabyte
    driver: alx v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: c000
    bus-ID: 06:00.0 chip-ID: 1969:e0b1
Drives:
  Local Storage: total: 3.73 TiB used: 2.14 TiB (57.3%)
Info:
  Processes: 625 Uptime: 2h 4m Memory: total: N/A available: 31.3 GiB
  used: 17.04 GiB (54.4%) Init: OpenRC v: 0.52.1 runlevel: default
  default: multi-user Compilers: gcc: 13.2.0 alt: 11/13 Packages: pm: flatpak
  pkgs: 70 Shell: Zsh v: 5.9 running-in: station inxi: 3.3.31


I'm using Ventoy 1.0.91 to boot my ISO.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Try the latest kernel if you can, it appears that the latent entropy GCC plugin broke on 6.7.2 or later, causing issues with modules across the board. Not really sure what changed but it's not a crucial feature, but on my system it was causing errors about GCC version mismatches when there was not one.
Back to top
uri_herrera
Status: New User - Welcome
Joined: 31 Jan 2024
Posts: 3
Location: Mexico
Reply Quote
:: damentz wrote ::
Try the latest kernel if you can, it appears that the latent entropy GCC plugin broke on 6.7.2 or later, causing issues with modules across the board. Not really sure what changed but it's not a crucial feature, but on my system it was causing errors about GCC version mismatches when there was not one.


Unfortunately, I can't build the ISO now since DKMS fails to build the latest NVIDIA driver 550.40.07 using the latest Liquorix kernel version 6.7.3-2. Using the previous kernel 6.7.2-3, DKMS can build the driver.

I see the following errors:

:: Code ::

ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_lock'
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'


Searching for these errors landed me here: https://forums.developer.nvidia.com/t/linux-6-7-3-545-29-06-550-40-07-error-modpost-gpl-incompatible-module-nvidia-ko-uses-gpl-only-symbol-rcu-read-lock/280908/7

There seems to be a problem with 6.7.3.

Regarding my original issue, I could boot my ISO after I updated Ventoy to version 1.0.97. I'm not sure what they changed, but that worked. I still see that error, though, but it boots at last.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Ok, thanks for the help tracking down the problem. I added a patch to make the rcu read (un)lock symbols non-GPL temporarily. This is technically legally problematic, but I don't see the harm for one kernel release. That or until updated drivers are provided by nvidia.

Stay tuned for a kernel update in the next 1-2 hours.
Back to top
uri_herrera
Status: New User - Welcome
Joined: 31 Jan 2024
Posts: 3
Location: Mexico
Reply Quote
:: damentz wrote ::
Ok, thanks for the help tracking down the problem. I added a patch to make the rcu read (un)lock symbols non-GPL temporarily. This is technically legally problematic, but I don't see the harm for one kernel release. That or until updated drivers are provided by nvidia.

Stay tuned for a kernel update in the next 1-2 hours.


Thanks for your quick response. In the post at the NVIDIA forum, a Gentoo user posted a patch that applies to the driver files. I have built a new ISO and can confirm that the patch applied to the driver files allows DKMS to build the driver against the currently available Liquorix kernel 6.7.3-2.

Following the conversation at GitHub (https://github.com/NVIDIA/open-gpu-kernel-modules/issues/594), an NVIDIA developer has confirmed they will release a new driver with this issue fixed, although no ETA was provided.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Marking this thread as resolved, latest kernel contains changes to support existing nvidia drivers.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours