nberlee / talos

Friendly fork for Turing RK1 on Talos
https://www.talos.dev
Mozilla Public License 2.0
61 stars 0 forks source link

Unable to build a disk image with the Gasket-driver extension #5

Open hagak opened 5 months ago

hagak commented 5 months ago

Bug Report

When attempting to build a disk image using the following fails

docker run --rm -t -v $PWD/_out:/out -v /dev:/dev --privileged ghcr.io/nberlee/imager:v1.6.7 metal --system-extension-image ghcr.io/siderolabs/gasket-driver:09385d4-v1.6.7@sha256:1add5eaa6da69397ed19d9af744e0564d36443fa75859f562dd9418376ce522a
profile ready:
arch: arm64
platform: metal
secureboot: false
version: v1.6.7
input:
  kernel:
    path: /usr/install/arm64/vmlinuz
  initramfs:
    path: /usr/install/arm64/initramfs.xz
  dtb:
    path: /usr/install/arm64/dtb
  uBoot:
    path: /usr/install/arm64/u-boot
  rpiFirmware:
    path: /usr/install/arm64/raspberrypi-firmware
  baseInstaller:
    imageRef: ghcr.io/nberlee/installer:v1.6.7
  systemExtensions:
    - imageRef: ghcr.io/siderolabs/gasket-driver:09385d4-v1.6.7@sha256:1add5eaa6da69397ed19d9af744e0564d36443fa75859f562dd9418376ce522a
output:
  kind: image
  imageOptions:
    diskSize: 1306525696
    diskFormat: raw
  outFormat: .xz
◰ copying kernel modules from /tmp/imager2988444800/extensions/0/rootfs/lib/modules failed: stat /tmp/imager2988444800/extensions/0/rootfs/lib/modules/6.6.22-talos: no such file or directory

Description

I can create images using other extensions just not the gasket-driver. I can also use the official sideorlabs imagers with the gasket-extension.

Logs

Environment

nberlee commented 5 months ago

Ok, gasket is depended on the kernel it seems. Then this would not work, I will try to create a gasket extentension.. (that would be only needed when kernel modules are involved)

nberlee commented 5 months ago

Please try:

ghcr.io/nberlee/gasket-driver:09385d4-v1.6.7-1-g0d36308@sha256:8691b489cc990c10187380cad78066dea0652607be256f445adc9a4fd55f5573

see https://github.com/nberlee/extensions/pkgs/container/gasket-driver

if this works for you i will add gasket permanently to new versions of the extension...

hagak commented 5 months ago

I ran the following, but got the same result as above:

docker run --rm -t -v $PWD/_out:/out -v /dev:/dev --privileged ghcr.io/nberlee/imager:v1.6.7 metal --system-extension-image ghcr.io/nberlee/gasket-driver:09385d4-v1.6.7-1-g0d36308@sha256:8691b489cc990c10187380cad78066dea0652607be256f445adc9a4fd55f5573
nberlee commented 5 months ago

Thanks for testing This is fixable and I will do it when I build a new kernel. I will let you know when you can test it.

hagak commented 5 months ago

Thank you for the work you are putting into this!

nberlee commented 5 months ago

@hagak, I appreciate your patience. After attempting to resolve build gasket, it appears that the solution would require a significant increase in the build time for the kernel, effectively doubling it. Given that I personally bear the cost of the ARM builders (buildjet), and considering the effort involved relative to the demand—since you're currently the only one who has raised this—it doesn't seem justifiable to pursue this the moment.

hagak commented 5 months ago

@nberlee Completely understandable and I appreciate your time spent. Is there a path that your fork will be a PR to the main talos which would eliminate this issue?

nberlee commented 5 months ago

Something like that. Talos 1.7 will have sbc overlays. Which means I could make this for the Turing RK1. However, I am not sure it is possible in Talos 1.7 because it presently does not support a custom kernel. And SBC specific kernel patches are not jet welcome to the upstream Talos. I am still in contact with them how to resolve it, and need to test somethings... So no promises it will be Talos 1.7... but eventually absolutely!