Duplicates in /boot after repairing bootloader, one will boot the other won't

So recently I’ve had to take apart my whole laptop. After that GRUB was gone so I followed the Restore_the_GRUB_Bootloader article from the wiki to repair it (can’t post link). Now Grub starts but after choosing Manjaro I get the following errors:

Failed to start Load Kernel Modules
Failed to mount /boot/efi
Welcome to Emergency Mode

After that, I rebooted under my Manjaro installation usb and went under the “Detect EFI Bootloaders” option. There I realized that I have to entries for Manjaro the first one gives me the same result as GRUB but the other one (the one highlighted) works fine and let me access my desktop.

My question is simply: What should I do next so that I can boot correctly under GRUB without having to use my installation usb ever time ?

Also, I went under /boot and realized that it is a bit of a mess. The duplicated entries are there, here is the folder structure:

├── efi
│ ├── EFI
│ │ ├── Boot
│ │ │ └── bootx64.efi
│ │ ├── EFI
│ │ │ └── manjaro
│ │ │ └── └── grubx64.efi
│ │ ├── Manjaro
│ │ │ └── grubx64.efi
│ │ └── Microsoft
│ │ ├── …
│ ├── grub
│ │ ├── …
│ ├── initramfs-5.4-x86_64-fallback.img
│ ├── initramfs-5.4-x86_64.img
│ ├── linux54-x86_64.kver
│ ├── System Volume Information
│ └── vmlinuz-5.4-x86_64
├── grub
│ ├── …
├── initramfs-5.4-x86_64-fallback.img
├── initramfs-5.4-x86_64.img
├── intel-ucode.img
├── linux54-x86_64.kver
├── memtest86+
│ └── memtest.bin

Anway, if someone could give me some hint about what I sould do that would be great ! Thanks !

I’m in no way an expert so this is just a (wild) educated guess. Maybe not even that educated.

Anyway, what I would’ve done is to boot with the live ISO and when booted, open the terminal and enter a chroot en vironment with manjaro-chroot.

manjaro-chroot -a

One successfully in the environment, and I don’t know is this is neccessary, navigate to the grub configuration:

cd /etc/defaults/

Once there, run the update-grub command to update the grub configuration.


If successful, close your eyes, hold you thumbs, and reboot.

I give no guarantees that this will work. Or even that you and your computer emerge unscathed.

Also note:
And this is just for interest sake. When in /etc/default you can find the config file for grub. There you’ll be able to edit many options, including which option to automatically boot. Be extremely careful with this, though. Make a backup before making any changes.

I hope this h helps!

Thanks for your answer !

What you described is pretty much what I already did when I followed the Restore the GRUB Bootloader wiki page.
As I understand it update-grub executes the following command :

sudo grub-mkconfig -o /boot/grub/grub.cfg

But here again I end up in a weird spot where I have two grub folders, one at /boot/grub and the other one at /boot/efi/grub (see first post). I don’t understand why… or even how

IMO, it’s because the standard place for EFI bootloader, is not a standard at all and distros do it differently and it may change over time within one distro too. Most rescue attempts are like wildfire, going in all directions, and while they may get you bootable again, they leave a mess behind.
Even w/o such attempts, it seems the EFI structure tends to get filthy over time (well given that I’m a distro hopper makes this worse, I have seven bootable partitions currently), because there is literally no protocol I’ve seen to clean it up. I usually every six months or so, go in and delete everything that I believe is non-relevant (and yes, I have shot myself slightly in the foot before).
I call these ‘relics’.

1 Like

About the duplicates, I am unable to answer you for certain.

That being the case, I once again deny any and all responsibly should this not work as expected.

I recommend booting into a live ISO and entering the chroot environment again.

Now here’s where I’m totally uncertain.
I 'd recommend deleting every and all files under /boot. But once again, you do this at own risk. After which running the update-grub command again.

According to my logic that should, at least in theory, wipe every double entry, kind of like a factory reset. Well, that’s the theory anyway.

Alright so both your comments seem to point in the same direction, which is to delete everything and start fresh. I’m might end up doing that but before I would like to know your opinions about something.

Since the bootloader at /efi/efi/manjaro/grubx64.efi seems to work, and the one at /efi/Manjaro/grubx64.efi doesn’t. And since GRUB only seems to recognizes the second one. What would happen if I were to copy the one working over the other one ?

Don’t worry, I hear you loud and clear. I question everything and am the only person responsible for anything bad that might happen on my computer :slight_smile:

Follow up question: As I have a working system right now, do I really have to boot under a live ISO and chroot into my environment ? Can’t I do everything directly from my system ?

I’m honestly not sure. That just seems the safest, eo the best option to me. It’s what I would’ve done.

1 Like

The /boot/efi directory is locked on a running system so I think you will have to do any modifications after booting from a live ISO

1 Like

So I tried copying the good bootloader over the bad one … and it kinda worked :slight_smile:. My pc now boots directly to my system (yay ! ) but skips over GRUB menu. Which means no dual boot. I tried to update-grub from the live ISO and everything went back to my initial problem. I might settle for this solution for the time being. I can still access my other os through the Boot selection menu, it’s just not as convenient as the GRUB menu. But hey, at least it works.

Next step will be to delete /boot content entirely and rebuild it. I’m going to read a bit more about this and when I feel confident I’ll give it a try.

Btw, thanks a lot Mirdarthos for your help ! And to everyone who joined in !

Ok, but root should have access to it right ?

You’re very welcome!

I do find it best to read up on and the tackle something like this. So I think that’s a good idea!

If you’re able to handle it, bear in mind that in Unix everything is a file. You can just tar up the /efi file-system and wreak havoc, then restore if needed by untarring your archive.