Created
June 15, 2024 05:45
-
-
Save mekb-turtle/6a20907542f3729d671a0111da636a12 to your computer and use it in GitHub Desktop.
Script to regenerate dracut initramfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -o errexit | |
KERNEL="$(pacman -Q linux | awk '{print $2}' | sed 's/\.\([a-z]\+\)/-\1/')" | |
echo "Generating initramfs for kernel $KERNEL" | |
echo "This may take a while..." | |
echo "Generaing /boot/initramfs-linux.img..." | |
dracut --hostonly --no-hostonly-cmdline /boot/initramfs-linux.img -f "$KERNEL" | |
echo "Generaing /boot/initramfs-linux-fallback.img..." | |
dracut /boot/initramfs-linux-fallback.img -f "$KERNEL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment