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
commit551eb70e71b16ec78d1ccab5f92242623809f591 (patch)
tree8156006e752aa03a910281021ffb5f364927a8d6 /build_files/build-initramfs
parentbf529f74e0a776518f73852a3a156361051772dc (diff)
parent54790d45fba14c63544355e4c78247e9e05d6c7d (diff)
downloadAeroCore-OS-551eb70e71b16ec78d1ccab5f92242623809f591.tar.gz
AeroCore-OS-551eb70e71b16ec78d1ccab5f92242623809f591.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