From 4116ab71d317f7a51b873f50abc1cc0aef2fb320 Mon Sep 17 00:00:00 2001 From: Fabian Koller Date: Wed, 20 Aug 2025 13:38:14 +0200 Subject: [PATCH 1/4] fix: dracut move of initrd failure dracut-ng introduced `protection of existing files again output errors`, making it incompatible with bind mounts (commit: 39a765d) --- features/_pxe/image.pxe.tar.gz | 4 +--- features/_usi/image.cc.tar | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/features/_pxe/image.pxe.tar.gz b/features/_pxe/image.pxe.tar.gz index 2ef75e3..f6cac45 100755 --- a/features/_pxe/image.pxe.tar.gz +++ b/features/_pxe/image.pxe.tar.gz @@ -27,7 +27,6 @@ echo "console=ttyS0 gl.live=1 gl.ovl=/:tmpfs" > cmdline touch tmp_initrd [[ ! -e "$chroot_dir/initrd" ]] touch "$chroot_dir/initrd" -mount --bind tmp_initrd "$chroot_dir/initrd" [[ ! -e "$chroot_dir/root.squashfs" ]] touch "$chroot_dir/root.squashfs" mount --bind root.squashfs "$chroot_dir/root.squashfs" @@ -50,8 +49,7 @@ chroot "$chroot_dir" env dracut \ umount -l "$chroot_dir/proc" -umount "$chroot_dir/initrd" -rm "$chroot_dir/initrd" +mv "$chroot_dir/initrd" tmp_initrd umount "$chroot_dir/root.squashfs" rm "$chroot_dir/root.squashfs" diff --git a/features/_usi/image.cc.tar b/features/_usi/image.cc.tar index 6e43289..12d77f8 100755 --- a/features/_usi/image.cc.tar +++ b/features/_usi/image.cc.tar @@ -52,8 +52,6 @@ mount --bind "$erofs" "$rootfs/tmp/initrd.include/root.img" initrd="$(mktemp)" touch "$rootfs/initrd" -mount --bind "$initrd" "$rootfs/initrd" - kernel="$(find "$rootfs/boot/" -name 'vmlinuz-*' | sort -V | tail -n 1)" chroot "$rootfs" dracut \ @@ -74,7 +72,7 @@ umount -l "$rootfs/proc" umount -R "$rootfs/dev" umount "$rootfs/tmp" -umount "$rootfs/initrd" +mv "$rootfs/initrd" "$initrd" case "$BUILDER_ARCH" in amd64) From 698075623166dcab1db888350ce43959135d4c75 Mon Sep 17 00:00:00 2001 From: Fabian Koller Date: Wed, 20 Aug 2025 14:25:23 +0200 Subject: [PATCH 2/4] ci: avoid running dev job twice when pushing to active PR --- .github/workflows/dev.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index a69120e..92441d6 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -1,6 +1,8 @@ name: dev on: push: + branches: + - main paths-ignore: - "**/README.md" - "docs/**" @@ -28,7 +30,7 @@ jobs: with: version: ${{ needs.set_version.outputs.VERSION }} # to set target to "release" or "nightly" we need proper KMS secrets - # have a look at gardenlinux/.github/workflows/github.mjs + # have a look at gardenlinux/.github/workflows/github.mjs target: dev fail_fast: true platform_test_build: false From 44a5891c42b7216ebff2c86705aed80a18ce54c1 Mon Sep 17 00:00:00 2001 From: Stefan Catargiu <13122921+5kt@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:30:29 +0000 Subject: [PATCH 3/4] fix: increase tmpfs size --- build.config | 1 + 1 file changed, 1 insertion(+) create mode 100644 build.config diff --git a/build.config b/build.config new file mode 100644 index 0000000..0d07927 --- /dev/null +++ b/build.config @@ -0,0 +1 @@ +tempfs_size=4G From aee034d415c0c1e4e7e301b362d15ed0858e41bc Mon Sep 17 00:00:00 2001 From: Stefan Catargiu <13122921+5kt@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:31:54 +0000 Subject: [PATCH 4/4] refactor: remove unnecessary empty initrd creation --- features/_usi/image.cc.tar | 1 - 1 file changed, 1 deletion(-) diff --git a/features/_usi/image.cc.tar b/features/_usi/image.cc.tar index 12d77f8..0733650 100755 --- a/features/_usi/image.cc.tar +++ b/features/_usi/image.cc.tar @@ -51,7 +51,6 @@ mount --bind "$erofs" "$rootfs/tmp/initrd.include/root.img" initrd="$(mktemp)" -touch "$rootfs/initrd" kernel="$(find "$rootfs/boot/" -name 'vmlinuz-*' | sort -V | tail -n 1)" chroot "$rootfs" dracut \