Manjaro boot error "mount: /sys/firmware/efi/efivars: unknown filesystem type 'efivarfs'

So I did something a few days ago that messed up my Manjaro installation (ironically while trying to recover another broken installation) and I’ve been trying to fix it for days. Reinstalled grub a bunch of times, been all over Google but I can’t seem to boot and it gives me these errors every time

mount: /sys/firmware/efi/efivars: unknown filesystem type 'efivarfs' [FAILED] Failed to start Load Kernel Modules. [FAILED] Failed to mount /boot/efi. [DEPEND] Dependency failed for Local File Systems. You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode Give root password for maintenance (or press Control-D to continue):

I’d say you have managed to install grub in BIOS/MBR mode although your original Manjaro system was installed with UEFI.

Just to check before doing anything not recoverable, boot from the Manjaro installation media in UEFI mode. For reference:

  • BIOS booting: https://paste.pics/e0d6dda01c316f55ab8df81c80ac92f7
  • UEFI booting: https://paste.pics/2c280dbbf637e36f9abf62c10870289e
    (Can’t post links now)

From the installation media open a terminal and run:

sudo efibootmgr -v
sudo parted -l
lsblk -f

[Edited: Commands corrected for future references]

Post here the output of the three commands. Please enclose outputs in ``` marks to correctly format the text. Like this:

```
Output
More output
```

Produces:

Output
More output

i add

inxi  -Fxza
test -d /sys/firmware/efi && echo efi || echo bios

Yes, my bad. I gave you the commands wrong. I have now edited the messages with the correct ones:

sudo efibootmgr -v
sudo parted -l

Anyway, Your Windows is in sda and I think it should be working fine. You have an EFI partition in sdb and two ext4 partitions, that I guess are Manjaro and Ubuntu. Probably Ubuntu is also working fine.

So, my recommendation: Boot again in UEFI mode from the Manjaro install media and use the command manjaro-chroot -a in the terminal. It is going to present you a little menu to select your Manjaro partition. Due to a bug in the program, you have to select the manjaro option +1 (i.e. If menu says 0) Manjaro, you select 1). That command should also mount /dev/sdb1 in /mnt/boot/efi (it will inform you of that)
If everything went well, now you can install grub and update grub config:

grub-install
update-grub

After that, you can reboot and boot your UEFI’s Manjaro entry, where grub should give you the option to boot Manjaro, Ubuntu or Windows.

I got an error trying to run manjaro-chroot

[manjaro@manjaro ~]$ manjaro-chroot
==> ERROR: Can't create chroot on non-directory 
[manjaro@manjaro ~]$ sudo efibootmgr -v
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0000,0003,0001,0006,0004,0005
Boot0000* Windows Boot Manager	HD(1,GPT,04ed7bb5-c198-43d3-97b7-0392155e1f02,0x800,0x82000)/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.}....................
Boot0001* ubuntu	HD(1,GPT,04ed7bb5-c198-43d3-97b7-0392155e1f02,0x800,0x82000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0003* Hard Drive	BBS(HD,,0x0)..GO..NO........o.S.T.1.0.0.0.L.M.0.3.5.-.1.R.K.1.7.2....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .D.Z.A.E.C.E.T.0........BO..NO........q.S.a.n.D.i.s.k....................A.............................>..Gd-.;.A..MQ..L.2.0.0.6.0.7.7.4.0.3.1.8.A.9.2.1.E.0.E.0........BO..NO........a.A.S.M.1.1.5.3.U.A.S.M.1.1.5.3.U.S.B.3...0.T.O.S.0....................A................................Gd-.;.A..MQ..L.1.2.3.4.5.6.7.8.9.0.1.9........BO
Boot0004* UEFI: SanDisk	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/USB(3,0)/CDROM(1,0x5499e8,0x8000)..BO
Boot0005* UEFI: SanDisk, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/USB(3,0)/HD(1,MBR,0x0,0x5499e8,0x2000)..BO
Boot0006* UEFI OS	HD(1,GPT,e21e6ecc-5cf6-5d47-85fb-91b6f6cdd4d3,0x1000,0x96000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
[manjaro@manjaro ~]$ sudo parted -l
Model: ATA ST1000LM035-1RK1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  274MB   273MB   fat32        EFI system partition          boot, esp
 2      274MB   290MB   16.8MB               Microsoft reserved partition  msftres
 3      290MB   999GB   999GB   ntfs         Basic data partition          msftdata
 4      999GB   1000GB  839MB   ntfs         Basic data partition          hidden, diag


Model: ASM1153U ASM1153USB3.0TOS (scsi)
Disk /dev/sdb: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name     Flags
 1      2097kB  317MB  315MB   fat32                 boot, esp
 2      317MB   165GB  165GB   ext4         manjaro
 3      165GB   175GB  9320MB  ext4         android


Model: SanDisk Cruzer (scsi)
Disk /dev/sdc: 4000MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      2839MB  2843MB  4194kB  primary               esp

command is

sudo manjaro-chroot -a ( type 1 if only one line 0 appears )
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck --verbose
update-grub
efibootmgr -v
exit ( end chroot )

I did the commands and it’s still giving me the same exact errors as before
I noticed this when I ran update-grub

grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.

otherwise it seemed to complete successfully
here are the results to efibootmgr -v after

Timeout: 2 seconds
BootOrder: 0002,0000,0003,0001,0006,0004,0005
Boot0000* Windows Boot Manager	HD(1,GPT,04ed7bb5-c198-43d3-97b7-0392155e1f02,0x800,0x82000)/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.}....................
Boot0001* ubuntu	HD(1,GPT,04ed7bb5-c198-43d3-97b7-0392155e1f02,0x800,0x82000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0002* manjaro	HD(1,GPT,e21e6ecc-5cf6-5d47-85fb-91b6f6cdd4d3,0x1000,0x96000)/File(\EFI\manjaro\grubx64.efi)
Boot0003* Hard Drive	BBS(HD,,0x0)..GO..NO........o.S.T.1.0.0.0.L.M.0.3.5.-.1.R.K.1.7.2....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .D.Z.A.E.C.E.T.0........BO..NO........q.S.a.n.D.i.s.k....................A.............................>..Gd-.;.A..MQ..L.2.0.0.6.0.7.7.4.0.3.1.8.A.9.2.1.E.0.E.0........BO..NO........a.A.S.M.1.1.5.3.U.A.S.M.1.1.5.3.U.S.B.3...0.T.O.S.0....................A................................Gd-.;.A..MQ..L.1.2.3.4.5.6.7.8.9.0.1.9........BO
Boot0004* UEFI: SanDisk	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/USB(3,0)/CDROM(1,0x5499e8,0x8000)..BO
Boot0005* UEFI: SanDisk, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/USB(3,0)/HD(1,MBR,0x0,0x5499e8,0x2000)..BO
Boot0006* UEFI OS	HD(1,GPT,e21e6ecc-5cf6-5d47-85fb-91b6f6cdd4d3,0x1000,0x96000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

then exit

and try to reboot on sdb

I meant the commands appeared to work but I still can’t boot into Manjaro

reboot on USB iso manjaro

sudo manjaro-chroot -a ( type 1 if only one line 0 appears )
cat /etc/fstab
exit ( end chroot )

is there a mountpoint /boot/efi ?

check options bios for boot
no secure boot
no fast boot
no csm
only UEFI ( or others in case UEFI windows )
only AHCI disks

can you see UEFI manjaro for your disk ?