Windows deleted EFI and GRUB doesn't work as a result

My setup

I’m triple booting Manjaro with ParrotOS and Windows 11. I mainly use Manjaro but I hop to Parrot for some technical stuff (and I like having a second, separate linux distro for admin reasons), but what I usually use besides Manjaro is Windows, because some software can’t be found in linux systems.

What happened

I had a problem in Windows because my significant other, who doesn’t know much about IT, ■■■■■■ up some registry entries. Chose to restore Windows to a later state, since I do weekly snaps just in case. When it finished, GRUB dissapeared from ParrotOS and Manjaro. I strongly believe EFI files where deleted or replaced in Windows 11 OS

What I need

So, I’ve decided to fix the issue. I’m used to some kind of sysadmin in Linux and Windows, so I’m not afraid of touching stuff, but it’s the first time I face the GRUB terminal and, while I do have a very basic understanding of what to do, I don’t know the more technical details, and honestly, I’d love a comprehensive guide, so I can do it once and learn it well.

I need to enter the Manjaro OS, log in and have root access. From there, I won’t need any more help. So… how do I boot Manjaro from GRUB terminal?

Thanks in advance!!

EDIT: Another possibility for me is to boot from an USB, and repair/install GRUB from there, so it repairs itself. And then boot once again to Manjaro

Search the forum for “chroot grub install” and you get the solution.
Boot from a manjaro USB drive, open terminal and:

# we chroot
manjaro-chroot -a

# we reinstal  GRUB for EFI system
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
# or GRUB for MBR system, where /dev/sdy is the target
# grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy

# we update GRUB
grub-mkconfig -o /boot/grub/grub.cfg

# we exit chroot to unmount the system
exit

# we reboot
reboot

You need to repair grub via liveUSB or grub comand line. Both can search via web

will this script detect the efi directory and the manjaro efi automatically? I really don’t know how grub-install works, it’d be awesome if it autodetects these things

it will

thanks!

It’s not really a script but a tutorial with the commands in black and the explanation in grey. Step-by-step it’s:

  • boot manjaro usb drive
  • open terminal and type
manjaro-chroot -a
  • pick the manjaro partition on the internal drive
  • login
  • at the prompt type
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
  • install success? type
grub-mkconfig -o /boot/grub/grub.cfg
  • all done with chrooting into your manjaro? type
exit
  • back in your usb drive’s manjaro type
    reboot

The real solution is to give manjaro its own grub partition and not use the windows one.