You are not logged in.

#1 2021-06-17 17:08:32

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

GRUB occasionally disappears from UEFI

I'm at a point where I have a script for grub-install in /opt/ so I can streamline the process of getting the entry back in there. (If only I could easily add a script to my Arch installer USB so I could streamline mounting, too.)

Anyway I just took a look at the output of efibootmgr -v

BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0004,0002
Boot0000* GRUB  HD(1,GPT,8c612bc6-1fe4-c14a-99ad-fe2ae73247ad,0x800,0x100000)/File(\EFI\GRUB\GRUBX64.EFI)
Boot0002  Hard Drive    BBS(HD,,0x0)..GO..NO........u.W.D.C. .W.D.1.0.E.Z.E.X.-.0.0.B.N.5.A.0....................A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.3.C.4.F.J.Y.1.D.J.Y........BO..NO........u.W.D.C. .W.D.S.5.0.0.G.2.B.0.B....................A.................................>..Gd-.;.A..MQ..L.0.2.3.1.L.E.8.4.7.8.8.0. . . . . . . . ........BO..NO........u.W.D.C. .W.D.1.0.E.Z.E.X.-.0.0.B.N.5.A.0....................A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.3.C.7.F.V.Y.Y.3.K.R........BO..NO........u.C.r.u.c.i.a.l._.C.T.2.5.6.M.X.1.0.0.S.S.D.1....................A.................................>..Gd-.;.A..MQ..L. . . . . . . . .4.1.1.3.C.0.F.C.8.5.1.7........BO
Boot0003* CD/DVD Drive  BBS(CDROM,,0x0)..GO..NO........u.H.L.-.D.T.-.S.T. .B.D.-.R.E. . .W.H.1.6.N.S.4.0....................A.................................>..Gd-.;.A..MQ..L.9.K.F.5.D.3.3.C.4.0. .9. . . . . . . . ........BO
Boot0004* ubuntu        HD(1,GPT,8c612bc6-1fe4-c14a-99ad-fe2ae73247ad,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO

Looks like a tornado blew through here. WTF happened? Anyone seen something like this before? How should I clean this up, and would cleaning it up likely fix the issue?

Offline

#2 2021-06-17 18:27:41

Maniaxx
Member
Registered: 2014-05-14
Posts: 732

Re: GRUB occasionally disappears from UEFI

Looks ok to me. What's the problem?
For lost/removed entries it might help on some BIOS to install a default/fallback entry (EFI/BOOT/BOOTX64.EFI):

grub-install --removable

Last edited by Maniaxx (2021-06-17 18:32:05)


sys2064

Offline

#3 2021-06-18 03:48:16

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: GRUB occasionally disappears from UEFI

All the dots in 0002 and 0003 making them extremely long and unreadable isn't a problem? Does the PC ignore the periods, or do they actually serve a useful function?

I'll try that default/fallback entry thing, thanks.

Offline

#4 2021-06-18 11:27:02

Maniaxx
Member
Registered: 2014-05-14
Posts: 732

Re: GRUB occasionally disappears from UEFI

That's a binary dump fragment and it's correct indeed. The verbose switch is meant to do that. It looks similar here as well.

The fallback entry will not prevent losing entries but it might give you one more chance to boot into your system. You have to select the HDD entry on BIOS bootselect to use that bootloader if i remember correctly.

Last edited by Maniaxx (2021-06-18 11:34:12)


sys2064

Offline

#5 2021-06-18 11:38:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: GRUB occasionally disappears from UEFI

That's because the information in the entries is not entirely ascii and efibootmgr interprets the information as ascii by default, if you add the -u switch so that it's e.g.

efibootmgr -uv

to see how it's supposed to look if interpreted properly. But as stated this is normal and irrelevant to whatever your actual issue is.

What motherboard is this? How they implement UEFI will be the primary determinator as to what it shows you when and how, it's generally normal that on UEFI firmware updates existing entries are wiped, some firmwares don't allow persistent adjustment of NVRAM entries outside of their own firmware interfaces etcetc.

Online

#6 2021-06-18 16:04:04

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: GRUB occasionally disappears from UEFI

Offline

#7 2021-06-19 10:40:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: GRUB occasionally disappears from UEFI

I have a ROG STRIX TRX40-E GAMING and no such issues, assuming ASUS didn't just inherently fuck this up on your specific board. Is the drive in question moving? Do you take it out and use it on another system when the issue happens (in which case this is normal and you need to set it up as --removable) or do you boot into Windows between the times that it happens and some ASUS armory crate software thing updates your UEFI?

Online

#8 2021-06-19 15:22:18

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: GRUB occasionally disappears from UEFI

There's no Windows, it doesn't move, and it happened again. I'm in the UEFI shell to try to see what happened but the dump output is too long for the terminal and there's no 'less' here

Offline

#9 2021-06-19 16:22:38

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: GRUB occasionally disappears from UEFI

YAOMTC wrote:

There's no Windows, it doesn't move, and it happened again. I'm in the UEFI shell to try to see what happened but the dump output is too long for the terminal and there's no 'less' here

I think you should be able to dump everything into a file on your efi partition with normal shell redirection. Then maybe you can read it with "edit", boot into a live system to work with it, or repair the boot and do it from your installation.

Also, I think many tools can do pagination with the -b option.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#10 2021-06-19 17:01:08

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: GRUB occasionally disappears from UEFI

Ah, -b helped, thanks. Now I can see the entry isn't broken or something, it's actually missing completely. No sign of that drive. Could it be that something is going wrong with the SSD that Arch is on, or the connection between it and the motherboard, and the BIOS removes it from the UEFI list when it sometimes can't find it? I also have Mint on this PC, which is on a different drive, which is always still there when the Arch entry disappears.

Offline

#11 2021-06-19 17:11:08

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: GRUB occasionally disappears from UEFI

Maybe your efi implementation is buggy and sometimes deletes boot record 0000? Maybe try to create it as 0001 or 0005.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#12 2021-06-27 14:54:05

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: GRUB occasionally disappears from UEFI

Finally got around to trying this. Here's what I did:

efibootmgr -B -b 0000
efibootmgr --create --disk /dev/sdb --part 1 --label "GRUB" --loader \\EFI\GRUB\grubx64.efi -b 0001
efibootmgr --bootorder 0001,0003,0004,0002

It didn't work ("Reboot and select proper boot device"), but I don't see why it wouldn't.

Last edited by YAOMTC (2021-06-27 15:27:49)

Offline

Board footer

Powered by FluxBB