How to install grub on a mixed system that lost it.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Kris345
Level 5
Level 5
Posts: 536
Joined: Mon Jun 22, 2020 10:22 am
Location: New England

How to install grub on a mixed system that lost it.

Post by Kris345 »

Mixed win10 pro 22H2 and Mint 21.1 on nvme.
Restored backup and it boots to win. Thus I can ask questions.but no grub boot menu.
BIOS does not see mint ptn. (usually identified as "Ubuntu")

Want to make this method work:

booted to Mint 21.1 live stick.
sudo fdisk -l to find mint partition "nvme0n1p7"
sudo mount /dev/nvme0n1p7 /mnt (seemed to mount fine - I can explore it at Live's /mnt.)
sudo grub-install --root-directory=mnt /dev/nvme0n1

"Installing for x86_64-efi platform"
"cannot find EFI directory" <---------------------------------

I looked and EFI is in admin:///mnt/boot
I stole this from SUSE. What am I doing wrong?
Thanks!
(yes, I have a full Macrium backup that I could probably restore and fix this but i lost a Mint build a while back because lost grub and want to learn how to fix it. Thanks.)
Last edited by LockBot on Thu Jul 27, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-- ASUS Prime Z790-V WIFI, I9-12900k, UEFI/GPT, 32GB, Sam 980 Pro 1T M.2 .
-- ThinkPad P15s-Gen1-20T4-002KUS, i7-10510U, UEFI/GPT, 16GB, Sammy 970 EVO Plus 500GB M.2.
-laserjets: HP M254dw color, HP P1606dn. Epson Perfection 2480 flatbed scanner -
User avatar
zcot
Level 9
Level 9
Posts: 2828
Joined: Wed Oct 19, 2016 6:08 pm

Re: How to install grub on a mixed system that lost it.

Post by zcot »

In the live stick session, main menu, "boot repair", run that, my guess is the recommended fix will be pretty straight forward, listed at the very bottom of the file, reinstall grub to the efi.
User avatar
Kris345
Level 5
Level 5
Posts: 536
Joined: Mon Jun 22, 2020 10:22 am
Location: New England

Re: How to install grub on a mixed system that lost it.

Post by Kris345 »

Thanks for reply. in Boot repair window chose "recommended repair"
it did tons of stuff but then said "an error occurred during repair" and gave me the following txt file:


summary:
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.


NOTE: this is a simple UEFI/GPT system!

Code: Select all

boot-repair-4ppa200                                              [20230127_0409]

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






Recommended repair: ____________________________________________________________

The default repair of the Boot-Repair utility will reinstall the grub-efi of
nvme0n1p7,
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/nvme0n1p7/boot/efi

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

===================== Reinstall the grub-efi of nvme0n1p7 ======================

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

chroot /mnt/boot-sav/nvme0n1p7 efibootmgr -v before grub install
BootCurrent: 001F
Timeout: 0 seconds
BootOrder: 0001,0023,0010,0011,0012,0013,0014,0015,001C,001B,001A,001D,001E,0019,0020,0021,0022,001F
Boot0001* Windows Boot Manager	HD(1,GPT,b56353ee-641a-49e3-aa41-15ed208b9942,0x800,0x32000)/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.}...a................
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0015  ThinkShield secure wipe	FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
Boot0016  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0017  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0018  MEBx Hot Key	FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0019* USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot001A* USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001B  NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001C* NVMe1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a401)
Boot001D  ATA HDD0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f602)
Boot001E  ATA HDD1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot001F* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot0020  PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0021  LENOVO CLOUD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
Boot0022  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35406)
Boot0023* Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f606)
Boot0024* USBR BOOT CDROM	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0025* USBR BOOT Floppy	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0026* ATA HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0027* ATAPI CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)

chroot /mnt/boot-sav/nvme0n1p7 uname -r
5.15.0-56-generic

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

chroot /mnt/boot-sav/nvme0n1p7 grub-install --efi-directory=/boot/efi --target=x86_64-efi
Installing for x86_64-efi platform.
[b]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.
[/b]
chroot /mnt/boot-sav/nvme0n1p7 efibootmgr -v after grub install
BootCurrent: 001F
Timeout: 0 seconds
BootOrder: 0001,0023,0010,0011,0012,0013,0014,0015,001C,001B,001A,001D,001E,0019,0020,0021,0022,001F
Boot0001* Windows Boot Manager	HD(1,GPT,b56353ee-641a-49e3-aa41-15ed208b9942,0x800,0x32000)/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.}...a................
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0015  ThinkShield secure wipe	FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
Boot0016  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0017  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0018  MEBx Hot Key	FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0019* USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot001A* USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001B  NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001C* NVMe1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a401)
Boot001D  ATA HDD0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f602)
Boot001E  ATA HDD1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot001F* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot0020  PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0021  LENOVO CLOUD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
Boot0022  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35406)
Boot0023* Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f606)
Boot0024* USBR BOOT CDROM	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0025* USBR BOOT Floppy	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0026* ATA HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0027* ATAPI CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Error: NVram is locked (Linuxmint not found in efibootmgr). Please report this message to boot.repair@gmail.com

chroot /mnt/boot-sav/nvme0n1p7 update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-58-generic
Found initrd image: /boot/initrd.img-5.15.0-58-generic
Found linux image: /boot/vmlinuz-5.15.0-56-generic
Found initrd image: /boot/initrd.img-5.15.0-56-generic
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 nvme0n1p7/boot/grub/grub.cfg

An error occurred during the repair.
Error: NVram is locked (Linuxmint 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.
 => No boot loader is installed in the MBR of /dev/sda.
 => No known boot loader is installed in the MBR of /dev/sdb.

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/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg 
                       /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:  Unknown
    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:  According to the info in the boot sector, nvme0n1p4 
                       starts at sector 0. But according to the info from 
                       fdisk, nvme0n1p4 starts at sector 243976904.
    Operating System:  
    Boot files:        

nvme0n1p5: _____________________________________________________________________

    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:        

nvme0n1p6: _____________________________________________________________________

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

nvme0n1p7: _____________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Linux Mint 21.1
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

    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:        /boot/grub/grub.cfg /syslinux.cfg 
                       /efi/boot/bootx64.efi /efi/boot/grubx64.efi 
                       /efi/boot/mmx64.efi


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

OS#1:   Linux Mint 21.1 Vera (21.1) on nvme0n1p7
OS#2:   Windows 10 or 11 on nvme0n1p3

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

CPU architecture: 64-bit
Video: CometLake-U GT2 [UHD Graphics] GP108GLM [Quadro P520] from Intel Corporation NVIDIA Corporation
Live-session OS is Linuxmint 64-bit (Linux Mint 21.1, vera, x86_64)

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

BIOS/UEFI firmware: N2XET37W (1.27 )(1.27) from LENOVO
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
SecureBoot disabled - SecureBoot disabled - Please report this message to boot.repair@gmail.com.
BootCurrent: 001F
Timeout: 0 seconds
BootOrder: 0001,0023,0010,0011,0012,0013,0014,0015,001C,001B,001A,001D,001E,0019,0020,0021,0022,001F
Boot0001* Windows Boot Manager	HD(1,GPT,b56353ee-641a-49e3-aa41-15ed208b9942,0x800,0x32000)/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.}...a................
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0015  ThinkShield secure wipe	FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
Boot0016  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0017  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0018  MEBx Hot Key	FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0019* USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot001A* USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001B  NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001C* NVMe1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a401)
Boot001D  ATA HDD0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f602)
Boot001E  ATA HDD1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot001F* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot0020  PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0021  LENOVO CLOUD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
Boot0022  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35406)
Boot0023* Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f606)
Boot0024* USBR BOOT CDROM	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0025* USBR BOOT Floppy	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0026* ATA HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0027* ATAPI CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)

728124f6ec8e22fbdbe7034812c81b95   nvme0n1p1/Boot/bkpbootx64.efi
728124f6ec8e22fbdbe7034812c81b95   nvme0n1p1/Boot/bootx64.efi
c152ec201c37b6e97bbc2207e49d1271   nvme0n1p1/Boot/fbx64.efi
fdafb5eece6caeccb788c946a28e6872   nvme0n1p1/Boot/mmx64.efi
3795ef72a4ed0369ca44e711527904bf   nvme0n1p1/ubuntu/grubx64.efi
fdafb5eece6caeccb788c946a28e6872   nvme0n1p1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   nvme0n1p1/ubuntu/shimx64.efi
20ac8dde00311476f3755604eb0e545a   nvme0n1p1/Microsoft/Boot/bootmgfw.efi
27d382c5fc21df6f4a75baed05aa1d9d   nvme0n1p1/Microsoft/Boot/bootmgr.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
sda	: is-GPT,	no-BIOSboot,	has-noESP, 	usb-disk,	not-mmc, no-os,	no-wind,	2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

nvme0n1p1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
nvme0n1p3	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
nvme0n1p4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p5	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p7	: is-os,	64, apt-get,	signed grub-pc grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sda1	: no-os,	32, 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,	recovery-or-hidden,	no-bmgr,	notwinboot
nvme0n1p5	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p7	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda1	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot

Partitions info (3/3): _________________________________________________________

nvme0n1p1	: not--sepboot,	no-kernel,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p3	: not--sepboot,	no-kernel,	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
nvme0n1p7	: not--sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	nvme0n1
sda1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk identifier: 0EF81A6E-5858-9090-8081-828310111213
              Start       End   Sectors  Size Type
nvme0n1p1      2048    206847    204800  100M EFI System
nvme0n1p2    206848    239615     32768   16M Microsoft reserved
nvme0n1p3   4098048 153924128 149826081 71.4G Microsoft basic data
nvme0n1p4 243976904 245062335   1085432  530M Windows recovery environment
nvme0n1p5 245062344 358449087 113386744 54.1G Microsoft basic data
nvme0n1p6 358449152 368214015   9764864  4.7G Linux swap
nvme0n1p7 368214016 407275519  39061504 18.6G Linux filesystem
Disk sda: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk identifier: FF369778-745B-467C-A98D-925C9637B5B8
      Start        End    Sectors   Size Type
sda1   2048 1000214527 1000212480 476.9G Microsoft basic data
Disk sdb: 28.91 GiB, 31042043904 bytes, 60628992 sectors
Disk identifier: FCBC782F-0C39-4558-8F5C-DC5AA80DAFBB
      Start      End  Sectors  Size Type
sdb1   2048 60628958 60626911 28.9G Microsoft basic data

parted -lm (filtered): _________________________________________________________

sda:512GB:scsi:512:4096:gpt:SSK :;
1:1049kB:512GB:512GB:ntfs::msftdata;
sdb:31.0GB:scsi:512:512:gpt: USB DISK 3.0:;
1:1049kB:31.0GB:31.0GB:fat32:Main Data Partition:msftdata;
nvme0n1:500GB:nvme:512:512:gpt:Samsung SSD 970 EVO Plus 500GB:;
1:1049kB:106MB:105MB:fat32:EFI System partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft Reserved Partition:msftres;
3:2098MB:78.8GB:76.7GB:ntfs:Basic data partition:msftdata;
4:125GB:125GB:556MB:ntfs:Windows Recovery Environment:diag;
5:125GB:184GB:58.1GB:ntfs:Basic data partition:msftdata;
6:184GB:189GB:5000MB:linux-swap(v1):Swap partition:swap;
7:189GB:209GB:20.0GB:ext4:Linux filesystem data:;

Free space >10MiB: ______________________________________________________________

nvme0n1: 117MiB:2001MiB:1884MiB
nvme0n1: 75158MiB:119129MiB:43971MiB
nvme0n1: 198865MiB:476940MiB:278075MiB

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL      PARTLABEL
sda                                                                                                       
└─sda1      ntfs     5F542BF12E0E74BB                     395eef9e-5ff2-40e4-8494-80aa6689ff23 wdc512     
sdb                                                                                                       
└─sdb1      vfat     AC27-F5AB                            332b6409-ad24-4612-bea4-372f47c255b8 LINUX MINT Main Data Partition
nvme0n1                                                                                                   
├─nvme0n1p1 vfat     9C67-4D46                            b56353ee-641a-49e3-aa41-15ed208b9942            EFI System partition
├─nvme0n1p2                                               3dc4e374-ea92-48b4-a624-e32b05702116            Microsoft Reserved Partition
├─nvme0n1p3 ntfs     01D932415AB7D380                     1e8f50be-0d4f-4cb4-9388-756b9141c5d9 win        Basic data partition
├─nvme0n1p4 ntfs     6CB49C31B49BFC30                     7026eb6f-e735-4787-849c-f51c0371bfde            Windows Recovery Environment
├─nvme0n1p5 ntfs     01D93241C7ABFA20                     02fe380e-45da-42bd-988d-61bf152aab79 E          Basic data partition
├─nvme0n1p6 swap     7bb49654-db35-40b2-bb0e-28ee13127fd9 b4f7230c-40e4-49b0-90cc-f17b53afe756            Swap partition
└─nvme0n1p7 ext4     b928ccc9-4c01-4987-aa94-a1d2a767ab8a 1a5bf2eb-9ec9-4ffb-a205-ae112ec74b0f            Linux filesystem data

Mount points (filtered): _______________________________________________________

                Avail Use% Mounted on
/dev/nvme0n1p1  64.8M  33% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p3  27.1G  62% /mnt/boot-sav/nvme0n1p3
/dev/nvme0n1p4  88.5M  83% /mnt/boot-sav/nvme0n1p4
/dev/nvme0n1p5  20.1G  63% /mnt/boot-sav/nvme0n1p5
/dev/nvme0n1p7     2G  84% /mnt/boot-sav/nvme0n1p7
/dev/sda1      197.3G  59% /media/mint/wdc512
/dev/sdb1       26.4G   9% /cdrom

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1 vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p3 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p4 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p5 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p7 ext4            rw,relatime
/dev/sda1      fuseblk         rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
/dev/sdb1      vfat            ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro

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

search.fs_uuid b928ccc9-4c01-4987-aa94-a1d2a767ab8a root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   b928ccc9-4c01-4987-aa94-a1d2a767ab8a
Ubuntu, with Linux 5.15.0-58-generic   b928ccc9-4c01-4987-aa94-a1d2a767ab8a
Ubuntu, with Linux 5.15.0-56-generic   b928ccc9-4c01-4987-aa94-a1d2a767ab8a
Windows Boot Manager (on nvme0n1p1)   osprober-efi-9C67-4D46
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

======================== nvme0n1p7/etc/fstab (filtered) ========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p7 during installation
UUID=b928ccc9-4c01-4987-aa94-a1d2a767ab8a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=9C67-4D46  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/nvme0n1p6 during installation
UUID=7bb49654-db35-40b2-bb0e-28ee13127fd9 none            swap    sw              0       0
UUID=01D749C6C7CAFC00 /media/E ntfs-3g defaults,noatime,windows_names,locale=en_US.utf8 0 0

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

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

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

           GiB - GB             File                                 Fragment(s)
            ?? = ??             boot/grub/grub.cfg                             1
 183.409194946 = 196.934123520  boot/vmlinuz                                   1
 182.124996185 = 195.555225600  boot/vmlinuz-5.15.0-56-generic                 2
 183.409194946 = 196.934123520  boot/vmlinuz-5.15.0-58-generic                 1
 182.124996185 = 195.555225600  boot/vmlinuz.old                               2
 193.203121185 = 207.450271744  boot/initrd.img                                2
 192.953121185 = 207.181836288  boot/initrd.img-5.15.0-56-generic              4
 193.203121185 = 207.450271744  boot/initrd.img-5.15.0-58-generic              2
 192.953121185 = 207.181836288  boot/initrd.img.old                            4

=================== nvme0n1p7: 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 Sep 20 03:18 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

======================== nvme0n1p7/etc/grub.d/35_fwupd =========================

#! /bin/sh
# SPDX-License-Identifier: LGPL-2.1+
set -e
[ -d ${pkgdatadir:?} ]
# shellcheck source=/dev/null
. "$pkgdatadir/grub-mkconfig_lib"
if [ -f /var/lib/fwupd/uefi_capsule.conf ] &&
   ls /sys/firmware/efi/efivars/fwupd-*-0abba7dc-e516-4167-bbf5-4d9d1c739416 1>/dev/null 2>&1; then
      . /var/lib/fwupd/uefi_capsule.conf
      if [ "${EFI_PATH}" != "" ] && [ "${ESP}" != "" ]; then
      echo "Adding Linux Firmware Updater entry" >&2
cat << EOF
menuentry 'Linux Firmware Updater' \$menuentry_id_option 'fwupd' {
EOF
      ${grub_probe:?}
      prepare_grub_to_access_device '`${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/"'
cat << EOF
	chainloader ${EFI_PATH}
}
EOF
      fi
fi

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

Start Linux Mint 21.1 Cinnamon 64-bit
Start Linux Mint 21.1 Cinnamon 64-bit (compatibility mode)
OEM install (for manufacturers)
Boot from next volume
UEFI Firmware Settings
Test memory

========================= sdb1/syslinux.cfg (filtered) =========================

DEFAULT loadconfig

LABEL loadconfig
  CONFIG /isolinux/isolinux.cfg
  APPEND /isolinux/

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

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

================== sdb1: Location of files loaded by Syslinux ==================

           GiB - GB             File                                 Fragment(s)
            ?? = ??             syslinux.cfg                                   1
Last edited by karlchen on Fri Jan 27, 2023 4:58 am, edited 1 time in total.
Reason: replaced [quote] tags by [code] tags
-- ASUS Prime Z790-V WIFI, I9-12900k, UEFI/GPT, 32GB, Sam 980 Pro 1T M.2 .
-- ThinkPad P15s-Gen1-20T4-002KUS, i7-10510U, UEFI/GPT, 16GB, Sammy 970 EVO Plus 500GB M.2.
-laserjets: HP M254dw color, HP P1606dn. Epson Perfection 2480 flatbed scanner -
User avatar
zcot
Level 9
Level 9
Posts: 2828
Joined: Wed Oct 19, 2016 6:08 pm

Re: How to install grub on a mixed system that lost it.

Post by zcot »

Boot the live stick session in uefi mode and it will be able to do the repair automatically.
User avatar
Kris345
Level 5
Level 5
Posts: 536
Joined: Mon Jun 22, 2020 10:22 am
Location: New England

Re: How to install grub on a mixed system that lost it.

Post by Kris345 »

How would I do that - the stick was created UEFI with rufus, the BIOS boots "both, UEFI first", Everything on my system is UEFI/GPT.

edit: tried boot mint to compatability mode - same error
Set bios to uefi only - same error

NVRAM is locked (linuxmint not found it efibootmgr)
-- ASUS Prime Z790-V WIFI, I9-12900k, UEFI/GPT, 32GB, Sam 980 Pro 1T M.2 .
-- ThinkPad P15s-Gen1-20T4-002KUS, i7-10510U, UEFI/GPT, 16GB, Sammy 970 EVO Plus 500GB M.2.
-laserjets: HP M254dw color, HP P1606dn. Epson Perfection 2480 flatbed scanner -
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: How to install grub on a mixed system that lost it.

Post by linux-rox »

That's a LOT of boot entries. Your NVRAM may be full. You could try removing obsolete entries with efibootmgr.

Note: Please edit the post with the Boot Repair report and replace the quote tags with [code] tags.
Locked

Return to “Installation & Boot”