summaryrefslogtreecommitdiff
path: root/build_files/build-initramfs
diff options
context:
space:
mode:
authorTranch <tranch.xiao@gmail.com>2026-07-22 17:26:46 +0800
committerGitHub <noreply@github.com>2026-07-22 17:26:46 +0800
commit677aaf3fbbe3f941c1b782980dbc0b422d937027 (patch)
tree8156006e752aa03a910281021ffb5f364927a8d6 /build_files/build-initramfs
parent96aac6e87ac41b27383d1839687f391925080007 (diff)
parent5198f735cf5a8c9e8390c2fa2156252c79be72ab (diff)
downloadAeroCore-OS-677aaf3fbbe3f941c1b782980dbc0b422d937027.tar.gz
AeroCore-OS-677aaf3fbbe3f941c1b782980dbc0b422d937027.zip
Merge pull request #2 from AeroCore-IO/testing
Complete AeroCore OS metadata migration and live installer integration
Diffstat (limited to 'build_files/build-initramfs')
-rwxr-xr-xbuild_files/build-initramfs17
1 files changed, 17 insertions, 0 deletions
diff --git a/build_files/build-initramfs b/build_files/build-initramfs
new file mode 100755
index 0000000..9eec951
--- /dev/null
+++ b/build_files/build-initramfs
@@ -0,0 +1,17 @@
+#!/usr/bin/bash
+
+set -eoux pipefail
+
+echo "::group::Executing build-initramfs"
+trap 'echo "::endgroup::"' EXIT
+
+if [[ "${KERNEL_FLAVOR:-}" == "surface" ]]; then
+ KERNEL_SUFFIX="surface"
+else
+ KERNEL_SUFFIX=""
+fi
+
+QUALIFIED_KERNEL="$(dnf5 repoquery --installed --queryformat='%{evr}.%{arch}' "kernel${KERNEL_SUFFIX:+-${KERNEL_SUFFIX}}")"
+/usr/bin/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible --zstd -v --add ostree --add fido2 -f "/usr/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
+
+chmod 0600 /usr/lib/modules/"$QUALIFIED_KERNEL"/initramfs.img