Can you explain exactly how did you “format” the partitions? If you simply hit delete, it’s possible only their partition metadata was erased, in which case testdisk should’ve done the trick. I guess it’s possible that testdisk changed the partition UUIDs too?.. if they existed.
As @TriMoon pointed out, UEFI should be booting from GPT, not MBR. Although some implementations support booting in UEFI mode from MBR partition tables.
First of all, you probably don’t have the space for, but before you do/did any further attempts, you should’ve done a raw image backup of the entire drive. This is to guard you from doing mistakes, to have a safe fallback option in form of a backup.
The Manjaro Live USB has a menu entry at the bottom to detect EFI loaders. Does it work for you?
Assuming the UEFI implementation worked off MBR before, all I can add is this:
- Check that the grub files are really updated when you run the install grub commands, including grub.cfg (see modified times).
- My UEFI ignores the boot order set by “BootOrder” somehow. I suggest you enter the settings and check the “Hard Drive priorities” yourself to ensure “manjaro” is the first choice in priority.
Generally to fix the booting:
- Windows: you need an install or recovery CD. From there you can use bcdboot to restore/register the Windows bootloader. Note that the Windows 7 version of the tool does not support GPT, you need at least Win8 for this. I used this to successfully create a UEFI boot entry after converting my disk from MBR to GPT (I was fully prepared and left extra free space for GPT.)
-
diskpart
to be used for partition manipulation and to mount them
-
- Linux: there’re multiple ways to boot, I guess you got the grub commands right. If you needed to register that grub as a boot entry, all you need is efibootmgr. However note that my system is UEFI+GPT, not MBR.