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.
It's not hard, check out the patch: https://git.proxmox.com/?p=pve-kern...ff;h=18a8d30651498aaf64d3a8aee1d759fb9a9147a3can you explain to me how to do that patching the file /usr/sbin/grub-install ?
If it is easy, I will do it directly
set -e
command, almost at the top:. /usr/share/pve-kernel-helper/scripts/functions
If I nano this: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 theset -e
command, almost at the top:
. /usr/share/pve-kernel-helper/scripts/functions
/usr/share/pve-kernel-helper/scripts/functions
I see this:. /usr/share/pve-kernel-helper/scripts/functions
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.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 !!!
set -e
ESP_LIST="/etc/kernel/proxmox-boot-uuids"
...
...
set -e
. /usr/share/pve-kernel-helper/scripts/functions
ESP_LIST="/etc/kernel/proxmox-boot-uuids"
...
...
grub-install.real /dev/sda
grub-install.real /dev/sdb
FYI - this problem is not only PVE side, because last night maintenance it hit (semirandomly) about 5% VMs.
hello here Same problemThanks 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.
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
grub-install.real /dev/nvme1n1
grub-install.real /dev/nvme1n1p1
grub-install.real /dev/md2
yes the fix is even in pve-enterprise by now.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?
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 thereSo at the grub error you can click on "YES" and before rebooting I give the command "grub-install.real /dev/sdXXXXX" correct?
Hello, I had the same problem.yes the fix is even in pve-enterprise by now.
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!
root@pve:~# grub-install.real /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
root@pve:~# grub-install.real /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.
update-initramfs: Generating /boot/initrd.img-5.15.60-2-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/85F8-7F41
Copying kernel 5.13.19-2-pve
Copying kernel 5.13.19-6-pve
Copying kernel 5.15.35-3-pve
cp: error writing '/var/tmp/espmounts/85F8-7F41/initrd.img-5.15.35-3-pve': No space left on device
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
pve-kernel-5.15.60-2-pve
pve-kernel-5.15
pve-kernel-5.15.35-3-pve
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Your System is up-to-date
root@pve:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 32G 0 32G 0% /dev
tmpfs 6.3G 1.6M 6.3G 1% /run
rpool/ROOT/pve-1 2.1T 275G 1.9T 13% /
tmpfs 32G 49M 32G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
rpool 1.9T 128K 1.9T 1% /rpool
rpool/data 1.9T 128K 1.9T 1% /rpool/data
rpool/ROOT 1.9T 128K 1.9T 1% /rpool/ROOT
rpool/data/subvol-101-disk-0 600G 62G 539G 11% /rpool/data/subvol-101-disk-0
rpool/share 6.4T 4.6T 1.9T 72% /rpool/share
nvmepool 826G 128K 826G 1% /nvmepool
nvmepool/subvol-102-disk-1 60G 36G 25G 59% /nvmepool/subvol-102-disk-1
nvmepool/subvol-103-disk-0 20G 235M 20G 2% /nvmepool/subvol-103-disk-0
nvmepool/subvol-105-disk-0 1.0G 182M 843M 18% /nvmepool/subvol-105-disk-0
nvmepool/subvol-102-disk-0 2.0G 46M 2.0G 3% /nvmepool/subvol-102-disk-0
nvmepool/subvol-101-disk-0 2.0G 112M 1.9G 6% /nvmepool/subvol-101-disk-0
nvmepool/subvol-300-disk-0 16G 3.6G 13G 23% /nvmepool/subvol-300-disk-0
nvmepool/subvol-102-disk-2 30G 128K 30G 1% /nvmepool/subvol-102-disk-2
rpool/data/subvol-106-disk-0 1.0G 128M 897M 13% /rpool/data/subvol-106-disk-0
nvmepool/subvol-104-disk-0 2.0G 1.4G 646M 69% /nvmepool/subvol-104-disk-0
/dev/fuse 128M 40K 128M 1% /etc/pve
tmpfs 6.3G 0 6.3G 0% /run/user/0
seems you have too many kernels on your ESPsHowever, there was still an error before the end of the update:
The first apt autoremove want removed this, but the error remain:seems you have too many kernels on your ESPs
try running:
* `apt autoremove`
* if this does not free up enough space - try removing a few pve-kernel packages manually (`pveversion -v` should give you a list)
if you still run into errors - post them here - along with the output of `proxmox-boot-tool kernel list`
root@pve:~# apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
pve-kernel-5.13.19-3-pve pve-kernel-5.15.35-3-pve pve-kernel-5.4 pve-kernel-5.4.157-1-pve
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 998 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 115254 files and directories currently installed.)
Removing pve-kernel-5.15.35-3-pve (5.15.35-6) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
update-initramfs: Deleting /boot/initrd.img-5.15.35-3-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
Re-executing '/etc/kernel/postrm.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/85F8-7F41
Copying kernel 5.13.19-2-pve
Copying kernel 5.13.19-6-pve
Copying kernel 5.15.35-2-pve
Copying kernel 5.15.60-2-pve
cp: error writing '/var/tmp/espmounts/85F8-7F41/vmlinuz-5.15.60-2-pve': No space left on device
run-parts: /etc/kernel/postrm.d/zz-proxmox-boot exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/pve-kernel-5.15.35-3-pve.postrm line 14.
dpkg: error processing package pve-kernel-5.15.35-3-pve (--remove):
installed pve-kernel-5.15.35-3-pve package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
pve-kernel-5.15.35-3-pve
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@pve:~# apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
pve-kernel-5.15.35-3-pve
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 379 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 108033 files and directories currently installed.)
Removing pve-kernel-5.15.35-3-pve (5.15.35-6) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
update-initramfs: Deleting /boot/initrd.img-5.15.35-3-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
Re-executing '/etc/kernel/postrm.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/85F8-7F41
Copying kernel 5.13.19-2-pve
Copying kernel 5.13.19-6-pve
Copying kernel 5.15.35-2-pve
Copying kernel 5.15.60-2-pve
cp: error writing '/var/tmp/espmounts/85F8-7F41/vmlinuz-5.15.60-2-pve': No space left on device
run-parts: /etc/kernel/postrm.d/zz-proxmox-boot exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/pve-kernel-5.15.35-3-pve.postrm line 14.
dpkg: error processing package pve-kernel-5.15.35-3-pve (--remove):
installed pve-kernel-5.15.35-3-pve package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
pve-kernel-5.15.35-3-pve
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@pve:~# pveversion -v
proxmox-ve: 7.2-1 (running kernel: 5.13.19-2-pve)
pve-manager: 7.2-11 (running version: 7.2-11/b76d3178)
pve-kernel-helper: 7.2-13
pve-kernel-5.13: 7.1-9
pve-kernel-5.4: 6.4-11
pve-kernel-5.0: 6.0-11
pve-kernel-5.15.35-2-pve: 5.15.35-5
pve-kernel-5.15.35-1-pve: 5.15.35-3
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-3-pve: 5.13.19-7
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.4.157-1-pve: 5.4.157-1
pve-kernel-5.0.21-5-pve: 5.0.21-10
pve-kernel-5.0.15-1-pve: 5.0.15-1
...
The active kernel is:
root@pve:~# uname -r
5.13.19-2-pve
root@pve:~# proxmox-boot-tool kernel list
Manually selected kernels:
None.
Automatically selected kernels:
5.13.19-2-pve
5.13.19-6-pve
5.15.35-2-pve
5.15.60-2-pve
apt purge pve-kernel-5.0.15-1-pve
apt purge pve-kernel-5.0
apt purge pve-kernel-5.4.157-1-pve