Booting multiple OSs from multiple EFI paritions and Restoring Windows and Manjaro Boot after losing EFI Partition



Hmm, but like I said, I cannot even reach grub, as soon as I boot the USB, I get ‘unkown filesystem’ and a ‘grub_rescue’ prompt.

@bogdancovaciu I’ve heard of that and it could be the case, but I don’t believe that it would have been converted yet.


Disk Utility wrote on that HDD information, and it does it at the begging of the drive whatever is GPT or MBR …


As soon as you boot the usb or after you get to the usb boot menu and after going to the grub prompt, then only when you tried to search.file… ?
The usb is the install media and not affected by Apple. Please be clear.


It is as soon as I boot the USB, I cannot reach any menu.


It is as soon as I boot the USB, I cannot reach any menu.

That is … {no words to say}

Anyway, can’t you boot any liveusb and use whatever, gparted or file manager or whatever to check your internal drive?

Are you saying your computer cannot boot anything, even an external Apple-untouched usb?


That’s what I was hoping to do. I’m not sure why I can’t boot the live usb.


Check the bios setup (F2 or whatever)


Download Hirens BootCD and try with it to recover at least the data.
Probably when you booted the Mojave installer you also had a CMOS reset, and most of the BIOS settings you did previously are gone …


@gohlip no luck there, I’ll try to post a video later

@bogdancovaciu okay thanks, I’ll give that a try in a bit


Ok, update: I was able to boot up the live USB. I calculated and confirmed the checksum and recreated the USB, now it works.

Even better news, all of my partitions seem to be intact and I can mount them and see the files, etc… It looks like the drive wasn’t put in an APFS container, but that the EFI partition was destroyed as I had originally suspected.

Should I restore the image of the EFI partition that I had created with dd (I created the image in Manjaro, not from a Live CD, not sure if that’s okay)? Or should I boot a windows image and create the EFI parition in windows and then let Manjaro add itself after that?


See post 20. Do it. But first…
Create back sda1 in format fat32.
Change uuid in fstab for it /boot/efi
Then do post 20.

Are they not on separate partitions?
The $esp’s (EFI)?
Provide parted -l when solution done.


Here is the result

The EFI partition is gone, so it couldn’t install grub there I think.

What’s not on separate partitions?


Made edit in previous post. See it.
Apple destroyed your $esp on a sepaerate partition? Bad apple.

Ps: morning not my good time.


When doing post 20, after recreating $esp (sda1) and fixing fstab, do the more compliated setup, not the simple first start.
Need probe -u… command, and manually put in the kernels, etc…

Good luck.


Ah, I see. That makes more sense to me.

That’s correct.

You mean I should mount the Manjaro I have installed and change it in that fstab, right?

Also, should I assign the boot and esp flags to the recreated partition?


Typing from phone, so watch out for errors.
Your uuid for /boot/efi will change after you remake it(sda1) so you neef to correct it.
Then boot it up using my link in post 20 but use the mre compkcated setup as the simple start will use wrong uuid from grub.cfg.

Use the section where you need to use probe - u to get the right corrected uuid. You also need to use msnually the kernals as well.

Hope you understand.
It is not covenient fir me to copy from the link to help mire clearly.

Goid luck.


Ni need ti flag but it is good to do so


Ok, I followed the steps.

I had to manually create /boot/efi/EFI/boot though because it didn’t exist. Then I got a warning that one of the boot entries already has the same name. Should/can I remove boot0001? I assume it was the old boot entry or something?

[robo731@Lenovo-Y700-Manjaro ~]$ sudo grub-editenv /boot/grub/grubenv create
[robo731@Lenovo-Y700-Manjaro ~]$ sudo grub-editenv - set boot_success=0
[robo731@Lenovo-Y700-Manjaro ~]$ sudo grub-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
[robo731@Lenovo-Y700-Manjaro ~]$ sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/Vimix/theme.txt
Found linux image: /boot/vmlinuz-4.14-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img
Found initrd fallback image: /boot/initramfs-4.14-x86_64-fallback.img
Found Arch Linux on /dev/sda6
Found memtest86+ image: /boot/memtest86+/memtest.bin
[robo731@Lenovo-Y700-Manjaro ~]$ man efibootmgr
[robo731@Lenovo-Y700-Manjaro ~]$ sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
cp: cannot create regular file '/boot/efi/EFI/boot/bootx64.efi': No such file or directory
[robo731@Lenovo-Y700-Manjaro ~]$ ls /boot/efi/EFI/
[robo731@Lenovo-Y700-Manjaro ~]$ findmnt /boot/efi 
/boot/efi /dev/sda9 vfat   rw,noatime,fmask=0022,dmask=0022,codepage=437,iochars
[robo731@Lenovo-Y700-Manjaro ~]$ sudo mkdir /boot/efi/EFI/boot
[robo731@Lenovo-Y700-Manjaro ~]$ sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
[robo731@Lenovo-Y700-Manjaro ~]$ sudo efibootmgr -c -d /dev/sda -p 9 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"
efibootmgr: ** Warning ** : Boot0001 has same label manjaro
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0004,0001,2001,2003,2002
Boot0000* EFI USB Device (SanDisk Extreme)
Boot0001* manjaro
Boot0002* EFI Network 0 for IPv4 (50-7B-9D-52-8C-A7) 
Boot0003* EFI Network 0 for IPv6 (50-7B-9D-52-8C-A7) 
Boot2001* EFI USB Device
Boot2003* EFI Network
Boot0004* manjaro
[robo731@Lenovo-Y700-Manjaro ~]$ 

I was able to successfully boot into Manjaro though, so thank you!

I only see Manjaro in the grub menu though and I also have an Arch install. I assume I can follow those same steps for Arch, right?

To get Windows bootable again, should I create a bootable windows USB to restore the windows boot manager? I have a feeling doing so might interfere with Manjaro.


Yes, you can safely remove. Leaving it out there causes no harm though.

sudo efibootmgr -b 0001 -B

Yes, you have to restore windows boot.
And after it removed manjaro boot, you can use the same link but you can just use the [Simple First Start] this time to restore Manjaro bootloader.

But it is detected. But I think it is the $esp that is destroyed too by Apple.

Do this after windows and restore manjaro and then do this. Restoring windows will wipe out everything and so we do this last.
Let’s have a look at it. Like we did for Manjaro, correct the fstab (/boot/efi) from Manjaro OS first.

Boot Arch manually this way. From Manjaro grub prompt.

grub> set root=(hdx,y)
grub> linux /boot/vmlinuz-linux root=/dev/sdxy rw
grub> initrd /boot/initramfs-linux.img
grub> boot

where (hdx,y) and /dev/sdxy is Arch partition.
After booting it up, do grub-install and update-grub.
It will be the first in bootorder but you can boot up Manjaro using boot key (F8 ~ F12) and then get manjaro to be the default by

sudo efibootmgr -o 0004,xxxx,yyyy

where xxxx and yyyy are Arch and Windows efibootentry. You can do this too from Arch terminal.

Good luck and you’re welcome.

[EDIT] - changed above Arch manual entry as kernel and initrd is in /boot directory in /root.
Original is in /boot partition. Sorry.


Ok, thank you. I will give those steps a try.

It looks like Microsoft requires the EFI parition GUID to be c12a7328-f81f-11d2-ba4b-00a0c93ec93b. I believe GUID is Microsoft speak for UUID and that I will need to change the EFI partition’s UUID to that. Is there anyway I can be proactive about this in Manjaro, like changing the UUID value in fstab before I go and change the it using the Windows rescue media?

Or will I need to follow the same steps as last time with probe, etc…?