From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 137E8C92D for ; Tue, 12 Apr 2022 11:46:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 10448CC37 for ; Tue, 12 Apr 2022 11:46:27 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 36D3BCC2C for ; Tue, 12 Apr 2022 11:46:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 08C9640C19 for ; Tue, 12 Apr 2022 11:46:26 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Tue, 12 Apr 2022 11:46:14 +0200 Message-Id: <20220412094614.2123910-3-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220412094614.2123910-1-s.ivanov@proxmox.com> References: <20220412094614.2123910-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.210 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH docs 2/2] sys: boot: minimally document kernel version pinning X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 09:46:27 -0000 Signed-off-by: Stoiko Ivanov --- system-booting.adoc | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/system-booting.adoc b/system-booting.adoc index 2b96409..7d8ff47 100644 --- a/system-booting.adoc +++ b/system-booting.adoc @@ -68,6 +68,7 @@ device fails. * copying and configuring new kernel images and initrd images to all listed ESPs * synchronizing the configuration on kernel upgrades and other maintenance tasks * managing the list of kernel versions which are synchronized +* configuring the boot-loader to boot a particular kernel version (pinning) You can view the currently configured ESPs and their state by running: @@ -286,3 +287,50 @@ The kernel commandline needs to be placed in the variable The kernel commandline needs to be placed as one line in `/etc/kernel/cmdline`. To apply your changes, run `proxmox-boot-tool refresh`, which sets it as the `option` line for all config files in `loader/entries/proxmox-*.conf`. + + +[[sysboot_kernel_pin]] +Selecting the kernel-version for booting +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In addition to actively watching the boot process to select an older kernel +version to boot into, you can also use `proxmox-boot-tool` to `pin` the kernel +version the system should use. This should help you to work around +incompatibilities between a newer kernel version and the hardware. Such a +`pin` should be removed as soon as possible in order to have all the latest +security patches in place. + +NOTE: The pinning functionality works for all {pve} systems, not only those +using `proxmox-boot-tool` to synchronize the contents of the ESPs, if your +system does not use `proxmox-boot-tool` for synchronizing you can also skip the +`proxmox-boot-tool refresh` call in the end. + +To permanently select the version `5.15.30-1-pve` for booting run: + +---- +# proxmox-boot-tool kernel pin 5.15.30-1-pve +---- + +You can also set a kernel version to be booted on the next system boot only +(e.g. to test if an updated kernel has resolved an issue, which caused you +to `pin` a version in the first place): + +---- +# proxmox-boot-tool kernel pin 5.15.31-1-pve --next-boot +---- + +To remove any pinned version configuration use the `unpin` subcommand: + +---- +# proxmox-boot-tool kernel unpin +---- + +While `unpin` has a `--next-boot` option as well, it is used to clear a pinned +version set with `--next-boot` and manually invoking is of little use. + +After setting or clearing pinned versions you also need to synchronize the +content and configuration on the ESPs by running the `refresh` subcommand: + +---- +# proxmox-boot-tool refresh +---- -- 2.30.2