public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-kernel-helper] grub-wrapper: don't fail on reinit/refresh error
@ 2023-11-21  7:53 Fabian Grünbichler
  2023-11-21  8:21 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2023-11-21  7:53 UTC (permalink / raw)
  To: pve-devel

these can happen for example if the system
- is set up to boot using systemd-boot
- but grub updates trigger a call to "grub-install"
- and systemd-boot is not installed

in this case, "proxmox-boot-tool reinit" will fail because of the lack of
"systemd-boot", and the upgrade triggering the grub-install call would error
out.

all the error messages/warnings are still printed and hopefully noticed.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 src/bin/grub-install-wrapper | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/grub-install-wrapper b/src/bin/grub-install-wrapper
index 97649a4..9264303 100755
--- a/src/bin/grub-install-wrapper
+++ b/src/bin/grub-install-wrapper
@@ -10,8 +10,9 @@ if proxmox-boot-tool status --quiet; then
             MARKER_FILE="/tmp/proxmox-boot-tool.dpkg.marker"
             if [ ! -e "$MARKER_FILE" ]; then
                 warn "This system is booted via proxmox-boot-tool, running proxmox-boot-tool init for all configured bootdisks"
-                proxmox-boot-tool reinit
-                proxmox-boot-tool refresh
+                # can fail for various reasons, but we don't want to fail the upgrade..
+                proxmox-boot-tool reinit || true
+                proxmox-boot-tool refresh || true
                 touch "$MARKER_FILE"
                 exit 0
             else
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-21  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21  7:53 [pve-devel] [PATCH proxmox-kernel-helper] grub-wrapper: don't fail on reinit/refresh error Fabian Grünbichler
2023-11-21  8:21 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal