Skip to content

Instantly share code, notes, and snippets.

@msnoigrs
Last active August 5, 2019 02:17
Show Gist options
  • Save msnoigrs/5555e8ff8e187eaea1c4 to your computer and use it in GitHub Desktop.
Save msnoigrs/5555e8ff8e187eaea1c4 to your computer and use it in GitHub Desktop.
mkinitramfs
#!/bin/bash
KVER=$(readlink /usr/src/linux | sed "s/^linux-//g")
echo "Creating initrd for kernel version ${KVER}..."
FIRMWARE=""
for i in $(find /lib/firmware -type f)
do
FIRMWARE+=" ${i}"
done
/usr/bin/dracut -f -H -I "${FIRMWARE}" /boot/initrd-${KVER} ${KVER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment