FIX: nvidia driver

This commit is contained in:
2025-12-05 21:43:37 +01:00
parent 490a3bab8e
commit 784ca0de59
2 changed files with 20 additions and 0 deletions

View File

@@ -17,4 +17,10 @@ RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \
/ctx/build.sh
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/initramfs.sh
RUN bootc container lint

14
build_files/initramfs.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/bash
# https://github.com/ublue-os/bluefin/blob/ba5d621270982b245343abcae47b3393cc5cffb8/build_files/base/19-initramfs.sh
echo "::group:: ===$(basename "$0")==="
set -oue pipefail
KERNEL_SUFFIX=""
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')"
export DRACUT_NO_XATTR=1
/usr/bin/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
chmod 0600 "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
echo "::endgroup::"