EFI Boot Manager messed up - how to fix from live session?

Hi, so last year I setup a dual-boot system (Manjaro + Win10). It's been a while and I'm no expert but iirc I followed this tutorial and I ended up with a dedicated EFI boot partition (sdc1), Win10 installed on sdc2 and Manjaro on sdc3.
Everything worked well but last night Win10 threw a blue screen at me and because of the improper shutdown something messed up. The boot menu with the OS selection does not appear anymore, the computer tries to boot straight into Windows where I get a blue screen and some error about winload.exe.
That's fine, I'll reinstall Win10 if needed but I would really like to regain access to Manjaro at least.

I also tried to fix things from a CMD Prompt run from a bootable USB image of Win10, but I messed them up further. I wanted to use bcdboot to repair the boot manager but I accidentaly pointed it to the EFI boot partition that was actually on the USB stick with Win10.

When starting a Manjaro live session, checking for OS boot entries says: No EFI boot entries detected. or something to that effect.
But everything looks alright as far the directories and files in sdc1:

└── EFI
├── Boot
│ └── bootx64.efi
├── Manjaro
│ └── grubx64.efi
└── Microsoft
├── Boot
│ ├── BCD
│ ├── BCD.LOG
│ ├── BCD.LOG1
│ ├── BCD.LOG2
│ ├── bg-BG
│ │ ├── bootmgfw.efi.mui
│ │ └── bootmgr.efi.mui
│ ├── bootmgfw.efi
│ ├── bootmgr.efi
│ ├── boot.stl
│ ├── en-US
│ │ ├── bootmgfw.efi.mui
│ │ ├── bootmgr.efi.mui
│ │ └── memtest.efi.mui
│ ├── Fonts
│ │ ├── chs_boot.ttf
│ │ ├── cht_boot.ttf
│ │ ├── jpn_boot.ttf
│ │ ├── kor_boot.ttf
│ │ ├── malgun_boot.ttf
│ │ ├── malgunn_boot.ttf
│ │ ├── meiryo_boot.ttf
│ │ ├── meiryon_boot.ttf
│ │ ├── msjh_boot.ttf
│ │ ├── msjhn_boot.ttf
│ │ ├── msyh_boot.ttf
│ │ ├── msyhn_boot.ttf
│ │ ├── segmono_boot.ttf
│ │ ├── segoen_slboot.ttf
│ │ ├── segoe_slboot.ttf
│ │ └── wgl4_boot.ttf
│ ├── kd_02_10df.dll
│ ├── kd_02_10ec.dll
│ ├── kd_02_1137.dll
│ ├── kd_02_14e4.dll
│ ├── kd_02_15b3.dll
│ ├── kd_02_1969.dll
│ ├── kd_02_19a2.dll
│ ├── kd_02_1af4.dll
│ ├── kd_02_8086.dll
│ ├── kd_07_1415.dll
│ ├── kd_0C_8086.dll
│ ├── kdstub.dll
│ ├── qps-ploc
│ │ └── memtest.efi.mui
│ ├── Resources
│ │ ├── bootres.dll
│ │ └── en-US
│ │ └── bootres.dll.mui
└── Recovery
├── BCD
├── BCD.LOG1
└── BCD.LOG2

The output of efibootmgr, not sure if relevant but here it is:

BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0004,0005,0006
Boot0004* Hard Drive
Boot0005* UEFI: KingstonDataTraveler 2.0PMAP
Boot0006* UEFI: SMI USB DISK 1100

Is there any way I can use efibootmgr to point to the correct EFI boot entries so I can get access to my Manjaro installation at least?

Hi @mihnea13 welcome to the Manjaro forum.

Have a look here:


Boot up your Manjaro live usb and use "detect efi bootloaders" and see if the path to Manjaro's bootloader will show up. See if you can boot from that.

That doesn't find any bootloaders, unfortunately.

Thanks, I saw that page but I thought that was only for MBR, should have scrolled further down!
But, one problem...I tried following the steps and when trying to run:

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

I get this error:

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.

And I'm chroot-ed into the Manjaro installation and also mounted sdc1 at /boot/efi....

You may have booted the live ISO in legacy/mbr mode.

When booting off the live ISO use your BIOS to select the correct boot device. You will probably the usb listed more than once. One of the options will probably say EFI or UEFI near the name of the device, pick that one.

Ok, got grub-install working, it was that issue with the efivarfs module mentioned in the wiki.
Grub-update did find some linux-images, but after rebooting the behaviour is the same: live Manjaro ISO does not detect any EFI files, and on a normal boot the system goes straight to Windows boot error.

Please post the output of from chroot:

efibootmgr -v

sudo parted -l
(that is lowercase L)

sudo blkid -o list

cat /etc/fstab


efibootmgr -v

BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0004,0005
Boot0004* Hard Drive BBS(HD,,0x0)AMGOAMNO........o.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.3.F. .W.D.3.0.E.Z.R.Z.-.0.0.Z.5.H.B.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.4.C.5.N.V.L.1.S.V.J......AMBOAMNO........e.S.M.I. .U.S.B. .D.I.S.K. .;.A..MQ..L.S.M.I. .U.S.B. .D.I.S.K. .
Boot0005* UEFI: SMI USB DISK 1100 PciRoot(0x0)/Pci(0x10,0x0)/USB(1,0)/HD(1,MBR,0x0,0x5647ac,0x2000)AMBO

sudo parted -l

Model: SMI USB DISK (scsi)
Disk /dev/sda: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
2 2895MB 2899MB 4194kB primary esp

Model: ATA KINGSTON SA400S3 (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 1049kB 525MB 524MB fat32 boot, esp
2 525MB 135GB 135GB ntfs msftdata
3 135GB 240GB 105GB ext4

Model: ATA WDC WD10EZEX-00B (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 995GB 995GB primary ntfs boot
2 995GB 1000GB 5369MB primary linux-swap(v1)

Model: ATA WDC WD30EZRZ-00Z (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 131kB 3001GB 3001GB ntfs Basic data partition msftdata

sdb is the drive with the boot partition and the two operating systems.

sudo blkid -o list

/dev/loop0 squashfs (in use)
/dev/loop1 squashfs (in use)
/dev/loop2 squashfs (in use)
/dev/loop3 squashfs (in use)
/dev/sda1 iso9660 MJRO1815 (in use) 2019-12-29-08-20-39-00
/dev/sda2 vfat MISO_EFI (not mounted) 1443-38AC
/dev/sdb1 vfat BOOT_PART /boot/efi E233-69ED
/dev/sdb2 ntfs Windows (not mounted) 7BFA97396C1A1733
/dev/sdd1 ntfs F (not mounted) 0D0713DB0D0713DB
/dev/sdc1 ntfs (not mounted) 4B4C5D5B5F8EA85F
/dev/sdc2 swap (not mounted) 2c061f4c-908e-42f9-a69f-64625d9ae169
/dev/sdb3 ext4 / 021bd61e-88dd-4dc3-be6a-e3f9c1c233c2

And the contents of fstab:

UUID=E233-69ED /boot/efi vfat umask=0077 0 2
UUID=021bd61e-88dd-4dc3-be6a-e3f9c1c233c2 / ext4 defaults,noatime,discard 0 1
UUID=2c061f4c-908e-42f9-a69f-64625d9ae169 swap swap defaults,noatime 0 2
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
UUID=4B4C5D5B5F8EA85F /mnt/Data ntfs-3g defaults 0 0
UUID=0D0713DB0D0713DB /mnt/Date_3TB ntfs-3g defaults 0 0
UUID=7BFA97396C1A1733 /mnt/Win10 ntfs-3g defaults 0 0

Thank you!

I suppose this was a typo then.

So if you got grub installed correctly on /dev/sdb1 you could try to run the following command from chroot to create an efi bootloader entry manually:

efibootmgr -c -d /dev/sdb -p 1 -w -v -L manjaro -l \EFI\manjaro\grubx64.efi

Check with

efibootmgr -v

If it is there, reboot your system, go into your bios/firmware settings >> boot devices/order (or some such) and put Manjaro at the top of the list. Save the settings and reboot.

Yes, when I initially posted I had another USB drive connected so the letters were assigned differently.

But still, no progress.
Maybe I'm doing something wrong, here's what I did:

sudo su
mount /dev/sdb3 /mnt
mount /dev/sdb1 /mnt/boot/efi
-- then I mount proc,sys and so on
sudo modprobe efivarfs
chroot /mnt
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

At which point I get a message saying that installation finished without any errors.

So then, still in with chroot:

efibootmgr -c -d /dev/sdb -p 1 -w -v -L manjaro -l \EFI\manjaro\grubx64.efi

I get a warning that: Boot0000 has same label manjaro, but it looks that it was added anyway because this is now at the end of efibootmgr -v:

Boot0001* manjaro HD(1,GPT,8d97d29a-3b79-4e93-9803-89bbbc388ff9,0x800,0xfa000)/File(EFImanjarogrubx64.efi)

And on reboot, nothing. I just realised that in BIOS I don't even see the SSD drive with the boot partition, so I can't add it to the boot priority. And in the startup menu of the Manjaro live ISO, still no EFI files detected. I also don't see this drive from the diskpart utility when run from a Windows Recovery ISO...but I do see a 0-byte drive from there that I can't access.
I would think that the SSD is starting to fail on me, except when booted into live Manjaro I can mount its partitions, access any files etc...very weird. I even did a SSD health test, zero errors.

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

Forum kindly sponsored by