Windows nuked my EFI partition

This has become one issue after the next.
As the title implies, windows nuked my EFI partition for Manjaro, as I found out when I booted straight into windows, skipping GRUB. Checking my partitions using a LiveUSB shows that my mountpoints and flags were removed. Tring to reset the flags does nothing. My partition setup was as follows.
EFI for windows
"Microsoft reserved partition"
Windows itself
EFI for Manjaro (FAT32)
Manjaro swap
Manjaro /
Manjaro /home

How can I get Manjaro to regenerate the EFI partition?

Don't know myself. If worst comes to worst, reinstall.

I would prefer not. I don't have a list of all my installed packages, and would rather not hunt them all down. Plus I got optimus-manager working after a small strugle with it.

Behold, the ultimate Manjaro boot repair guide.


Replace all instances of dev/sda with dev/nvme0? (It's on an NVME drive.)

Assuming that's the only drive, yup. If you have multiple drives be sure to check the designations first.

Will do. Is there an easy way of checking device designations? Also, can I prevent this from happening in the future?

Once you're back in Manjaro you can run
sudo parted -l
to list all your partitions.

As for preventing this from happening again, the only thing you can really do is keep a separate EFI partition for Manjaro and not let Windows anywhere near it. Fixing boot after a Windows update only takes a couple of minutes once you know what you're doing though.

Perhaps posting the output of
sudo parted -l
would give a better overview of your disk set-up

@10yearslate beat me to it!

1 Like

Please post the output of the commands asked for above (x2 :innocent:) from your live usb.

Therein lies the problem. Windows has access to the drive as it is FAT32. Is there a way to block that?
And I will post the command output momentarily.

Yes, but what did Windows did to nuke your Manjaro EFI? Or how? I've got several multi-boot systems with Windows and other GNU/Linux operative systems. All installed in UEFI mode with their own ESP. I have never experienced nuked ESP:s for my GNU/Linux OS:s, not even after Windows' feature upgrades every sixth months or so.

Well, if you did that you'd just be struggling with Windows not booting instead of Manjaro. And fixing a broken Windows bootloader is way more of a ballache than reinstalling grub.

If you create a second EFI partition for Manjaro to use, install grub on it, and amend your fstab that would probably stop this from happening again.

I haven't tried doing that post install myself so I'd suggest doing some digging to make sure their aren't more steps to it that I'm missing.

I think that's the issue, they're currently sharing the ESP between Windows and Manjaro.

1 Like

I took it that OP has installed Manjaro's Bootloader in it's own ESP. But perhaps not.

Commad Output
Model: ATA ST1000LX015-1U71 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  274MB   273MB   fat32        EFI system partition          boot, esp
 2      274MB   290MB   16.8MB               Microsoft reserved partition  msftres
 3      290MB   528GB   528GB   ntfs         Basic data partition          msftdata
 5      528GB   999GB   471GB   ext4
 4      999GB   1000GB  839MB   ntfs         Basic data partition          hidden, diag

Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      2960MB  2964MB  4194kB  primary               esp

Model: Micron_2200V_MTFDHBA512TCK (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  274MB  273MB   fat32           EFI system partition          boot, esp
 2      274MB   290MB  16.8MB                  Microsoft reserved partition  msftres
 3      290MB   354GB  354GB   ntfs            Basic data partition          msftdata
 5      354GB   355GB  538MB   fat32                                         boot, esp
 6      355GB   388GB  33.6GB  linux-swap(v1)                                swap
 7      388GB   455GB  67.1GB  ext4
 8      455GB   511GB  56.1GB  ext4
 4      511GB   512GB  682MB   ntfs            Basic data partition          hidden, diag

I followed the instructions under [HowTo] Dual-boot Manjaro - Windows 10 - Step by Step , so however it decides to install GRUB. Continue with the instructions as normal?

Interesting, two EFI partitions.

And ext4 partitions on both disks.

What is /dev/sda used for?

Dev/sda is just a mass storage disk. It doesn't have any OSes on it, and the efi partitions on it can be removed. I just... have never gotten around to it. Both OSes are on the NVMe drive

Fair enough. I'd shrink down that last ntfs partition on the nvme drive by a few hundred mb and turn it into a second ESP to use for Manjaro. How to do that step by step I can't tell you because I haven't done it before.

(or don't and just fix your boot every 6 months)

Select the unpartitioned space → Create
a. Size → input 512
b. Filesystem → select FAT32
c. Mountpoint → select /boot/efi
d. Flags → check boot and espOK

The above is point 6 from the instructions you have linked to. Did you perform the step c for the Manjaro's bootloader to get installed to its own ESP?

Yes, I did.

Forum kindly sponsored by