From 1cbb1a5bd93c56cbb6782057fee1308f016a357f Mon Sep 17 00:00:00 2001 From: dalto Date: Sat, 12 Nov 2022 15:54:35 -0600 Subject: [PATCH] Add script to reinstall all kernels --- src/usr/bin/reinstall-kernels | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 src/usr/bin/reinstall-kernels diff --git a/src/usr/bin/reinstall-kernels b/src/usr/bin/reinstall-kernels new file mode 100755 index 0000000..b98778c --- /dev/null +++ b/src/usr/bin/reinstall-kernels @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# +# Calls kernel-install on all kernels found in /usr/lib/modules +# +# Run kernel install for all the installed kernels +while read -r kernel; do + kernelversion=$(basename "${kernel%/vmlinuz}") + echo "Installing kernel ${kernelversion}" + kernel-install add ${kernelversion} ${kernel} +done < <(find /usr/lib/modules -maxdepth 2 -type f -name vmlinuz)