Files
hydro-os/files/scripts/regenerateinitramfs.sh
Eriq Taing 53bd20584a
All checks were successful
bluebuild / Build Custom Image (recipe.yml) (push) Successful in 9m12s
akmods-and-correct-image-info (#72)
Reviewed-on: #72
Co-authored-by: Eriq Taing <eriq12@protonmail.com>
Co-committed-by: Eriq Taing <eriq12@protonmail.com>
2025-10-03 15:10:43 -04:00

8 lines
440 B
Bash

#!/usr/bin/env bash
# Obtained from wayblue project https://github.com/wayblueorg/wayblue/blob/live/files/scripts/regenerateinitramfs.sh
set -oue pipefail
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
/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"