fix: also search for kernel images named kernel-*
This commit is contained in:
parent
d1ddab6038
commit
3daf3132e7
|
@ -208,11 +208,10 @@ function install_kernel_efi() {
|
||||||
|
|
||||||
# Copy kernel to EFI
|
# Copy kernel to EFI
|
||||||
local kernel_file
|
local kernel_file
|
||||||
kernel_file="$(find "/boot" -name "vmlinuz-*" -printf '%f\n' | sort -V | tail -n 1)" \
|
kernel_file="$(find "/boot" \( -name "vmlinuz-*" -or -name 'kernel-*' \) -printf '%f\n' | sort -V | tail -n 1)" \
|
||||||
|| die "Could not list newest kernel file"
|
|| die "Could not list newest kernel file"
|
||||||
|
|
||||||
cp "/boot/$kernel_file" "/boot/efi/vmlinuz.efi" \
|
try cp "/boot/$kernel_file" "/boot/efi/vmlinuz.efi"
|
||||||
|| die "Could not copy kernel to EFI partition"
|
|
||||||
|
|
||||||
# Generate initramfs
|
# Generate initramfs
|
||||||
generate_initramfs "/boot/efi/initramfs.img"
|
generate_initramfs "/boot/efi/initramfs.img"
|
||||||
|
@ -265,11 +264,10 @@ function install_kernel_bios() {
|
||||||
|
|
||||||
# Link kernel to known name
|
# Link kernel to known name
|
||||||
local kernel_file
|
local kernel_file
|
||||||
kernel_file="$(find "/boot" -name "vmlinuz-*" -printf '%f\n' | sort -V | tail -n 1)" \
|
kernel_file="$(find "/boot" \( -name "vmlinuz-*" -or -name 'kernel-*' \) -printf '%f\n' | sort -V | tail -n 1)" \
|
||||||
|| die "Could not list newest kernel file"
|
|| die "Could not list newest kernel file"
|
||||||
|
|
||||||
cp "/boot/$kernel_file" "/boot/bios/vmlinuz-current" \
|
try cp "/boot/$kernel_file" "/boot/bios/vmlinuz-current"
|
||||||
|| die "Could copy kernel to /boot/bios/vmlinuz-current"
|
|
||||||
|
|
||||||
# Generate initramfs
|
# Generate initramfs
|
||||||
generate_initramfs "/boot/bios/initramfs.img"
|
generate_initramfs "/boot/bios/initramfs.img"
|
||||||
|
@ -400,8 +398,9 @@ EOF
|
||||||
# Install authorized_keys before dracut, which might need them for remote unlocking.
|
# Install authorized_keys before dracut, which might need them for remote unlocking.
|
||||||
install_authorized_keys
|
install_authorized_keys
|
||||||
|
|
||||||
# Add dracut use flag
|
einfo "Enabling dracut USE flag on sys-kernel/installkernel"
|
||||||
echo 'USE="dracut"' >> /etc/portage/make.conf
|
echo "sys-kernel/installkernel dracut" > /etc/portage/package.use/installkernel \
|
||||||
|
|| die "Could not write /etc/portage/package.use/installkernel"
|
||||||
|
|
||||||
# Install required programs and kernel now, in order to
|
# Install required programs and kernel now, in order to
|
||||||
# prevent emerging module before an imminent kernel upgrade
|
# prevent emerging module before an imminent kernel upgrade
|
||||||
|
|
Loading…
Reference in New Issue