Issues with grub and efibootmgr while dual booting

I have been trying to dual boot Manjaro on my desktop PC and have been running into issues with grub. After the installation completed, the PC booted directly to Windows without showing the grub screen. After looking up the issue on the forum, I found a thread that suggested the command bcdedit /set {bootmgr} path \EFI\manjaro\grubx64.efi be run in the command prompt in Windows. After running the command, the PC now boots to a grub recovery screen and I am unable to do anything without the live cd. I found another thread with a guide to restoring grub, which has allowed for me to boot into the OS using the commands: search.file /etc/manjaro-release root and configfile /boot/grub/grub.cfg in the grub prompt of the live usb. In the process of trying to fix the issue, however, I believe I have messed up the efibootmgr, as there is now duplicate entries of manjaro and errors whenever I try to run any efibootmgr commands. Any help fixing the problem would be appreciated.

The second linked thread suggested that the output of a few commands be included, so the following is the output of those commands:

efibootmgr - v

BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0004,0003,0009,0008,0000,0002,0006,0007,0001
Boot0000* Windows Boot Manager	HD(2,GPT,572676f1-1b44-4a78-b250-e332391281ff,0xfa000,0x32000)/File(\EFI\MANJARO\GRUBX64.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.}...T................
Boot0001* Hard Drive	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.T.1.0.0.0.D.M.0.0.3.-.1.E.R.1.6.2...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .4.Z.1.Y.C.P.B.J........BO..NO..........A.D.A.T.A. .S.P.5.5.0...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.G.2.7.2.0.2.1.0.1.6.8.4. . . . . . . . ........BO..NO..........K.I.N.G.S.T.O.N. .S.A.4.0.0.S.3.7.1.2.0.G...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.0.5.2.0.B.6.3.7.0.8.0.1.2.2.4.E. . . . ........BO
Boot0002* manjaro	HD(3,GPT,1599630c-3bf1-4f07-affa-3bf1c26d9146,0x9c48000,0x100000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0003* manjaro	HD(1,MBR,0x44de36fd,0x800,0x74623000)/File(\EFI\Manjaro\grubx64.efi)
Boot0004* manjaro	HD(3,GPT,1599630c-3bf1-4f07-affa-3bf1c26d9146,0x9c48000,0x100000)/File(\EFI\Manjaro\grubx64.efi)
Boot0006* UEFI OS	HD(3,GPT,1599630c-3bf1-4f07-affa-3bf1c26d9146,0x9c48000,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0007* Windows Boot Manager	HD(2,GPT,572676f1-1b44-4a78-b250-e332391281ff,0xfa000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)..BO
Boot0008* USB HDD	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0900)..GO..NO..........S.a.n.D.i.s.k. .C.r.u.z.e.r. .F.a.c.e.t. .1...2.6...................\.,.@.r.d.=.X..........A.............................>..Gd-.;.A..MQ..L.4.C.5.3.2.0.0.0.0.2.0.5.1.1.1.1.1.0.0.1........BO
Boot0009* UEFI OS	HD(2,MBR,0xada9980a,0x3a8718,0x2000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

sudo parted -l

Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1000GB  1000GB  primary  ntfs
 2      1000GB  1000GB  473MB   primary  ntfs         diag


Model: ATA ADATA SP550 (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  524MB  523MB   ntfs         Basic data partition          hidden, diag
 2      524MB   629MB  105MB   fat32        EFI system partition          boot, esp
 3      629MB   646MB  16.8MB               Microsoft reserved partition  msftres
 4      646MB   120GB  119GB   ntfs         Basic data partition          msftdata


Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sdc: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      17.4kB  16.8MB  16.8MB                  Microsoft reserved partition  msftres
 2      16.8MB  83.9GB  83.9GB  ntfs            Basic data partition          msftdata
 3      83.9GB  84.4GB  537MB   fat32                                         msftdata
 4      84.4GB  86.6GB  2147MB  linux-swap(v1)
 5      86.6GB  120GB   33.4GB  ext4


Model: SanDisk Cruzer Facet (scsi)
Disk /dev/sdd: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      1964MB  1968MB  4194kB  primary               esp



sudo blkid

/dev/sda1: LABEL="Data" UUID="7A82298982294B49" TYPE="ntfs" PARTUUID="44de36fd-01"
/dev/sda2: UUID="F026A5F626A5BDCA" TYPE="ntfs" PARTUUID="44de36fd-02"
/dev/sdb1: LABEL="Recovery" UUID="70F4A71FF4A6E716" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="7f3885d3-b60f-49a2-9775-c8097f4704db"
/dev/sdb2: UUID="E0A8-C029" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="572676f1-1b44-4a78-b250-e332391281ff"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="4a1254d8-ec6f-4a1f-acab-bd870158622f"
/dev/sdb4: UUID="1624B13824B11BA5" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="73a5b107-571b-4538-9c49-fb8e2f07363c"
/dev/sdc1: PARTLABEL="Microsoft reserved partition" PARTUUID="9a31fcb6-cd23-4faa-9b7c-a1b672f6b32e"
/dev/sdc2: LABEL="SSD Data" UUID="AA8ADCFA8ADCC44B" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c944d575-dcd8-48e3-90f5-99fdfaf8af9f"
/dev/sdc3: UUID="A54B-5A91" TYPE="vfat" PARTUUID="1599630c-3bf1-4f07-affa-3bf1c26d9146"
/dev/sdc4: UUID="3694b661-bec7-4aeb-81f1-ad30bcdcc796" TYPE="swap" PARTUUID="a4fa52ca-7e94-4b09-a90b-88fa3b89f97a"
/dev/sdc5: UUID="12899371-5e7c-4a0f-8524-5c384504d7c1" TYPE="ext4" PARTUUID="8107f12c-a50b-4019-b23d-1ba9c27f3e64"
/dev/sdd1: UUID="2018-12-22-23-56-31-00" LABEL="MJRO1801" TYPE="iso9660" PARTUUID="ada9980a-01"
/dev/sdd2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="AA2D-678B" TYPE="vfat" PARTUUID="ada9980a-02"

findmnt -s

TARGET SOURCE                                    FSTYPE OPTIONS
/boot/efi
       UUID=A54B-5A91                            vfat   defaults,noatime
swap   UUID=3694b661-bec7-4aeb-81f1-ad30bcdcc796 swap   defaults,noatime,discard
/      UUID=12899371-5e7c-4a0f-8524-5c384504d7c1 ext4   defaults,noatime,discard
/tmp   tmpfs                                     tmpfs  defaults,noatime,mode=17

findmnt /boot/efi

TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sdc3 vfat   rw,noatime,fmask=0022,dmask=0022,codepage=437,iochars

First, welcome to manjaro.

What errors do you get "whenever I try to run any efibootmgr commands"?
To remove duplicate manjaro entries,

sudo efibootmgr -b 0002  -B
sudo efibootmgr -b 0003  -B
sudo efibootmgr -b 0009  -B

Note 0009 entry is a bootx64.efi entry but it is pointing to a msdos disk.

Suggest you do this command again. If done, it is okay to do again. There will not be a duplicate entry.

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi

Now, 2 points
o primary disk
o removable external disks

Your primary disk is the 1 TB disk that does not contain any OS and it is in msdos partitioning.
It is preferable that for uefi systems, the primary disk be gpt and that $esp partitions reside in that primary disk. You can make that 1TB gpt or change cables to have the kingston (manjaro disk) the primary disk.

If any disk is removed and rebooted without it, the firmware efibootentry of that disk will be lost.
But some firmware (not all) are good enough to pick it up again when shutdown and restart (not reboot).

I suspect that one of your disk (I guess the manjaro one) is an external removable disk and whenever you remove it and boot without it, you lose that efiboot-entry.
If you want to have it to be removable, you have to add "--removable" to the grub-install command. (You can do that after all above is done, no problem)

sudo grub-install --removable

But note that for some computers, to boot that external drive (with --removable done), you will need to boot that by the computer boot F key (usually F8 ~ F12). Some needs that F key to be enabled by going to bios setting (usually F2).

Good luck.

1 Like

One of the errors I was getting with the efibootmgr occurred when I was trying to use the command to remove the 0002 entry. I was getting an error saying the variable could not be found every time I ran the command. However, using the command to remove the 0003 and 0009 entries seems to have also removed the 0002 entry. I also deleted the 0004 entry and recreated it to make sure I hadn't somehow messed it up. The new efibootmgr order is as follows:

BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0009,0000,0006,0007,0002,0008,0001
Boot0000* Windows Boot Manager	HD(2,GPT,572676f1-1b44-4a78-b250-e332391281ff,0xfa000,0x32000)/File(\EFI\MANJARO\GRUBX64.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.}...T................
Boot0001* Hard Drive	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.T.1.0.0.0.D.M.0.0.3.-.1.E.R.1.6.2...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .4.Z.1.Y.C.P.B.J........BO..NO..........A.D.A.T.A. .S.P.5.5.0...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.G.2.7.2.0.2.1.0.1.6.8.4. . . . . . . . ........BO..NO..........K.I.N.G.S.T.O.N. .S.A.4.0.0.S.3.7.1.2.0.G...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.0.5.2.0.B.6.3.7.0.8.0.1.2.2.4.E. . . . ........BO
Boot0002* manjaro	HD(3,GPT,1599630c-3bf1-4f07-affa-3bf1c26d9146,0x9c48000,0x100000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0006* UEFI OS	HD(3,GPT,1599630c-3bf1-4f07-affa-3bf1c26d9146,0x9c48000,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0007* Windows Boot Manager	HD(2,GPT,572676f1-1b44-4a78-b250-e332391281ff,0xfa000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)..BO
Boot0008* USB HDD	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0900)..GO..NO..........S.a.n.D.i.s.k. .C.r.u.z.e.r. .F.a.c.e.t. .1...2.6...................\.,.@.r.d.=.X..........A.............................>..Gd-.;.A..MQ..L.4.C.5.3.2.0.0.0.0.2.0.5.1.1.1.1.1.0.0.1........BO
Boot0009* UEFI OS	HD(2,MBR,0xada9980a,0x3a8718,0x2000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

When I boot now, I get the same error screen as before along with a grub prompt:

error: no such devices: 799b8494-9662-46ab-8fd9-7c6ca3d3d31d.
error: unkown filesystem.
Entering rescue mode...

As for the disks, all three disks are internal disks. If I rearrange the order of the cables so that the Kingston SSD is in the first slot, will there be any issues on my Windows or Manjaro installs?

This uuid 799b8494-9662-46ab-8fd9-7c6ca3d3d31d (if you don't know what this is, of course tell us if you know) is most likely the uuid of a partition that has been deleted or resized or a partition of disk that is converted from gpt or msdos.

Never mind, let's just try to redo everything (grub) again.

At manjaro terminal,

sudo rm -Rf /etc/grub.d
sudo rm /etc/default/grub
sudo pacman -S grub
sudo grub-install
sudo update-grub
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi

And tell us make and model of your system, particularly if it is Lenovo.
And do you/did you have grub-customizer installed?

Did not answer you on this.
If all are internal, for uefi systems and all gpt disks, that shouldn't matter.
But your current primary is a mbr disk. If you can convert this to gpt without removing the cable, that would be better. Note converting to gpt will lose all data in it. And some uefi firmware will lose efiboot-entries if disks are removed and booted (as said earlier). There might be a probability of losing the entries (but I can get it back, but now we have this problem).
So best for now to leave that alone as all are internal.

Not a satisfactory answer but the best under the circumstance.

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