Help Booting (Stuck in Emergency Mode) after Windows 10 Install

Hello, I just managed to install Windows 10 today. I’ve been running Manjaro fine on its own on this system for about 3-4 months now. I needed Windows for Keysight engineering programs for school. I knew that Manjaro and Windows were not going to cooperate well together so I physically removed my M.2 drive containing Manjaro from my system when installing Windows. After the Windows install finished, I plugged my M.2 with Manjaro back in and tried to boot. I end up at a black screen with a message like this:

mount: /sys/firmware/efi/efivars: unknown filesystem type 'efivarfs'.
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemcrl default" or "exit" to boot into default mode.

I’ve been trying various troubleshooting steps mentioned online. Additionally I do have a live-usb with Manjaro installed. I can run

manjarochroot -a

and all my files are still in place on the drive. I’ve ran

sudo update-grub

a few times already.

The output of this command is a bit mysterious to me:

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-rt-x86_64
Found initrd image: /boot/amd-ucode.img  /bootinitramfs-5.13-x86_64.img
Found initrd fallback image: /boot/initramfs-5.13-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrs fallback image: /boot/amd-ucode.img /boot/initramfs-5.100x86_64-fallback,img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootbale binaries on them and create new boot entries.
Found Winodes Boot Manger on /dev/nvme1n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

This is worrisome to me since /dev/nvme0n1 contains Manjaro on my system. It’s kinda hard to type the output of lsblk but I’ll try:
nvme0n1
→ nvme0n1p1 part /
→ nvme0n1p2 part /home
→ nvme0n1p3 part /boot/efi
nvme1n1
→ nvme1n1p1
→ nvme1n1p2
→ nvme1n1p3
→ nvme1n1p4

nvme1n1 in its entirety is a Windows 10 install. As such I think I can ignore it for troublshooting most likely.

Any help to getting my system back to operational is greatly appreciated!

It’s frustrating that manjaro-chroot -a works and gives me all the files back. I think the solution is gonna be something simple to fix in grub that I don’t know.

Have you tried reinstalling grub?

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

Then update grub menu:

 sudo update-grub

I should mention that I am running all these commands in the emergency mode CLI. The result of the first input is:

Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory

Unfortunately, running sudo update-grub gives the exact same message as before.

What does it mean by EFI variables are unsupported? I guess this matches my original problem of unknown filesystem type ‘efivarfs’

Are you somehow booting in Legacy BIOS mode??
You can check by using the following shell script -

#!/bin/bash
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

Nope, the output of that is UEFI.

As a sidenote --I do have access to all my files too from emergency mode surprisingly. I dropped the shell script in there. Maybe that isn’t that surprising, but I’ve used Linux for about ~2 years now so I’m still learning.

I found a similar problem at unix.stackexchange.com
https://unix.stackexchange.com/questions/91620/efi-variables-are-not-supported-on-this-system

Ok I’m back on the live-usb. I’m using debug mode:

[manjaro-gnome /]# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Manjaro --recheck --debug
Installing for x86_64-efi platform.
grub-install: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-install: info: /dev/nvme0n1p1 is not present.
grub-install: info: Looking for /dev/nvme0n1p1.
grub-install: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p1.
grub-install: info: /dev/nvme0n1p1 starts from 2050048.
grub-install: info: opening the device hostdisk//dev/nvme0n1.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Partition 0 starts from 2050048.
grub-install: info: /dev/nvme0n1p1 is present.
grub-install: info: Looking for /dev/nvme0n1p1.
grub-install: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p1.
grub-install: info: /dev/nvme0n1p1 starts from 2050048.
grub-install: info: opening the device hostdisk//dev/nvme0n1.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Partition 0 starts from 2050048.
grub-install: info: /dev/nvme0n1p1 is present.
grub-install: info: Looking for /dev/nvme0n1p1.
grub-install: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p1.
grub-install: info: /dev/nvme0n1p1 starts from 2050048.
grub-install: info: opening the device hostdisk//dev/nvme0n1.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-install: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-install: info: no LDM signature found.
grub-install: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-install: info: no LVM signature found.
grub-install: info: Partition 0 starts from 2050048.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-install: error: /boot doesn't look like an EFI partition.

Additionally, running

efivar -l 

while chrooted gives a whole bunch of outputs surprisingly.

It would be, in this case,

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --recheck --debug

[EFI folder is /boot/efi not /boot in this case]

Thanks! Yes it is a lot more useful now. I ran it… It is way too long to copy and paste. However then ending was interesting

grub-install: info: executing modprobe -q efivarfs.
grub-install: info: executing efibootmgr -b 0002 -B.
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0001,0000,0004
Boot0000* Windows Boot Manager
Boot0001* UEFI OS
Boot0003* UEFI: PNY USB 2.0 FD PMAP
Boot0004* UEFI: PNY USB 2.0 FD PMAP, Partition 2
grub-install: info: executing efibootmgr -c -d /dev/nvme0n1 -p 3 -w -L Manjaro -l \EFI\Manjaro\grubx64.efi.
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0002,0003,0001,0000,0004
Boot0000* Windows Boot Manager
Boot0001* UEFI OS
Boot0003* UEFI: PNY USB 2.0 FD PMAP
Boot0004* UEFI: PNY USB 2.0 FD PMAP, Partition 2
Boot0002* Manjaro
Installation finished. No error reported.

Any thoughts?

Have you tried booting into the Manjaro install? does it still give the errors?

I think so. That is the default I think when I boot. It always displays this at the top:

mount: /sys/firmware/efi/efivars: unknown filesystem type 'efivarfs'.
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemcrl default" or "exit" to boot into default mode.

Is there a way to check what I am booting in?

What’s the output of

sudo efibootmgr -v

?
And what’s the kernel you’re using?

uname -sa

The first command results in:

BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0001,0000
Boot0000* Windows Boot Manager          HD(1,GPT,1cad5066-1cd0-423b-9c5b-cf085b3ba920,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS......... (more stuff seems useless)
Boot0001* UEFI OS               HD(3,GPT,eb898b8d-c5da-1841-b0bc-1e03b8277aac,0x800,0x1f4000)/File(\EFI\BOOT\BOOTX64.EFI)..B0
Boot0002* Manjaro              HD(3,GPT,eb898b8d-c5da-1841-b0bc-1e03b8277aac,0x800,0x1f4000)/File(\EFI\MANJARO\GRUBX64.EFI)

The second command gives:

Linux

Additionally, this time when I booted I no longer got the message about the ‘efivarfs’, I just got dumped into emergency mode.

Sorry, there was a typo in the 2nd command.

Ok it is

Linux tylerDesktop 5.10.102.-1-MANJARO #1 SMP PREEMPT Wed Feb 23 14:44:40 UTC 2022 x86_64 GNU/Linux

I’m debating on a reinstall from the live-usb. Making it not reformat home and only install root and /boot/efi. But that’s also risky I think and it might not solve the issue.

That’s the last resort, for sure.
Though you’re on a LTS kernel, try installing another LTS kernel like 5.4 or 5.15 and boot from that kernel.

sudo mhwd-kernel -i linux54 # or linux515

Ok I tried that. I’m not connecting. A bunch of “too many errors from ~~~~” and “failed retrieving file ~~~~” for both cases.

I’m not sure what changed

You aren’t connected to internet, it seems :man_shrugging: