[pve-devel] [PATCH proxmox-kernel-helper] grub-wrapper: don't fail on reinit/refresh error
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Nov 21 08:53:05 CET 2023
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 at 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
More information about the pve-devel
mailing list