Cannot recover grub after BIOS/UEFI update

Hey.
Today, I updated the “BIOS” (UEFI, whatever you want to call it:) of my motherboard (Asus M5A79 EVO R2.0), and it apparently broke grub. It doesn’t load anymore, and the PC boots straight into Windows now. I have tried following https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader, but I’m running into errors.

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
Installation finished. No error reported.

modprobe efivarfs outside of schoot succeeds, but

efivar-tester

UEFI variables not supported on this machine.

I’m using a live USB and I believe this may be because I have to boot in legacy mode. I can’t know how to boot the USB in UEFI mode, though, becuase with Secure Boot enabled, it won’t boot as the Secure Boot kicks in, and if I turn Secure Boot off or change it to “Other OS”, I get grub error “unknown filesystem, exiting”…

Can anyone help me?

plz give return of
fdisk -l
and lsblk

Boot to Windows.
open cmd as administrator.
type this command:

bcdedit /set {bootmgr} path \EFI\Manjaro\grubx64.efi

1 Like

Try this.

After booting up to Manjaro

sudo grub-install /dev/sda
sudo update-grub

Sorry, I knew I forgot something important, as always…

sudo fdisk -l
Disk /dev/sda: 2,7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 20941FE6-904C-4952-8718-74BA2610B95E

Device Start End Sectors Size Type
/dev/sda1 4097 618497 614401 300M EFI System
/dev/sda2 618498 5842073126 5841454629 2,7T Linux filesystem
/dev/sda3 5842073127 5860528064 18454938 8,8G Linux swap

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.

Disk /dev/sdb: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7347de0d

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 488394751 488392704 232,9G 7 HPFS/NTFS/exFAT

Disk /dev/sdc: 7,3 GiB, 7864320000 bytes, 15360000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00056834

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 15359999 15357952 7,3G c W95 FAT32 (LBA)

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2,7T 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
├─sda2 8:2 0 2,7T 0 part /
└─sda3 8:3 0 8,8G 0 part [SWAP]
sdb 8:16 0 232,9G 0 disk
└─sdb1 8:17 0 232,9G 0 part
sdc 8:32 1 7,3G 0 disk
└─sdc1 8:33 1 7,3G 0 part

I have managed to boot into Manjaro with @gohlip’s method, but recovering the grub is still not possible. Getting the same error messages.

sudo grub-install /dev/sda
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won’t be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged…
grub-install: error: will not proceed with blocklists.

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
Installation finished. No error reported.

That’s because you’ve booted install media in bios-legacy, not uefi.

1 Like

As I said, I can’t boot the install media in UEFI mode, it throws up a grub error and won’t boot.

Yup, you forgot to mention your windows is on bios-legacy boot and on msdos partitioning.
And your Manjaro is on uefi and on gpt.

From your first post,

Has it ever booted into Manjaro, ever? And how did you do that?
Did you have to go to bios, (F10), select UEFI: xxx to boot?

And now, you cannot boot into live media in UEFI by selecting (F10) UEFI: some usb name?
Is that it?

Please explain.

Hm, you’re right, Windows seem to be in BIOS boot mode. Could that have been the flash changing it? Because I know the Windows disk has been installed with a GPT partition - I double checked that during the installation, even. And yes, it booted to Manjaro just fine up until the BIOS flash with no problem, using GRUB. I just installed it from the live media and it properly used Manjaro’s grub as a first boot device. Never booted it from boot menu.

That would be highly improbable, even with Microsoft’s notoriety. I of course cannot know for sure what happened to your system, but I am very sure a uefi grub cannot boot a bios-legacy windows.

But let’s move on. You need to decide what to do next. And there’s lots of work ahead for you whichever way you decide. See you around and best of luck.

Well, the problem is that I don’t know what to do, that’s why I’m posting here…

As I said, I made sure that Windows is installed on a GPT partition on install, and it has been working completely fine for the whole time until I flashed the new BIOS. Installed Windows 7, then I installed Manjaro, and since then I just turned the PC on and grub booted me into Manjaro. After the update, it just doesn’t want to work. And I have no idea what to do or where to start. I can’t really do hours worth of reading, becuase my eyes are in a bad shape and I’m highly photophobic, so basically I’m lost.

Right now, the situation is that windows is bios-legacy on msdos partitioning.
It is far easier to install and fix linux than to fix windows (for me, anyway).
And if we want to keep windows (up to you, some have banished it), we should have linux setup in the same settings as windows.

So, if you do that, then you must reinstall your manjaro in bios-legacy/msdos.
But first set your disk msdos (use gparted…device…msdos) then set partitions.
Boot and install Manjaro in bios-legacy.

I think personally that would be best, as you cannot boot in uefi anyway.
Cheers. Good luck.

OK, just as a stab in the dark I booted Manjaro from the disk and restored a Timeshift point, and now Grub works without a problem and everything boots up just fine… This really had to have something to do with the BIOS flash…

So, for some reason, it all works now, except at the start of the boot I get an error about not being able to access EFI memory. Should I worry about that or can I just continue using my system as usual?

This means you had originally installed Manjaro in bios-legacy to a gpt partitioned disk without a bios-grub partition.
You can check this by
test -d /sys/firmware/efi && echo uefi || echo bios
It will output ‘bios’.
While it will work now, it cannot be ‘stable’, as proven by the episode you experienced here.
You cannot do a further grub-install as that will fail or create another mess.

I don’t think it is the firmware update, the timeshift may just bring back to the point before you had the grub-install.

But let’s hope for the best.

1 Like

That’s bizzare. I have no idea why it worked before, then. I wasn’t getting the EFI errors on boot before either. This seriously makes me think this had to have something to do with the BIOS update. Oh well.

Is there anything in particular I should do while reinstalling? Because if I remember correctly, I let Manjaro do all the partitioning and installing automatically, how can I ensure I install it correctly?

Thanks for all the help, by the way.

edit: sorry for the additional question, but is it possible to keep the Timeshift backup from this installation and restoring it after reinstall, or would that reinstate the grub problems?

check bios , some update windows may change for example
fast boost activate

1 Like

Yeah, when I reflashed it it switched Fast Boot to on and turned on Windows UEFI secure boot including regenerating the PK keys…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.