pve-kernel-meta/proxmox-boot/000_proxmox_boot_header
Stoiko Ivanov 72ed875819 proxmox-boot: run p-b-t refresh on update-grub
If the system seems to be using proxmox-boot, simply run it, in
addition to warning the user about the situation.

Since the warning is only printed when update-grub is not called
by dpkg or proxmoxmox-boot-tool, this should be safe, and potentially
help keeping systems bootable.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-04-23 13:28:56 +02:00

25 lines
697 B
Bash
Executable File

#! /bin/sh
set -e
. /usr/share/pve-kernel-helper/scripts/functions
if proxmox-boot-tool status --quiet; then
cat <<- EOF
#
# This system is booted via proxmox-boot-tool! The grub-config used when
# booting from the disks configured with proxmox-boot-tool resides on the vfat
# partitions with UUIDs listed in ${ESP_LIST}.
# /boot/grub/grub.cfg is NOT read when booting from those disk!
EOF
if [ -z "$DPKG_RUNNING_VERSION" ] && [ -z "$PVE_EFIBOOT_UNSHARED" ]; then
warn "W: This system is booted via proxmox-boot-tool:"
warn "W: Running update-grub does not update the correct config!"
warn "W: Running: 'proxmox-boot-tool refresh'."
warn ""
proxmox-boot-tool refresh
fi
fi