Have you looked for similarities in these?
RE: https://ubuntuforums.org/search.php?searchid=29165735
That is a search on the search terms "locked-nvram lenovo"... If you do that on Google, quite a few more.
If you posted more information about what your hardware actually is, it might be a bit easier to narrow that down for you, for things to try.
I am still a certified Onsite Warranty Service Tech for Lenovo, HP and Dell. I am familiar with the hardware and their default BIOS settings.
This happens on Lenovo's for a few reasons. One similarity is that most of these are laptops where Windows was installed. Usually long ago as Windows 7, then upgraded to newer releases. A lot of them were installed originally as BIOS Legacy/CSM boot. They had installed the bootloader as MBR in sector 0 of the disk... And later created an EFI partition to boot from. A lot of Lenovo's also had a BIOS setting that was hybrid, where it would allow both CSM & UEFI boot. That sort of "multiple choice" situation confuses Grub. the next is a Windows setting for hibernation, that sets the Windows filesystem in an open-suspended state, which also locks the NVRAM so that it can wake up... Those varied things setup sort of a perfect storm kind of thing.
Some of the things you can check on your own, in Windows (if installed) and in the BIOS Settings that affect Grub, is that turn off Windows Hibernation "fastboot". Next is to go into the UEFI BIOS settings to turn both SecureBoot off and set the BIOS Boot Mode to UEFI. Not hybrid, not legacy.
Depending how Windows is installed, that may break your Windows install. Yours looks like it will be fine. (from the report)
But see this in lines 68 through 72?
Code:
chroot /mnt/boot-sav/nvme0n1p5 grub-install --efi-directory=/boot/efi --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported
There is that perfect storm... It should be able to see those efi variables in sysfs.
One way around that is to ensure you create an Installer LiveUSB as GPT/UEFI boot. Ceck the boot mode on your own:
Code:
ls /sys/firmware/efi/efivars
If you have output, it booted in UEFI mode.
Mount the installed filesystem...
Code:
sudo su -
modprobe efivars
mount /dev/nvme0np5 /mnt
mount /dev/nvme0np1 /mnt/boot/efi
mount -t efivarfs none /sys/firmware/efi/efivars
mount --make-private --rbind /dev /mnt/dev
mount --make-private --rbind /proc /mnt/proc
mount --make-private --rbind /sys /mnt/sys
mount --make-private --rbind /run /mnt/run
chroot /mnt /usr/bin/env bash --login
## This is your test:
ls /sys/firmware/efi/efivars
## If it has ouput, go on. If not stop here.
apt install --yes grub-efi-amd64 grub-efi-amd64-signed linux-image-generic shim-signed
grub-probe /boot
## ^^^ If this goes with no errors, go on
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck --no-floppy
## If no errors, go on
exit
reboot