0

I dual booted my HP laptop with Ubuntu today and everything was working fine. Later I booted into Windows 11 and restarted the laptop and the grub no longer shows up. So I checked the UEFI boot order and only windows was in it. There was no Ubuntu. I tried reinstalling Ubuntu but the same issue came back. Then I ran boot repair from a live usb and it showed a locked NVram issue which I have no idea about. I have included boot-repair summary below.

boot-repair-4ppa203                                             [20221223_1601]

============================= Boot Repair Summary ==============================

Recommended repair: ____________________________________________________________

The default repair of the Boot-Repair utility will reinstall the grub-efi of nvme0n1p8, using the following options: nvme0n1p1/boot/efi Additional repair will be performed: unhide-bootmenu-10s use-standard-efi-file

Mount nvme0n1p1 on /mnt/boot-sav/nvme0n1p8/boot/efi

Unhide GRUB boot menu in nvme0n1p8/etc/default/grub

===================== Reinstall the grub-efi of nvme0n1p8 ======================

chroot /mnt/boot-sav/nvme0n1p8 grub-install --version grub-install (GRUB) 2.06-2ubuntu7 chroot /mnt/boot-sav/nvme0n1p8 modprobe efivars

chroot /mnt/boot-sav/nvme0n1p8 efibootmgr -v before grub install BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0000,0001,0003,0004 Boot0000* Windows Boot Manager HD(1,GPT,a0959a8d-d457-4c76-afe4-7c1a16d270ba,0x800,0x82000)/File(EFIMicrosoftBootbootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...&................ Boot0001* Internal Hard Disk PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(5,GPT,8ab946cd-87d7-6545-9d2e-958aa76179f2,0x2bad1800,0x96000)..BO Boot0003* Internal Hard Disk PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(6,GPT,22c6d891-2c8f-4e31-8dff-54b06692e8a7,0x3a94b800,0x3e7fff)..BO Boot0004* USB Drive (UEFI) - USB PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(5,0)/HD(1,MBR,0x1f091577,0x800,0x3956800)..BO

chroot /mnt/boot-sav/nvme0n1p8 uname -r 5.15.0-43-generic

chroot /mnt/boot-sav/nvme0n1p8 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. cp /mnt/boot-sav/nvme0n1p8/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/nvme0n1p5/EFI/ubuntu/grubx64.efi cp /mnt/boot-sav/nvme0n1p8/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/nvme0n1p6/EFI/ubuntu/grubx64.efi df /dev/nvme0n1p1 mv /mnt/boot-sav/nvme0n1p8/boot/efi/EFI/Boot/bootx64.efi /mnt/boot-sav/nvme0n1p8/boot/efi/EFI/Boot/bkpbootx64.efi cp /mnt/boot-sav/nvme0n1p8/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/nvme0n1p8/boot/efi/EFI/Boot/bootx64.efi df /dev/nvme0n1p5 mv /mnt/boot-sav/nvme0n1p5/EFI/Boot/bootx64.efi /mnt/boot-sav/nvme0n1p5/EFI/Boot/bkpbootx64.efi cp /mnt/boot-sav/nvme0n1p8/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/nvme0n1p5/EFI/Boot/bootx64.efi df /dev/nvme0n1p6 mv /mnt/boot-sav/nvme0n1p6/EFI/Boot/bootx64.efi /mnt/boot-sav/nvme0n1p6/EFI/Boot/bkpbootx64.efi cp /mnt/boot-sav/nvme0n1p8/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/nvme0n1p6/EFI/Boot/bootx64.efi

chroot /mnt/boot-sav/nvme0n1p8 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.

chroot /mnt/boot-sav/nvme0n1p8 efibootmgr -v after grub install BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0000,0001,0003,0004 Boot0000* Windows Boot Manager HD(1,GPT,a0959a8d-d457-4c76-afe4-7c1a16d270ba,0x800,0x82000)/File(EFIMicrosoftBootbootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...&................ Boot0001* Internal Hard Disk PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(5,GPT,8ab946cd-87d7-6545-9d2e-958aa76179f2,0x2bad1800,0x96000)..BO Boot0003* Internal Hard Disk PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(6,GPT,22c6d891-2c8f-4e31-8dff-54b06692e8a7,0x3a94b800,0x3e7fff)..BO Boot0004* USB Drive (UEFI) - USB PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(5,0)/HD(1,MBR,0x1f091577,0x800,0x3956800)..BO Error: NVram is locked (Ubuntu not found in efibootmgr). Please report this message to boot.repair@gmail.com

chroot /mnt/boot-sav/nvme0n1p8 update-grub Sourcing file /etc/default/grub' Sourcing file/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-56-generic Found initrd image: /boot/initrd.img-5.15.0-56-generic Found linux image: /boot/vmlinuz-5.15.0-43-generic Found initrd image: /boot/initrd.img-5.15.0-43-generic Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi

Unhide GRUB boot menu in nvme0n1p8/boot/grub/grub.cfg

An error occurred during the repair. Error: NVram is locked (Ubuntu not found in efibootmgr). Please report this message to boot.repair@gmail.com

Locked-NVram detected.

============================ Boot Info After Repair ============================

=> No boot loader is installed in the MBR of /dev/nvme0n1. => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks for (hd0,msdos1)/boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
biosdisk fshelp fat exfat ext2 ntfs ntfscomp part_msdos
---------------------------------------------------------------------------

nvme0n1p1: _____________________________________________________________________

File system:    vfat
Boot sector type:  Windows 8/10/11/2012: FAT32
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:     /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi
                /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi /efi/HP/DI.efi
                /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi
                /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg
                /efi/HP/BIOSUpdate/BiosMgmt.efi
                /efi/HP/BIOSUpdate/CryptRSA.efi
                /efi/HP/SystemDiags/CryptRSA.efi
                /efi/HP/SystemDiags/DI.efi
                /efi/HP/SystemDiags/SysDiags.efi
                /efi/Microsoft/Boot/bootmgfw.efi
                /efi/Microsoft/Boot/bootmgr.efi

nvme0n1p2: _____________________________________________________________________

File system:     
Boot sector type:  -
Boot sector info:

nvme0n1p3: _____________________________________________________________________

File system:    ntfs
Boot sector type:  Windows 8/10/11/2012: NTFS
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  Windows 10 or 11
Boot files:     /Windows/System32/winload.exe

nvme0n1p4: _____________________________________________________________________

File system:    ntfs
Boot sector type:  Windows 8/10/11/2012: NTFS
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:      

nvme0n1p5: _____________________________________________________________________

File system:    vfat
Boot sector type:  FAT32
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:     /efi/boot/bkpbootx64.efi /efi/boot/bootx64.efi
                /efi/ubuntu/grubx64.efi

nvme0n1p6: _____________________________________________________________________

File system:    vfat
Boot sector type:  FAT32
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:     /efi/BOOT/bkpbootx64.efi /efi/BOOT/bootx64.efi
                /efi/pop/grubx64.efi
                /efi/Pop_OS-6dee65cd-e402-40fc-b8e6-e28c9dec8f19/vmlinu
                z.efi /efi/systemd/systemd-bootx64.efi
                /efi/ubuntu/grubx64.efi /efi/pop/grub.cfg

nvme0n1p7: _____________________________________________________________________

File system:    ntfs
Boot sector type:  Windows 8/10/11/2012: NTFS
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:      

nvme0n1p8: _____________________________________________________________________

File system:    ext4
Boot sector type:  -
Boot sector info:
Operating System:  Ubuntu 22.04.1 LTS
Boot files:     /boot/grub/grub.cfg /etc/fstab /etc/default/grub

nvme0n1p9: _____________________________________________________________________

File system:    ext4
Boot sector type:  -
Boot sector info:
Operating System:  
Boot files:      

nvme0n1p10: ____________________________________________________________________

File system:    swap
Boot sector type:  -
Boot sector info:

sda1: __________________________________________________________________________

File system:    vfat
Boot sector type:  MSWIN4.1: FAT32
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:     /boot/grub/grub.cfg /efi/boot/bootx64.efi
                /efi/boot/grubx64.efi /efi/boot/mmx64.efi


================================ 2 OS detected =================================

OS#1: Ubuntu 22.04.1 LTS on nvme0n1p8 OS#2: Windows 10 or 11 on nvme0n1p3

================================ Host/Hardware =================================

CPU architecture: 64-bit Video: Lucienne from Advanced Micro Devices, Inc. [AMD/ATI] Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.1 LTS, jammy, x86_64)

===================================== UEFI =====================================

BIOS/UEFI firmware: F.18(15.18) from AMI The firmware is EFI-compatible, and is set in EFI-mode for this live-session. SecureBoot disabled (confirmed by mokutil). BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0000,0001,0003,0004 Boot0000* Windows Boot Manager HD(1,GPT,a0959a8d-d457-4c76-afe4-7c1a16d270ba,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...&................ Boot0001* Internal Hard Disk PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(5,GPT,8ab946cd-87d7-6545-9d2e-958aa76179f2,0x2bad1800,0x96000)..BO Boot0003* Internal Hard Disk PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(6,GPT,22c6d891-2c8f-4e31-8dff-54b06692e8a7,0x3a94b800,0x3e7fff)..BO Boot0004* USB Drive (UEFI) - USB PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(5,0)/HD(1,MBR,0x1f091577,0x800,0x3956800)..BO

728124f6ec8e22fbdbe7034812c81b95 nvme0n1p1/Boot/bkpbootx64.efi 728124f6ec8e22fbdbe7034812c81b95 nvme0n1p1/Boot/bootx64.efi c152ec201c37b6e97bbc2207e49d1271 nvme0n1p1/Boot/fbx64.efi fdafb5eece6caeccb788c946a28e6872 nvme0n1p1/Boot/mmx64.efi 345123d1a11fad935d584fa50dbf3b3c nvme0n1p1/HP/DI.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p1/ubuntu/grubx64.efi fdafb5eece6caeccb788c946a28e6872 nvme0n1p1/ubuntu/mmx64.efi 728124f6ec8e22fbdbe7034812c81b95 nvme0n1p1/ubuntu/shimx64.efi 7b5e70643634fef9ae4c3be43e4c379a nvme0n1p1/HP/BIOSUpdate/BiosMgmt.efi 6488d391f74263c9da3c3d47dffa6212 nvme0n1p1/HP/BIOSUpdate/CryptRSA.efi 6488d391f74263c9da3c3d47dffa6212 nvme0n1p1/HP/SystemDiags/CryptRSA.efi 345123d1a11fad935d584fa50dbf3b3c nvme0n1p1/HP/SystemDiags/DI.efi a5d16d56dc4eb159dfb3d5a0741b9d52 nvme0n1p1/HP/SystemDiags/SysDiags.efi 07a7ced3085173b26c2bd4bdec6f2164 nvme0n1p1/Microsoft/Boot/bootmgfw.efi d8ebd12190e73aa742a97caa56be7785 nvme0n1p1/Microsoft/Boot/bootmgr.efi 7eca7c30cae38e440c188f3e9b371a1a nvme0n1p5/boot/bkpbootx64.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p5/boot/bootx64.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p5/ubuntu/grubx64.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p6/BOOT/bkpbootx64.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p6/BOOT/bootx64.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p6/pop/grubx64.efi ab181536d22ae00f076d93003180d4d4 nvme0n1p6/Pop_OS-6dee65cd-e402-40fc-b8e6-e28c9dec8f19/vmlinuz.efi 4dd73316109adbd8ab233a8384f5beb7 nvme0n1p6/systemd/systemd-bootx64.efi 3795ef72a4ed0369ca44e711527904bf nvme0n1p6/ubuntu/grubx64.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

nvme0n1 : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, has-win, 2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

nvme0n1p1 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far nvme0n1p3 : is-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios nvme0n1p4 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios nvme0n1p5 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios nvme0n1p6 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios nvme0n1p7 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios nvme0n1p8 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, farbios nvme0n1p9 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios

Partitions info (2/3): _________________________________________________________

nvme0n1p1 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p3 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p4 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p5 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p6 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p7 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot nvme0n1p8 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot nvme0n1p9 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot

Partitions info (3/3): _________________________________________________________

nvme0n1p1 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p3 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p4 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p5 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p6 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p7 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1 nvme0n1p8 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, nvme0n1 nvme0n1p9 : maybesepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disk identifier: 61C52EB5-07D1-41AE-AD5B-8F6CA6D13042 Start End Sectors Size Type nvme0n1p1 2048 534527 532480 260M EFI System nvme0n1p2 534528 567295 32768 16M Microsoft reserved nvme0n1p3 567296 691804159 691236864 329.6G Microsoft basic data nvme0n1p4 691804160 732764159 40960000 19.5G Microsoft basic data nvme0n1p5 732764160 733378559 614400 300M EFI System nvme0n1p6 982824960 986920958 4095999 2G EFI System nvme0n1p7 999008256 1000202239 1193984 583M Windows recovery environment nvme0n1p8 733378560 928690175 195311616 93.1G Linux filesystem nvme0n1p9 928690176 982824959 54134784 25.8G Linux filesystem nvme0n1p10 986920960 994734079 7813120 3.7G Linux swap Partition table entries are not in disk order. Disk sda: 28.67 GiB, 30784094208 bytes, 60125184 sectors Disk identifier: 0x1f091577 Boot Start End Sectors Size Id Type sda1 * 2048 60125183 60123136 28.7G c W95 FAT32 (LBA)

parted -lm (filtered): _________________________________________________________

sda:30.8GB:scsi:512:512:msdos: USB SanDisk 3.2Gen1:; 1:1049kB:30.8GB:30.8GB:fat32::boot, lba; nvme0n1:512GB:nvme:512:512:gpt:INTEL SSDPEKNU512GZH:; 1:1049kB:274MB:273MB:fat32:EFI system partition:boot, esp; 2:274MB:290MB:16.8MB::Microsoft reserved partition:msftres; 3:290MB:354GB:354GB:ntfs:Basic data partition:msftdata; 4:354GB:375GB:21.0GB:ntfs:Basic data partition:msftdata; 5:375GB:375GB:315MB:fat32::boot, esp; 8:375GB:475GB:100GB:ext4::; 9:475GB:503GB:27.7GB:ext4::; 6:503GB:505GB:2097MB:fat32::boot, esp; 10:505GB:509GB:4000MB:linux-swap(v1)::swap; 7:511GB:512GB:611MB:ntfs:Basic data partition:hidden, diag;

Free space >10MiB: ______________________________________________________________

nvme0n1: 485710MiB:487797MiB:2087MiB

blkid (filtered): ______________________________________________________________

NAME FSTYPE UUID PARTUUID LABEL PARTLABEL sda
└─sda1 vfat 800C-FCDC 1f091577-01 UBUNTU 22_0
nvme0n1
├─nvme0n1p1 vfat 8A0B-EAEB a0959a8d-d457-4c76-afe4-7c1a16d270ba SYSTEM EFI system partition ├─nvme0n1p2 952df0f6-6d10-4460-8073-36c09f045a2d Microsoft reserved partition ├─nvme0n1p3 ntfs EAEE2311EE22D61B 70470715-64c4-483f-9e0d-315ca84251ba Windows Basic data partition ├─nvme0n1p4 ntfs 7EA030F8A030B88B 7ad82310-9890-4930-929d-5e469de5a275 My Files Basic data partition ├─nvme0n1p5 vfat 2261-38E4 8ab946cd-87d7-6545-9d2e-958aa76179f2 NO_LABEL
├─nvme0n1p6 vfat 901E-258B 22c6d891-2c8f-4e31-8dff-54b06692e8a7
├─nvme0n1p7 ntfs F026F02826EFEE12 64b9a7fe-5d4e-4a32-9b8a-00ea84730181 Windows RE tools Basic data partition ├─nvme0n1p8 ext4 948b24e5-7f01-4f5e-9964-da6e7b035613 7742623a-3762-4840-8479-2d7f96505eb3
├─nvme0n1p9 ext4 e35a3ead-216d-4fcd-bd55-04cbe02d1b10 39351909-687d-426f-b806-2c41748f7465
└─nvme0n1p10 swap d14b79f3-80dc-44ac-9007-9ba2d1132289 74b9a332-7b92-481c-9afc-59791a996962

Mount points (filtered): _______________________________________________________

                    Avail Use% Mounted on

/dev/nvme0n1p1 184.8M 28% /mnt/boot-sav/nvme0n1p1 /dev/nvme0n1p3 163.8G 50% /mnt/boot-sav/nvme0n1p3 /dev/nvme0n1p4 17.7G 10% /mnt/boot-sav/nvme0n1p4 /dev/nvme0n1p5 295.9M 1% /mnt/boot-sav/nvme0n1p5 /dev/nvme0n1p6 1.8G 7% /mnt/boot-sav/nvme0n1p6 /dev/nvme0n1p7 66.7M 89% /mnt/boot-sav/nvme0n1p7 /dev/nvme0n1p8 77.5G 10% /mnt/boot-sav/nvme0n1p8 /dev/nvme0n1p9 23.5G 2% /mnt/boot-sav/nvme0n1p9 /dev/sda1 25.1G 12% /cdrom

Mount options (filtered): ______________________________________________________

=================== nvme0n1p1/efi/ubuntu/grub.cfg (filtered) ===================

search.fs_uuid 948b24e5-7f01-4f5e-9964-da6e7b035613 root set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg

==================== nvme0n1p6/efi/pop/grub.cfg (filtered) =====================

Pop GNU/Linux 6dee65cd-e402-40fc-b8e6-e28c9dec8f19 Pop GNU/Linux, with Linux 5.19.0-76051900-generic 6dee65cd-e402-40fc-b8e6-e28c9dec8f19 Windows Boot Manager (on nvme0n1p1) osprober-efi-8A0B-EAEB

END /etc/grub.d/30_os-prober

UEFI Firmware Settings uefi-firmware

END /etc/grub.d/30_uefi-firmware

=================== nvme0n1p8/boot/grub/grub.cfg (filtered) ====================

Ubuntu 948b24e5-7f01-4f5e-9964-da6e7b035613 Ubuntu, with Linux 5.15.0-56-generic 948b24e5-7f01-4f5e-9964-da6e7b035613 Ubuntu, with Linux 5.15.0-43-generic 948b24e5-7f01-4f5e-9964-da6e7b035613 Windows Boot Manager (on nvme0n1p1) osprober-efi-8A0B-EAEB

END /etc/grub.d/30_os-prober

END /etc/grub.d/30_uefi-firmware

======================== nvme0n1p8/etc/fstab (filtered) ========================

<file system> <mount point> <type> <options> <dump> <pass>

/ was on /dev/nvme0n1p8 during installation

UUID=948b24e5-7f01-4f5e-9964-da6e7b035613 / ext4 errors=remount-ro 0 1

/boot/efi was on /dev/nvme0n1p1 during installation

UUID=8A0B-EAEB /boot/efi vfat umask=0077 0 1 /swapfile none swap sw 0 0

==================== nvme0n1p8/etc/default/grub (filtered) =====================

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=lsb_release -i -s 2&gt; /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" GRUB_DISABLE_OS_PROBER=false

================= nvme0n1p8: Location of files loaded by Grub ==================

    GiB - GB            File                                Fragment(s)
        ?? = ??             boot/grub/grub.cfg                          1

417.970718384 = 448.792641536 boot/vmlinuz 1 354.329662323 = 380.458577920 boot/vmlinuz-5.15.0-43-generic 1 417.970718384 = 448.792641536 boot/vmlinuz-5.15.0-56-generic 1 354.329662323 = 380.458577920 boot/vmlinuz.old 1 433.850582123 = 465.843515392 boot/initrd.img 2 404.111785889 = 433.911726080 boot/initrd.img-5.15.0-43-generic 1 433.850582123 = 465.843515392 boot/initrd.img-5.15.0-56-generic 2 404.111785889 = 433.911726080 boot/initrd.img.old 1

=================== nvme0n1p8: ls -l /etc/grub.d/ (filtered) ===================

-rwxr-xr-x 1 root root 18683 Apr 15 2022 10_linux -rwxr-xr-x 1 root root 43031 Apr 15 2022 10_linux_zfs -rwxr-xr-x 1 root root 14180 Apr 15 2022 20_linux_xen -rwxr-xr-x 1 root root 13369 Apr 15 2022 30_os-prober -rwxr-xr-x 1 root root 1372 Apr 15 2022 30_uefi-firmware -rwxr-xr-x 1 root root 700 Feb 19 2022 35_fwupd -rwxr-xr-x 1 root root 214 Apr 15 2022 40_custom -rwxr-xr-x 1 root root 215 Apr 15 2022 41_custom

====================== sda1/boot/grub/grub.cfg (filtered) ======================

Try or Install Ubuntu Ubuntu (safe graphics) OEM install (for manufacturers) Boot from next volume UEFI Firmware Settings Test memory

==================== sda1: Location of files loaded by Grub ====================

    GiB - GB            File                                Fragment(s)
        ?? = ??             boot/grub/grub.cfg                          1

Is there any way to fix this?

Boot devices image

EDIT: I checked the system partition from Windows and all the boot related Ubuntu files are unaffected. Here's the screenshot.

Surya
  • 1
  • 1
  • 4
  • There does not seem to be one solution. A lot of posts and many cases solved without really knowing why. Have you updated UEFI & NVMe firmware. Check UEFI settings as a few have some way to prevent adding settings for security reasons beyond UEFI Secure Boot. C Also run dosfsck or from Windows chkdsk on the ESP (FAT32). Some add a boot parameter to grub. – oldfred Dec 23 '22 at 18:09
  • @oldfred I checked if there are any updates for the firmware but there wasn't. Plus I'm new to this kinda things so I don't understand some of he things you've recommended. Lastly I want to know if this issue would persist if I try different distros? Thank you for your time. – Surya Dec 25 '22 at 14:37
  • It seems to be a system or UEFI issue, not distro specific. And when searching Google, it goes way back. And many things tried, and several days later it worked. Users were not sure what of all the changes they tried worked. Older Mint Solved by totally resetting UEFI. https://forums.linuxmint.com/viewtopic.php?t=327158 & https://askubuntu.com/questions/1325390/locked-nvram-detected – oldfred Dec 25 '22 at 16:26
  • @oldfred I ran factory default option in UEFI but the issue wasn't resolved. But the grub disappears only after booting into windows. After a fresh install the grub shows up after every restart until I boot into windows. Plus I had dual booted PopOS before and it worked fine. I'm not so sure but I think Windows is the culprit. – Surya Dec 26 '22 at 09:42
  • HP seems to require users to go into UEFI settings & set boot order. Normally with every other system using efibootmgr (which grub does) or using efibootmgr yourself resets boot order. Check your UEFI settings and boot order. Either HP's UEFI or HP's version of Windows seems to always reset, so Windows is default boot, otherwise. – oldfred Dec 26 '22 at 15:52
  • @oldfred After a fresh install ubuntu is automatically on the top of the boot order. But once I boot into Windows, it disappears from the boot order list not move down. Like in the image I referred. – Surya Dec 27 '22 at 03:46
  • 1
    Before booting Windows go into HP's UEFI settings & change to make Ubuntu entry first in boot order. – oldfred Dec 27 '22 at 04:25
  • It is first before I boot Windows. – Surya Dec 27 '22 at 05:59
  • 1
    It may be syncing BCD in Windows with UEFI. Some systems work better to register grub/shim from inside Windows - for those that keep resetting Windows as default http://askubuntu.com/questions/371559/grub-not-showing-on-startup-for-windows-8-1-ubuntu-13-10-dual-boot or bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi – oldfred Dec 27 '22 at 15:44
  • @oldfred Running this command wouldn't affect windows in any way right? – Surya Dec 27 '22 at 16:59
  • It would make Windows second in boot order & will have BCD show boot choices. – oldfred Dec 27 '22 at 19:49
  • @oldfred It worked!! Thank you so much for your time and patience. – Surya Dec 28 '22 at 03:12
  • After a locked NVRAM warning from boot-repair throwing the towing, I tried running the command (with grub rather than shim as I have Secure Boot disables). It ran “successfully”. However, now, nothing boots so I’m left with a PC which doesn’t boot anything. Any suggestions? Did the command really “add an entry” or did it tell the Windows Boot Manager to boot using the grub efi instead? – Batwam Jan 12 '23 at 17:39
  • @Batwam Have you tried the command oldfred provided without making changes? He explained what it does clearly in this thread – Surya Jan 13 '23 at 09:14
  • @TechDash yeah, I typed it and it ran “successfully” but upon reboot, there was no new entry and even the “Windows Boot Manager” entry failed to boot so I was left with an unbootable PC. I ended up trying all possible solutions to “reset” the NVRAM including removing the CMOS battery to no avail. Eventually, I followed the Dell instructions to reset the RTC by pressing the power button for 20s and after that, boot-repair ran successfully. On reboot, it still wouldn’t boot to Ubuntu though but I manually added an entry in the BIOS Boot Sequence section to the grub efi and finally that worked. – Batwam Jan 14 '23 at 10:31

1 Answers1

1

I had the same issue, where Windows updated and removed my access to the boot screen, and I ran Ubuntu on a liveUSB and BootRepair on that, receiving this error. Before this, I ran through this tutorial in an effort to reinstall GRUB, and incidentally installed grub on an SD card plugged into my computer instead (followed the tutorial below but used the wrong drive (for me sda1). I was blocked out of installing on Ubuntu (for me nvme0n1p5) due to some Blocklist.

https://www.suse.com/support/kb/doc/?id=000016528

When the SD card was plugged in and I tried to run Ubuntu now via the BIOS screen (the native version, not the one on the flashdrive), it ran a GRUB terminal, as illustrated in this forum, and I followed the solution in the forum for booting Ubuntu via this forum, specifically finding the grub file in my Ubuntu partition (for me nvme0n1p5, for most people (via other tutorials) sdXY).

https://unix.stackexchange.com/questions/329926/grub-starts-in-command-line-after-reboot

This tutorial allowed me to get into my Ubuntu partition, in which I could run update-grub and boot repair, where the NVRam was no longer locked. I ran it without the SD card plugged in just in case in case that mattered (this isn't really my area of expertise), and after rebooting (again without the SD card) and the GRUB menu showed up again.

I did a few other things in this process, including turning off secure boot in the BIOS menu and restoring defaults, but these did not work for me. They may be relevant to seeing the SD card's grub screen on loading Ubuntu though, which is why I'm including them at the bottom here.

Colin Erb
  • 11
  • 1