remove rebuild-initramfs
This commit is contained in:
parent
d7153d9f3c
commit
d0c1fcfef1
1 changed files with 0 additions and 25 deletions
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Rebuilds all the initramsfs in a systemd-boot system using kernel-install
|
||||
|
||||
# Find the configured esp
|
||||
esp=$(bootctl -p)
|
||||
|
||||
# Prepare the efi partition for kernel-install
|
||||
machineid=$(cat /etc/machine-id)
|
||||
if [[ ${machineid} ]]; then
|
||||
mkdir ${esp}/${machineid}
|
||||
else
|
||||
echo "Failed to get the machine ID"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Run kernel install for all the installed kernels
|
||||
while read -r kernel; do
|
||||
kernelversion=$(basename "${kernel%/vmlinuz}")
|
||||
mkdir -p ${esp}/${machineid}/${kernelversion}
|
||||
echo "Generating initramfs for kernel ${kernelversion}"
|
||||
mkinitcpio -k ${kernelversion} -g ${esp}/${machineid}/${kernelversion}/initrd
|
||||
echo "Generating fallback initramfs for kernel ${kernelversion}"
|
||||
mkinitcpio -S autodetect -k ${kernelversion} -g ${esp}/${machineid}/${kernelversion}/initrd-fallback
|
||||
done < <(find /usr/lib/modules -maxdepth 2 -type f -name vmlinuz)
|
Loading…
Add table
Reference in a new issue