seems adding `--removable` makes grub install ignore most other
information - e.g. the bootloader-id (guessed based on [0]).
add dedicated call with out `--removable` in addition

Seems that's the reason why our installer also 'rolls its own
removable' [1]

minimally tested with an ISO with this installed and an install with
ZFS on / (RAID1).

[0] https://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c#n1142
[1] 
https://git.proxmox.com/?p=pve-installer.git;a=blob;f=Proxmox/Install.pm;h=8825699416475b1934527531db4fbb40e9473ce8;hb=HEAD#l608

Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com>
---
 src/bin/proxmox-boot-tool | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/bin/proxmox-boot-tool b/src/bin/proxmox-boot-tool
index e70850a..2903ff3 100755
--- a/src/bin/proxmox-boot-tool
+++ b/src/bin/proxmox-boot-tool
@@ -161,6 +161,14 @@ init_bootloader() {
        if [ -d /sys/firmware/efi ]; then
                if [ -n "$mode" ] && [ "$mode" = "grub" ]; then
                        echo "Installing grub x86_64 target.."
+                       grub-install.real \
+                               --boot-directory "${esp_mp}" \
+                               --target x86_64-efi \
+                               --no-floppy \
+                               --efi-directory "${esp_mp}" \
+                               --bootloader-id 'proxmox' \
+                               "/dev/$PKNAME"
+                       echo "Installing grub x86_64 target (removable).."
                        grub-install.real \
                                --boot-directory "${esp_mp}" \
                                --target x86_64-efi \
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to