mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-04-29 04:58:27 +00:00

if a (legacy) system is booted with proxmox-boot-tool, running `grub-install` without being aware of the fact can render the system unbootable (e.g. when letting the early stage point to an incompatible zpool instead of the ESP). To prevent this we add a dpkg-diversion [0], which simply checks if `proxmox-boot-tool status` indicates that proxmox-boot is used and errors out in that case, and runs the actual grub-install else. Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
13 lines
300 B
Bash
Executable File
13 lines
300 B
Bash
Executable File
#! /bin/sh
|
|
set -e
|
|
|
|
. /usr/share/pve-kernel-helper/scripts/functions
|
|
|
|
if proxmox-boot-tool status --quiet; then
|
|
warn "grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real"
|
|
exit 1
|
|
else
|
|
grub-install.real "$@"
|
|
fi
|
|
|