From b8b36e969c28375a5274979a7a138d4ff7535046 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 27 Jul 2021 10:07:10 +0000 Subject: [PATCH] grub cloud: Add kernel release to boot ID Signed-off-by: Michael Tremer Signed-off-by: Arne Fitzenreiter --- config/grub2/00_cloud | 6 +++++- lfs/flash-images | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/grub2/00_cloud b/config/grub2/00_cloud index 3f9c5a1854..121cb2fbd6 100644 --- a/config/grub2/00_cloud +++ b/config/grub2/00_cloud @@ -11,6 +11,10 @@ fi . "${pkgdatadir}/grub-mkconfig_lib" +if [ -z "${KERNEL_RELEASE}" ]; then + KERNEL_RELEASE="$(uname -r)" +fi + if [ -z "${boot_device_id}" ]; then boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" fi @@ -21,6 +25,6 @@ smbios --type 1 --get-string 4 --set system_manufacturer # Are we on Amazon EC2? if [ "\$system_manufacturer" = "Amazon EC2" ]; then - next_entry=gnulinux-serial-${boot_device_id} + next_entry=gnulinux-${KERNEL_RELEASE}-serial-${boot_device_id} fi EOF diff --git a/lfs/flash-images b/lfs/flash-images index ca1ffa5e0c..cdd0fbf7e7 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -188,7 +188,7 @@ ifeq "$(BOOTLOADER)" "grub" # Create configuration mkdir -pv $(MNThdd)/boot/grub - GRUB_FIRST_BOOT=true chroot $(MNThdd) \ + GRUB_FIRST_BOOT=true KERNEL_RELEASE="$(KVER)-ipfire" chroot $(MNThdd) \ grub-mkconfig -o /boot/grub/grub.cfg # Boot the first kernel by default -- 2.39.2