From patchwork Tue Jul 27 10:07:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 4567 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GYssr3WWqz3xGr for ; Tue, 27 Jul 2021 10:07:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GYssl3nwQz6dk; Tue, 27 Jul 2021 10:07:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GYssl1K6Cz2ykp; Tue, 27 Jul 2021 10:07:23 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GYssj3dC3z2xSG for ; Tue, 27 Jul 2021 10:07:21 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GYssj2Y6yzBX; Tue, 27 Jul 2021 10:07:21 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1627380441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E/558SMHhP2hoRLK7mNQTfa9NYqX+XzrV8uN27oJEbY=; b=XEbaEzqOtIsY2xW9RgfhvZqftBMX1HEtqs2Fz7p07Tnj0HV/G+gna1OSOY+NVC69eejbRC GA71/lz4xRFrwvAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1627380441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E/558SMHhP2hoRLK7mNQTfa9NYqX+XzrV8uN27oJEbY=; b=jBHVE00W3fnGJhTkTwTiRGb96Agrl4eTzftQ4vJTGLSEddVtMB21+1ApdKnyCE6Lps+XPS ZipB3FivC4UvQZ4NZZvBX+tgjSju3PMz03YLtOja47oxZ92sEaqWzVO8Zoj6j+yRZ3vct5 WmTO8bfv2i/1CUhcc+w6/Pn7wNdk5IPWmdsLCexjc7Z46XSBrEPXWhKdX55o56SSgF70KM dUNp7wig5chZ4hDaM8tdg4kbwBglkiQUd+XsNfJ7/1uVVhqANrGx/fl3QILff8/tQorIOJ s56BnFlLmgDFymxuq4+LpIb9c4pXzw09U525T55KDwF87OIxKRhkJ+VCveLGNw== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 4/4] grub cloud: Add kernel release to boot ID Date: Tue, 27 Jul 2021 10:07:10 +0000 Message-Id: <20210727100710.5331-4-michael.tremer@ipfire.org> In-Reply-To: <20210727100710.5331-1-michael.tremer@ipfire.org> References: <20210727100710.5331-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- 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 3f9c5a185..121cb2fbd 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 ca1ffa5e0..cdd0fbf7e 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