alexreinert / piVCCU

piVCCU is a project to install the original Homematic CCU3 firmware inside a virtualized container (lxc) on ARM based single board computers.
Apache License 2.0
300 stars 62 forks source link

Error after system upgrade #511

Closed jogibear9988 closed 9 months ago

jogibear9988 commented 9 months ago

After a System Upgrade I got the following error:

      pi@raspberrypi:~ $ sudo dpkg-reconfigure pivccu3
      Stop piVCCU ... Done
      Disable services ... Done
      Remove symlinks ... Done
      Reload udev rules ... Done
      Create symlinks ... Done
      Enable services ... Done
      Update APT repository config ... Done
      Start piVCCU ... FAILED
      A dependency job for pivccu.service failed. See 'journalctl -xe' for details.

journalctl -xe shows following:

      Nov 05 17:16:42 raspberrypi systemd[1]: Starting piVCCU DKMS Modules...
      ░░ Subject: A start job for unit pivccu-dkms.service has begun execution
      ░░ Defined-By: systemd
      ░░ Support: https://www.debian.org/support
      ░░ 
      ░░ A start job for unit pivccu-dkms.service has begun execution.
      ░░ 
      ░░ The job identifier is 604.
      Nov 05 17:16:43 raspberrypi ensure_modules.sh[2039]: Remove DKMS package ... FAILED
      Nov 05 17:16:43 raspberrypi ensure_modules.sh[2039]: Error! There is no instance of pivccu 1.0.84
      Nov 05 17:16:43 raspberrypi ensure_modules.sh[2039]: for kernel 6.1.61-v7l+ (armv7l) located in the DKMS tree.
      Nov 05 17:16:43 raspberrypi systemd[1]: pivccu-dkms.service: Main process exited, code=exited, status=1/FAILURE
      ░░ Subject: Unit process exited
      ░░ Defined-By: systemd
      ░░ Support: https://www.debian.org/support
      ░░ 
      ░░ An ExecStart= process belonging to unit pivccu-dkms.service has exited.
      ░░ 
      ░░ The process' exit code is 'exited' and its exit status is 1.
      Nov 05 17:16:43 raspberrypi systemd[1]: pivccu-dkms.service: Failed with result 'exit-code'.
alexreinert commented 9 months ago

Which Hardware? Which OS Version? Which piVCCU Version?

jogibear9988 commented 9 months ago

raspberry pi with pivccu3

        pi@raspberrypi:/home/iobroker $ apt show pivccu3
        Package: pivccu3
        Version: 3.71.12-85
        Priority: extra
        Section: misc
        Maintainer: Alexander Reinert <alex@areinert.de>
        Installed-Size: unknown
        Pre-Depends: pivccu-modules-dkms (>= 1.0.10), detect-radio-module, wait-sysfs-notify, perl, lxc, bridge-utils, net-tools, systemd, debconf (>= 0.5) | debconf-2.0
        Conflicts: pivccu, pivccu-modules-dkms (>= 2.0.0)
        Homepage: https://github.com/alexreinert/piVCCU
        Download-Size: 122 MB
        APT-Manual-Installed: yes
        APT-Sources: https://apt.pivccu.de/piVCCU stable/main armhf Packages
        Description: piVCCU - Homematic CCU LXC container
          This package contains piVCCU - a Homematic CCU LXC container

        N: There are 18 additional records. Please use the '-a' switch to see them.
image
jogibear9988 commented 9 months ago
    pi@raspberrypi:/home/iobroker $ uname -r
    6.1.61-v7l+
alexreinert commented 9 months ago

Which Hardware? Which OS Version?

alexreinert commented 9 months ago

And please output of sudo pivccu-info

jogibear9988 commented 9 months ago
  sudo pivccu-info
  piVCCU version: 3.71.12-85
  OS:             Raspbian GNU/Linux 11 (bullseye)
  Kernel:         6.1.61-v7l+ armv7l
  Kernel modules: Not available
  Raw UART dev:   Not available
  Rasp.Pi UART:   Assigned to GPIO pins
  HMRF Hardware:  unknown
  HMIP Hardware:  unknown
  State:          STOPPED
jogibear9988 commented 9 months ago

Which Hardware? Which OS Version?

    Hardware    : BCM2711
    Revision    : c03111
    Serial      : 100000008c9a7ae5
    Model       : Raspberry Pi 4 Model B Rev 1.1
jogibear9988 commented 9 months ago

raspbian bullseye

alexreinert commented 9 months ago

Did you reboot the system after the upgrade? Output of sudo dpkg-reconfigure pivccu-modules-dkms please.

jogibear9988 commented 9 months ago

rebootet 3 times

jogibear9988 commented 9 months ago

pi@raspberrypi:/home/iobroker/.npm/_logs $ sudo dpkg-reconfigure pivccu-modules-dkms Disabled DKMS service ... Done Remove obsolete kernel modules ... Done Ensure non mixed processor architecure ... Done Create kernel modules ... FAILED Check kernel headers ... FAILED No headers found for current active kernel 6.1.61-v7l+ Enable DKMS service ... Done pi@raspberrypi:/home/iobroker/.npm/_logs $

jogibear9988 commented 9 months ago

No headers found for current active kernel 6.1.61-v7l+

I'll look

jogibear9988 commented 9 months ago

pi@raspberrypi:/home/iobroker/.npm/_logs $ sudo apt install raspberrypi-kernel-headers Reading package lists... Done Building dependency tree... Done Reading state information... Done raspberrypi-kernel-headers is already the newest version (1:1.20230509~buster-1).

jogibear9988 commented 9 months ago

so the headers seem to be installed....

alexreinert commented 9 months ago

There is a header package installed, but it does not match the installed kernel. My guess: You updated to bullseye without changing /etc/apt/sources.list.d/raspi.list and manually updated the kernel using rpi-update. Is that correct?

jogibear9988 commented 9 months ago

I upgraded like described here: https://linuxnews.de/raspberry-pi-os-auf-bullseye-aktualisieren/

at first I ran:

  sudo apt update
  sudo apt full-upgrade
  sudo rpi-update

then

  sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
  sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/raspi.list

then

  sudo apt update && sudo apt install libgcc-8-dev gcc-8-base

and then

  sudo apt full-upgrade 
jogibear9988 commented 9 months ago

apt show raspberrypi-kernel shows a buster kenerl, maybe I need to switch that to bullseye?

  pi@raspberrypi:/home/iobroker/.npm/_logs $ apt show raspberrypi-kernel
    Package: raspberrypi-kernel
    Version: 1:1.20230509~buster-1
    Status: install ok installed
    Priority: optional
    Section: kernel
    Source: raspberrypi-firmware
    Maintainer: Serge Schneider <serge@raspberrypi.org>
    Installed-Size: 287 MB
    Provides: linux-image, wireguard-modules (= 1.0.0)
    Breaks: raspberrypi-bootloader (<< 1.20160324-1)
    Replaces: raspberrypi-bootloader (<< 1.20160324-1)
    Homepage: https://github.com/raspberrypi/firmware
    Download-Size: unknown
    APT-Manual-Installed: yes
    APT-Sources: /var/lib/dpkg/status
    Description: Raspberry Pi bootloader
     This package contains the Raspberry Pi Linux kernel.

    pi@raspberrypi:/home/iobroker/.npm/_logs $ apt show raspberrypi-kernel-headers
    Package: raspberrypi-kernel-headers
    Version: 1:1.20230509~buster-1
    Status: install ok installed
    Priority: optional
    Section: kernel
    Source: raspberrypi-firmware
    Maintainer: Serge Schneider <serge@raspberrypi.org>
    Installed-Size: 180 MB
    Provides: linux-headers
    Homepage: https://github.com/raspberrypi/firmware
    Download-Size: unknown
    APT-Manual-Installed: yes
    APT-Sources: /var/lib/dpkg/status
    Description: Header files for the Raspberry Pi Linux kernel
     This package provides the architecture-specific kernel header files for
     the Raspberry Pi Linux kernel, generally used for building out-of-tree
     kernel modules.
alexreinert commented 9 months ago

Yes, you need to install the bullseye kernel and its matching kernel header package. I assume, that the file /etc/apt/sources.list.d/raspi.list is not correct. And please do not use rpi-update. It install a testing kernel without headers. The Rasperry Pi foundation clearly state, that rpi-update should only be used, when they tell you to use it.

jogibear9988 commented 9 months ago

After using this tutorial to upgrade to bookworm it works: https://gist.github.com/jauderho/6b7d42030e264a135450ecc0ba521bd8

jogibear9988 commented 9 months ago

thx