Giter Club home page Giter Club logo

Comments (5)

JensNbb avatar JensNbb commented on July 24, 2024

Kleiner Nachtrag: Mit einer bullseye VM funktioniert es auch unter LXD, es dürfte also tatäschlich ein issue sein und kein feature request ;-). Einfach in der Anleitung zur Reproduktion die Zeile

lxc launch images:debian/12 ccu3 --vm

ersetzen durch

lxc launch images:debian/11 ccu3 --vm

dann läuft alles sauber durch und auf 'debmatic-info' wird sauber geantwortet mit:

debmatic version: 3.73.9-112
OS:               Debian GNU/Linux 11 (bullseye)
Kernel:           5.10.0-27-arm64 aarch64
Service Status:   Running
Kernel modules:   Available
Raw UART dev:     Available
HMRF Hardware:    RPI-RF-MOD
 Connected via:   HB-RF-USB-2@usb-0000:01:00.6-4 (/dev/raw-uart)
 Board serial:    5F298D8F34
 Radio MAC:       0xFF8F34
HMIP Hardware:    RPI-RF-MOD
 Connected via:   HB-RF-USB-2@usb-0000:01:00.6-4 (/dev/raw-uart)
 SGTIN:           3014xxxxxxxxxxxxxxx8F34
 Radio MAC:       0xBFBCA3

[Falls die VM beim launch hängen bleibt, hilft ggf. folgendes:

lxc stop ccu3 --force
lxc config set ccu3 security.secureboot=false
lxc start ccu3

]

from debmatic.

alexreinert avatar alexreinert commented on July 24, 2024

Das ist kein debmatic Issue, wenn überhaupt ist es ein dkms Issue. Aber eigentlich will man keine Kernel Module innerhalb eines Containers bauen bzw. laden.

from debmatic.

JensNbb avatar JensNbb commented on July 24, 2024

Aber eigentlich will man keine Kernel Module innerhalb eines Containers bauen bzw. laden.

Definitiv will man das nicht. Wenn man bei LXD mit der -vm Option startet, wird eine komplette VM auf kvm Basis hochgezogen, ähnlich wie bei Proxmox. Der Manager ist allerdings nur mit CLI und damit deutlich schlanker, als Proxmox und deshalb gerade für Hausautomatisierung ganz interessant.

Das ist kein debmatic Issue, wenn überhaupt ist es ein dkms Issue.

Hast Du einen Tipp, wo man noch reinschauen kann, um das einzukreisen?

from debmatic.

alexreinert avatar alexreinert commented on July 24, 2024

Ggf. Hilft es die Kernel Header nochmal frisch zu installieren, möglicherweise steht da fehlerhafterweise irgendwas mit Secure Boot bzw. Module Signing drin. Die Fehlermeldung vom modprobe klingt zumindest schwer in die Richtung.

from debmatic.

JensNbb avatar JensNbb commented on July 24, 2024

"Secure Boot" war der entscheidende Hinweis. Startet man die VM mit

lxc launch images:debian/12 ccu3 --vm —config security.secureboot=false

läuft die Installtion komplett durch. Ein Eintrag weniger auf Deiner amazon Wunschliste ;-)

Hier nochmal die komplette Anleitung vom frischen Rasperry Pi OS lit (64-bit) bis zur fertigen CCU3 für alle, die das gerne auf Basis von LXD machen wollen:

sudo apt update && sudo apt upgrade -y

# 1. LXD installieren und starten
sudo apt install snapd -y
sudo snap install lxd  
echo "export PATH='/snap/bin:$PATH'" >> ~/.bashrc
sudo usermod -a -G lxd <user>

# ausloggen und neu einloggen
lxd init    # Alle Eingaben mit default beantworten

# 2. VM herrichten und einloggen
lxc launch images:debian/12 ccu3 --vm --config security.secureboot=false
lxc shell ccu3

# 3. debmatic Installation vorbereiten 
# Ab bier geht es weiter innerhalb der VM ccu3, größtenteils nach Anleitung (lxc shell sollte als root einloggen)
apt update && apt upgrade -y
apt install sudo apt-transport-https wget usbutils -y

wget -q -O - https://apt.debmatic.de/debmatic/public.key | sudo tee /usr/share/keyrings/debmatic.asc
echo "deb [signed-by=/usr/share/keyrings/debmatic.asc] https://apt.debmatic.de/debmatic stable main" | sudo tee /etc/apt/sources.list.d/debmatic.list
apt update
apt install build-essential bison flex libssl-dev -y
apt install linux-headers-$(uname -r) -y

# 4. Reboot und USB Modul an die VM durchleiten
shutdown now
# Hier lohnt es sich, auf dem Host einen Snapshot zu ziehen: lxc snapshot ccu3 before-pivccu-kernel-install
lxc config device add ccu3 HB-RF-USB-2 usb vendorid=10c4 productid=8c07  # HB-RF-USB-2 durchreichen
lxc start ccu3
lxc shell ccu3

# 5. debmatic installieren
apt install pivccu-modules-dkms -y
reboot

apt install debmatic -y

# Zurück auf dem Host:

# Port-forwarding einrichten, damit Homematic über die Adresse des Hosts erreichbar ist:
# IP-Adresse der CCU per "lxc list ccu3" auf dem Host oder "ip addr" in der VM abfragen
sudo apt install iptables iptables-persistent -y

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination <IP Adresse der CCU>:80
sudo netfilter-persistent save
sudo netfilter-persistent reload

Danach ich Homematic unter dem Namen des Raspberry erreichbar, also z.B. http://raspberrypi

from debmatic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.