Cannot reinstall Grub (efivars)

I'm attempting to reinstall grub (EFI). I followed these instructions:
and I got
"EFI variables are not supported on this system"

According to the tutorial I exited chroot and typed:
"sudo modprobe efivarfs"

However, terminal answered:
"modprobe: FATAL: module efivars not found in directory /(path somewhere)"

Do anyone have any idea how to fix it?
Any help appreciated!

P.S.: the system IS efi - grub has been working fine this way, but a few days ago it went wrong (maybe after an update)

This usually happens when you have booted your system in MBR mode (CSM or compatibility mode).

Check your firmware - only EFI enabled.

I've changed in the "bios" the boot option from "UEFI and Legacy" to "UEFI only", but it still doesnt work...

Try this.

Don't forget to do the 2 [Additional UEFI Commands].

1 Like

Thanks for a very precise tutorial!

However, I have some troubles with it:
1)The second command in grub prompt sent me to the usual grub Win/Manjaro switch. Then I restarted the computer and booted live Manjaro
2) the command "grub-install /dev/sda" returns "grub-install: error: cannot find EFI directory" (although sda should be correct - checked with lsblk)

In the link, there is some output we need if there is any issue.
I think you are not in uefi or do not have a $esp partition.
Provide that and we'll see.

Many thanks for your help!

Here are the outputs:

BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* manjaro       HD(4,MBR,0x76fee6f7,0x745f8000,0x10d9c1)/File(\EFI\manjaro\grubx64.efi)
Boot0001* rEFInd Boot Manager   HD(4,MBR,0x76fee6f7,0x745f8000,0x10d9c1)/File(\EFI\refind\refind_x64.efi)
`Model: ATA WDC WD10EZEX-00K (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Tabulka oddílů: msdos
Disk Flags: 

Číslo  Začátek  Konec   Velikost  Typ      Systém souborů  Přepínače
 1     1049kB   106MB   105MB     primary  ntfs            boot
 2     106MB    790GB   790GB     primary  ntfs
 3     790GB    1000GB  209GB     primary  ext4
 4     1000GB   1000GB  565MB     primary  fat32

Model: ATA WDC WD10EZEX-00K (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Tabulka oddílů: msdos
Disk Flags: 

Číslo  Začátek  Konec   Velikost  Typ      Systém souborů  Přepínače
 1     1049kB   1000GB  1000GB    primary  ntfs
/dev/sda1: LABEL="RezervovM-CM-!no systM-CM-)mem" UUID="0656D13D56D12E65" TYPE="ntfs" PARTUUID="76fee6f7-01"
/dev/sda2: UUID="A2D2D605D2D5DE1B" TYPE="ntfs" PARTUUID="76fee6f7-02"
/dev/sda3: UUID="d1e48ec9-c723-41b5-b78a-9457e20f152e" TYPE="ext4" PARTUUID="76fee6f7-03"
/dev/sda4: UUID="3C04-E85C" TYPE="vfat" PARTUUID="76fee6f7-04"
/dev/sdb1: UUID="1C5ED3CB5ED39BB8" TYPE="ntfs" PTTYPE="atari" PARTUUID="76fee6f3-01"

/media/decko /dev/sdb1 ntfs-3g auto,rw,users,exec

findmnt /boot/efi has no output

Yes, that's the problem, you do not have a /boot/efi partition and your disk is msdos not gpt.
You cannot have a uefi system installed to a msdos disk.

Unless you copied wrongly your fstab also do not show a root partition (/).
If you are sure you have a root partition (and copied wrongly), you can change your system to bios-legacy.
Use the same link, this time start up in bios-legacy and do the 'grub-install' and 'update-grub' commands.
There is no need to do the 2 [Additional UEFI Commands].

But if your root is missing (and check your /boot inside it), you will need to reinstall.
In bios-legacy.

Good luck.

1 Like

Thanks, reinstall successful.
But I have had (up to present) grub working with an efi partition (I can mount and browse the partition in dolphin). How was it possible? Dont know, its all weird.

The original problem remains - the grub doesnt boot Win7. It reports:

Setting partition type to 0x7
error: invalid EFI file path.

But this is a stuff for a new thread..

It is possible to have a "efi partition" in msdos. There is nothing to prevent us from making any partition. The installer will even let us install uefi to msdos. But that's wrong and will guarantee a problem down in the future, as you are facing.

An uefi grub cannot boot a bios-legacy windows
A bios-legacy grub cannot boot a uefi windows.

1 Like

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

Forum kindly sponsored by