Proxmox update from 7.2-4 GRUB update failure

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
5,340
1,645
164
South Tyrol/Italy
shop.proxmox.com
Thanks to your testing feedback and the nature of the fix, which is quite targeted and contained, with a basically non-existent regression potential, we decided to fast track that fix. It should be available on all repos now.
 

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
5,340
1,645
164
South Tyrol/Italy
shop.proxmox.com
can you explain to me how to do that patching the file /usr/sbin/grub-install ?

If it is easy, I will do it directly
It's not hard, check out the patch: https://git.proxmox.com/?p=pve-kern...ff;h=18a8d30651498aaf64d3a8aee1d759fb9a9147a3

You basically need to source a specific helper file, which is done with the dot command, so edit the file and add the following line bewlo the set -e command, almost at the top:

. /usr/share/pve-kernel-helper/scripts/functions
 

genguser

New Member
Mar 5, 2021
4
1
3
122
In my case i just did three things.
1. add repo into /etc/apt/sources.list: deb http://download.proxmox.com/debian/pve bullseye pvetest
2. apt update && apt install pve-kernel-helper
3. grub-install.real /dev/sdX (replace sdX with your device where you have grub. in my case it was "grub-install.real /dev/sdq")
then reboot.
 

nontijt

New Member
Sep 11, 2022
11
2
3
It's not hard, check out the patch: https://git.proxmox.com/?p=pve-kern...ff;h=18a8d30651498aaf64d3a8aee1d759fb9a9147a3

You basically need to source a specific helper file, which is done with the dot command, so edit the file and add the following line bewlo the set -e command, almost at the top:

. /usr/share/pve-kernel-helper/scripts/functions
If I nano this: /usr/share/pve-kernel-helper/scripts/functions I see this:

functions.png

Is this the correct place to edit and add this line?
. /usr/share/pve-kernel-helper/scripts/functions

after that, what to do?

Many many thanks for you quick responses !!! :)
 
Last edited:

genguser

New Member
Mar 5, 2021
4
1
3
122
If I nano this: /usr/share/pve-kernel-helper/scripts/functions I see this:

View attachment 41029

Is this the correct place to edit and add this line?
. /usr/share/pve-kernel-helper/scripts/functions

after that, what to do?

Many many thanks for you quick responses !!! :)
I don't think that's the right file. I did look into that git patch link which is above and that patch is for filename called grub-install-wrapper which should be part of pve-kernel-meta. I don't know where it should be exactly. Maybe someone other can tell you more.
Maybe somewhere in /tmp but i don't know.
 
Last edited:

nontijt

New Member
Sep 11, 2022
11
2
3
/usr/sbin/grub-install

however, in doing so, the loop stil goes on. I pressed continue without grub install now
 
Last edited:
  • Like
Reactions: genguser

nontijt

New Member
Sep 11, 2022
11
2
3
OK, all good here now.
Steps I did

nano /usr/sbin/grub-install

changed

Code:
set -e

ESP_LIST="/etc/kernel/proxmox-boot-uuids"
...
...
to
Code:
set -e

. /usr/share/pve-kernel-helper/scripts/functions

ESP_LIST="/etc/kernel/proxmox-boot-uuids"
...
...

however, this did not seem to do anything so I selected "Continue without installing GRUB?" <YES>

After that, the update process continued and ended (seemingly normal).

For reference, this was the output of the original update (with loop in grub2 update)
CLI update text 1: Link

Directly when it was done i did a refresh of the updates, I saw two updates and ran those.
CLI update text 2: Link

Also those two updates ended normal now.

Reboot PVE

Came back normal. My ZFS volumes as normal
 

Attachments

  • update 1.txt
    23.5 KB · Views: 8
  • update 2.txt
    2.4 KB · Views: 2

cc_mha

Member
May 21, 2015
2
2
23
When the kernel-helper update wasn't available yesterday, I upgraded and chose "update anyway" as grub-install complained about my ZFS/rpool it couldn't use. After that I manually did
grub-install.real /dev/sda grub-install.real /dev/sdb
so both of my Pool-Disks where affected.

I did not reboot afterwards.

Today I installed the pve-kernel-helper update and rebootet afterwards.

Worked for me!
 

czechsys

Well-Known Member
Nov 18, 2015
333
28
48
FYI - this problem is not only PVE side, because last night maintenance it hit (semirandomly) about 5% VMs.
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
7,230
1,137
164
FYI - this problem is not only PVE side, because last night maintenance it hit (semirandomly) about 5% VMs.

this particular issue was present on Proxmox systems (theoretically all could be affected PVE, PBS, PMG, or for that matter any system that has pve-kernel-helper installed) - but if you ran into issues during an `apt dist-upgrade` on plain debian/ubuntu after the weekend I think it should not be related to this issue (if you post some logs of the issue we can maybe tell more)
 
  • Like
Reactions: nontijt

janssensm

Well-Known Member
Dec 18, 2016
228
72
48
To add an extra data point:
Just upgraded a physical pve server, installed from 6.4, no manual adjustments to proxmox-boot-tool, booted with legacy bios.
It's using pve-no-subscription repo, the upgrade included pve-kernel-helper: 7.2-12.
No issues, upgrade went fine. Thanks for the quick response.
 
  • Like
Reactions: nontijt

Bic72

New Member
Sep 19, 2022
7
0
1
Thanks to your testing feedback and the nature of the fix, which is quite targeted and contained, with a basically non-existent regression potential, we decided to fast track that fix. It should be available on all repos now.
hello here Same problem
sorry but I'm not very experienced I try to summarize:

so if I understood correctly from your post it is no longer necessary to insert the test repo, can you keep it with the repo "pve no subscription" now?

So at the grub error you can click on "YES" and before rebooting I give the command "grub-install.real /dev/sdXXXXX" correct?

Code:
root@S1-web:~# lsblk -o NAME,MOUNTPOINT
NAME          MOUNTPOINT
nvme1n1      
├─nvme1n1p1   /boot/efi
├─nvme1n1p2  
│ └─md2       /boot
├─nvme1n1p3  
│ └─md3       /
├─nvme1n1p4   [SWAP]
└─nvme1n1p5  
  └─md5      
    └─vg-data /var/lib/vz
nvme0n1      
├─nvme0n1p1  
├─nvme0n1p2  
│ └─md2       /boot
├─nvme0n1p3  
│ └─md3       /
├─nvme0n1p4   [SWAP]
├─nvme0n1p5  
│ └─md5      
│   └─vg-data /var/lib/vz
└─nvme0n1p6

in my case I have a raid which is correct?
Code:
grub-install.real /dev/nvme1n1
Code:
grub-install.real /dev/nvme1n1p1
Code:
grub-install.real /dev/md2

thank you
 
Last edited:

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
7,230
1,137
164
so if I understood correctly from your post it is no longer necessary to insert the test repo, can you keep it with the repo "pve no subscription" now?
yes the fix is even in pve-enterprise by now.
So at the grub error you can click on "YES" and before rebooting I give the command "grub-install.real /dev/sdXXXXX" correct?
should work - sadly it's been quite a long while since I had to deal with mdraid (which Proxmox VE does not really support) - but from what I can remember - you want to run grub-install.real on /dev/nvme1n1 and /dev/nvme0n1 (the 2 blockdevices) and that should be all - however it shouldn't hurt to also run in on /dev/md2 - usually grub-install will tell you that it can't install itself there

as always - make sure you have a working and tested backup before those operations!

should you run into any issues - you can boot with a linux-livecd (or the pve-installer in debug mode (there change to the second debug-shell) and fix the boot-loader installation (google for the necessary commands - but https://pve.proxmox.com/wiki/Recover_From_Grub_Failure should be a good start (you will need to adapt to your nvme drives instead of /dev/sda...)

I hope this helps!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!