Skip to content

Instantly share code, notes, and snippets.

@kvaps
Last active December 31, 2024 14:03
Show Gist options
  • Save kvaps/2c71dae224b3f3c37efd324c46c917c8 to your computer and use it in GitHub Desktop.
Save kvaps/2c71dae224b3f3c37efd324c46c917c8 to your computer and use it in GitHub Desktop.
How to build talos with custom kernel extensions
# Builds pkg
cd ./pkgs
git checkout release-1.9
make PKGS_PREFIX=ghcr.io/kvaps/talos PUSH=1 USERNAME=kvaps/talos PLATFORM=linux/amd64
# output would be:
# => pushing manifest for ghcr.io/kvaps/talos/base:v1.9.0-15-g45c4ba4-dirty@sha256:f3d0f691752e3158c4f36b05e4b5abad2e68437f0faa0928887e69e568ca364d
# Builds talos (with clustom pkgs)
cd ./talos
git checkout release-1.9
sed '/platform=arm64/d' -i Dockerfile
sed '/--from=[^ ]\+-arm64 /d' -i Dockerfile
make installer imager PKGS_PREFIX=ghcr.io/kvaps/talos PKGS=v1.9.0-15-g45c4ba4-dirty PUSH=1 USERNAME=kvaps/talos PLATFORM=linux/amd64
# Builds extensions with specific PKGS
cd ./extensions
git checkout release-1.9
make PKGS_PREFIX=ghcr.io/kvaps/talos PKGS=v1.9.0-15-g45c4ba4-dirty PUSH=1 USERNAME=kvaps/talos PLATFORM=linux/amd64 TARGETS='drbd zfs'
# Get final talos image out of imager
docker run --privileged -v /dev:/dev --rm -i <imager> image --platform=nocloud --arch amd64 --tar-to-stdout > 1.tgz
tar xvf 1.tgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment