0

I've got a laptop with two EFI partitions, one for Windows, one for PopOS (I know now this isn't a stable configuration). It was working great for a while - I was able to switch between the two (in the BIOS if I remember correctly).

However, after not using Windows for a while, and after some BIOS updates, I upgraded PopOS. I don't know what happened, but after the upgrade the laptop booted into Windows. I then went to the BIOS, and noticed that I'm only able to select the boot drive, but not the EFI partition.

So, I'm now left with two EFI partitions (on one drive), and I can only boot into one of them.

What can I do to remedy this? Ideally I'd like to continue to be able to boot into both, but I'd be happy if I could just enable the PopOS partition, and remove Windows.

1 Answer 1

2

Having two EFI partitions isn't a problem in itself (though it's certainly not the intended setup, and it may confuse Windows during upgrades, but it's technically legal).

But previously you weren't selecting from EFI partitions – you were selecting from boot entries defined in the firmware's NVRAM, pointing to specific files in some or other partition. The mechanism works the same way regardless of whether the files are on the same partition or separate.

Linux has efibootmgr for editing EFI boot entries; re-running grub-install or bootctl install (whichever PopOS uses) will create the correct entry automatically.

If all you have is Windows, use bcdedit to create an EFI boot entry (not to be confused with Windows boot manager entries – the same tool does both). Assuming the Pop!OS partition is currently assigned Z: you should be able to do:

bcdedit /create /d "Pop!OS" /application firmware
[note down the GUID of the new entry]
bcdedit /set [THE_GUID] device partition=Z:
bcdedit /set [THE_GUID] path \EFI\whatever\grubx64.efi

(bcdedit /enum firmware should show both the Windows and Linux entries.)

Merging the two EFI partitions should be as simple as removing the PopOS bootloader from the old partition and installing it anew to the Windows one. I think you could do this by just moving the files over and creating a correct EFI boot entry via bcdedit, but I'd probably recommend doing this from within Linux – mount the Windows EFI partition and let grub-install place everything (instead of moving files by hand).

2
  • Thank you so much for the detailed answer. I understand the situation a lot better now.
    – UpTheCreek
    Commented Oct 31, 2022 at 11:44
  • @user1686 Can you please comment on bcdedit /create /d "Pop!OS" /application firmware command. It returns error The application type switch specified is not valid. I am interested to create a new UEFI Boot entry using bcdedit and have a separate question here superuser.com/questions/1750592/…
    – rajeev
    Commented Nov 29, 2022 at 7:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .