Leap 15.5 loses grub2 function, with just itself to boot?

Folks:

Not sure what is going on but my TW and Leap installs have been plagued with grub problems, spent weeks on my multi-boot cMP trying to figure out how to get grub coordinated to find and boot systems, finally got that straightened (for how long?) AND now, trying to boot my '09 MBP that has three partitions, two OSX and ONE Leap 15.5 and . . . “MOKlist not found booting in emergency” . . . showing “GNU grub 2.04” as what is trying to “work” rather than what is now supposed to be 2.06??? Had to get my now well used SuperGrub2 usb drive to boot into Leap . . . .

Tried to reinstall grub and just like over on my cMP it errors out . . . checked the fstab and it seems OK.

sudo grub2-install
[sudo] password for root: 
Installing for x86_64-efi platform.
Could not prepare Boot variable: Invalid argument
grub2-install: error: efibootmgr failed to register the boot entry: Input/output error.

no00@MBP:~> lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│    vfat   FAT32 EFI   67E3-17ED                             170.8M    13% /boot/efi
├─sda2
│    hfsplu       SnoLep1
│                       ab671b3b-9c99-3460-9e8b-e300ddd0ce2e                
├─sda3
│    hfsplu       MavRikS2
│                       0f42e8b7-f082-31b9-8a10-cbb3c47c95f0                
├─sda4
│    ext4   1.0   disk0s4
│                       8b5ea5a1-042a-401a-9615-6d16a70f1646   53.4G    11% /
├─sda5
│    ext4   1.0   disk0s5
│                       7a75976b-fe7b-49ee-bb9a-14668b4445e0   57.2G     5% /home
└─sda6
     swap   1           e30efbcb-0c11-402a-919b-a401a469f41d                [SWAP] 

UUID=8b5ea5a1-042a-401a-9615-6d16a70f1646  /          ext4  defaults      0  1
UUID=7a75976b-fe7b-49ee-bb9a-14668b4445e0  /home      ext4  data=ordered  0  2
UUID=67E3-17ED                             /boot/efi  vfat  utf8          0  2

grub2-install: error: efibootmgr failed to register the boot entry: Input/output error.

Post the output of efibootmgr -v

1 Like

There is no more “ubuntu” or “manjaro” installed on this machine . . . last install in was the Leap, possibly 15.4 . . . upgraded to 15.5 . . . . Still needing to use SG2 to boot the system.

 sudo efibootmgr -v
[sudo] password for root: 
BootCurrent: 0000
BootOrder: 0004,0000,0004,0080,0001,0003,0002
Boot0000* ubuntu	HD(1,GPT,92aec023-a46e-47e8-92e4-005a7c1143ee,0x28,0x64000)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* grub	HD(1,GPT,92aec023-a46e-47e8-92e4-005a7c1143ee,0x28,0x64000)/File(\EFI\grub\grubx64.efi)
Boot0003* Manjaro	HD(1,GPT,92aec023-a46e-47e8-92e4-005a7c1143ee,0x28,0x64000)/File(\EFI\Manjaro\grubx64.efi)
Boot0080* Mac OS X	PciRoot(0x0)/Pci(0xb,0x0)/Sata(0,0,0)/HD(2,GPT,6d0cb26d-de01-462f-b2b8-3142d42f651d,0x64028,0xafe1ce8)
Boot0081* Mac OS X	PciRoot(0x0)/Pci(0xb,0x0)/Sata(0,0,0)/HD(3,GPT,08e7936d-0ef9-414c-96c0-de3bfc532333,0xb085d10,0x1da52bd0)
Boot0082* 	PciRoot(0x0)/Pci(0xb,0x0)/Sata(0,0,0)/HD(3,GPT,08e7936d-0ef9-414c-96c0-de3bfc532333,0xb085d10,0x1da52bd0)
BootFFFF* 	PciRoot(0x0)/Pci(0x6,0x1)/USB(1,0)/HD(1,MBR,0x6b953a68,0x1800,0x10801)/File(\EFI\BOOT\BOOTX64.efi)

Bug report filed on it; bug report on grub2 missing in action

You have to manually manage the efi boot parameters. remove the items you no longer need

OK, thanks for the reply on it, any hints on the best way to do that?? My question still remains, in that, only a few days before I had a working grub menu for Leap 15.5, nothing I did was added or messed with, and then grub was “gone” . . . not reachable, etc.

And, in the efiboot order list 0002 is listed for “grub” . . . as the last choice, but it isn’t going to Leap, it just goes to emergency???

In comparison to my MacPro that has 4 drives and a bunch of linux installs, this one is very basic, but somehow grub is erased and/or not accessible or installable???

Use efibootmgr to remove unused boot code from UEFI. (man efibootmgr for details)

From your efibootmgr output you are booting from 0004 which is not listed so boot drops back to 0000 (Ubuntu) which you say no longer exists??? In any case 0004 is in BootOrder twice which is odd any way

1 Like

At least part of the issue here is that you are using Apple hardware. And it seems that “efibootmgr” works a bit differently for that hardware. Most users have more typical PC hardware, so are not seeing your problems.

1 Like

@nrickert:

Ah, OK . . . that explains why this issue seems to be following “me” . . . but it’s the Mac machines that are being mishandled . . . . : - 0

Busy for the next few hours, but when I get back to the MBP I’ll try to remove the old boot numbers and see if that helps out. I had a hard time modifying the boot order in my MP . . . didn’t seem to respond to commands on it. Hopefully the MBP will do better on it . . . .

So I could remove “0” from the efibootmgr -v listing, but I couldn’t remove “4” or “0004” that came back “invalid entry” . . . . Then I tried to run “grub2-install” and that had the same error as before “efibootmgr isn’t letting us do that” and then I ran the “grub2-mkconfig xxx” command and that went through OK.

I shut it down and on cold boot it went to OSX . . . back into the SG2 disk to boot back into Leap . . . . I’ll give it a few more days to sort itself out and if it doesn’t . . . prolly take the nuclear option . . . that usually solves all of these problems . . . .

Did you use efibootmgr -b 0004 -B or did you try to delete the entry in your UEFI directly?

It appears that 0004 does not exist so you can’t remove it. Don’t know what happened to it but it was not in the list, but was in the bootorder list.

@susejunky

Thanks for the reply, I used the “efibootmgr -b 0004 -B” option . . . I don’t know if I ever knew how to “directly delete the entry in my UEFI”???

One problem with the new forum format is that “code” flag doesn’t seem to be an option and neither does “multi-quote”???

Right. But it was something to try out . . . and it might have “worked” . . . in this case possibly not, but did get the “ubuntu” option off the listings . . . .

As far as I know, you can still manually enter CODE tags:

test of code with CODE tags (or bb-codes)

Seems to work (based on preview).

I guess that is what I did, as some of the posted code does show as “code” . . . but I had to type it out, whereas previously we code click “code” and then paste it, etc.

I think the </> control on edit window does the equivalent of code tags maybe :wink:

1 Like

Spent a few minutes trying to re-order the boot list, managed to clear the data for that, but still couldn’t re-install grub2, and running grub2-mkconfig did not revive grub??

sudo efibootmgr -o 0002, 0080, 0081
[sudo] password for root:
Malformed BootOrder order0002,
                                ^
no00@MBP:~> sudo efibootmgr -O
BootCurrent: 0000
No BootOrder is set; firmware will attempt recovery
Boot0000* ubuntu
Boot0001* opensuse-secureboot
Boot0002* grub
Boot0080* Mac OS X
Boot0081* Mac OS X
Boot0082*
BootFFFF*
no00@MBP:~> sudo efibootmgr -o 0002, 0001, 0080, 0081
Malformed BootOrder order0002,
                                ^
no00@MBP:~> man efibootmgr
no00@MBP:~> sudo efibootmgr -o 0002,0001,0080,0081
Could not set BootOrder: Invalid argument

@non_space Can you show the current verbose output efibootmgr -v.

sudo efibootmgr -o 0002, 0080, 0081
[sudo] password for root:
Malformed BootOrder order0002,

The list of boot entries is just a comma-separated list that must not contain spaces!

It should look like this:

sudo efibootmgr -o 0002,0080,0081
1 Like