EFI conflict with NVME+Mint & SataSSD+Windows10

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
wurf
Level 1
Level 1
Posts: 4
Joined: Sun Aug 09, 2020 4:59 pm

EFI conflict with NVME+Mint & SataSSD+Windows10

Post by wurf »

I found a post regarding a similar but inverted situation here: viewtopic.php?p=1360901#p1360901, but while informational the bug shouldn't apply afaik because Linux was installed first and on the first listed drive. Does windows install have the same EFI bug?

What I want:
  • Linux & Windows installed to separate drives
  • boot selection via UEFI menu
  • AND independently (re)install OS on each drive (without pita of physically of removing NVME (maybe image the EFI partition of NVME to later restore the mutant WinUx/LinDows EFI?))
TIA for any help :D

My problem:
When I reinstalled Linux on the NVME, it borked Windows at some not-yet-understood-by-me level. (seems like it's just the windows boot EFI going to the wrong disk on windows install - but how to prevent that?)
The Mint installer warned me of this in the Screenshots below. I had hoped it was just confused about which EFI was which. But it indeed affected(removed) windows ability to boot.
Based on mr_raider's comments in linked post, it seems there's potential to pollute boot sectors when there's a combo of NVME+Linux+Windows10 - is this what's happening to here? and if so how to work around this?

Secondary problem:
I'm a SW Dev(9 years now), but self taught, mostly Sql+DotNet, newer to Linux, and Boot Managers have always been mysterious to me. But I have accomplished same thing with 2 Sata SSD's on a HP workstation, so I know I'm not completely crazy here :cry:

How I got here:
  • Built PC from new parts
  • installed Mint on NVME. (Before any other drives were installed. And before Graphics card.)
  • Decided it was going to be a workstation and installed: Graphics Card, 1TB SSD for second OS, 1TB SSD for Data, 1 4TB HD for local backup
  • Installed Win10 on first SSD (/dev/sdb in images below)
  • Drive sequence in Linux: /dev/nvme0n1=LinuxOS, /dev/sda=BackupDrive, /dev/sdb=Win10Pro, /dev/dbc=DataDrive
  • At this point, both OS were bootable via UEFI interrupt & F8 menu. And I put them to light use so I know they were both 100% viable installs
  • Decided to reinstall Mint on NVME. Get warning "This computer currently has Windows Boot Manager on it". Duh, I know that, but it safely on a different disk, so I proceed anyways. After reboot only one bootable drive was available(NVME/Linux). Windows boot disappeared from MB menu. Linux booted just fine from nvme0n1. And the Windows partitions on sdb appeared intact. ()
  • If it matters: MB is PW protected for admin functions, but not the default bootup sequence which is able to be separately protected but in this case is not. (Is this MB code called the BIOS or the UEFI or what? This is where I start get sooo confused because the disks also have EFI?. N E Ways)
What I've tried so far (not much):
After above steps & at that ending state: 4 google adventures on 3 different days. Re-installed Win10Pro, Updated Win, began repeating same steps of re-installing Linux. Got same warnings & drive EFI labels as before and stopped and came here for help. (Gut says I have an edge case, Windows takes simply forever to update, and this is very different from my past experiences doing similar installs.)

Warning I received:
1 Mint pick install type.png

Changed to the "Something Else" Option to check that it was targeting the correct drive (/dev/nvme0n1) for install. (which it was)
Something else install; NVME wPrior Mint install showing WinBootMgr
Something else install; NVME wPrior Mint install showing WinBootMgr

Showing /dev/sdb Windows10 partitions via installer:
Something else install; dev-sdb with windows
Something else install; dev-sdb with windows

Machine Purpose: Dev Workstation
MB: Asus TUF B450M-Plus Gaming
AMD 2600, 16GM Ram, Video Card (right on top of NVME of course!)
Drives:
/dev/nvme0n1=256gb WD black=LinuxOS
/dev/sda=4tb spinner=BackupDrive
/dev/sdb=1tb 960EVO=Win10Pro
/dev/dbc=1tb 960EVO=DataDrive
User avatar
arvy
Level 6
Level 6
Posts: 1230
Joined: Sat Mar 26, 2016 11:22 am

Re: EFI conflict with NVME+Mint & SataSSD+Windows10

Post by arvy »

wurf wrote:
Sun Aug 09, 2020 6:28 pm
I found a post regarding a similar but inverted situation here: viewtopic.php?p=1360901#p1360901, but while informational the bug shouldn't apply afaik because Linux was installed first and on the first listed drive. Does windows install have the same EFI bug?
Short answer, yes. But calling it a "bug" is a bit of a misnomer. The installation of multiple OS boot loaders, each into its own directory under a single EFI System Partition (ESP) on the first detected drive, is the normal set-up for UEFI-GPT mode booting. The Grub EFI boot loader can be persuaded to install into a properly FAT-formatted and boot-flagged ESP on another drive as noted in that linked response and will work that way. The Microsoft Windows EFI boot loader, on the other hand, will not support any secondary ESP installation at all. IOW, you can install the OS itself wherever you want it, but the Windows /EFI/Microsoft/Boot/bootmgrfw.efi boot loader must be installed and available where it thinks it should be, or it just wont work.

__
P.S.: That also applies, but with somewhat different constraints, to the Windows boot manager and its boot configuration data (BCD) store regardless of boot mode. Much confusion arises everywhere about which is which and how to fix either one.
System: Asus ROG Maximus XI Code mobo, Intel i9-9900K CPU, Nvidia GTX1080 GPU, 32 GB DDR4-3600 RAM, Sumsung Pro 2x512GB NVMe & 3x1TB SSD, Multiboot
wurf
Level 1
Level 1
Posts: 4
Joined: Sun Aug 09, 2020 4:59 pm

Re: EFI conflict with NVME+Mint & SataSSD+Windows10

Post by wurf »

Arvy, Thanks for the thoughtful reply

Sounds like you're saying that windows is overwriting it's bootloader on top of the Linux bootloader? In that case I'm shocked and impressed that Linux still boots!

As far as what to do...
Theories on what would happen if such an EFI partition was cloned before reinstalling Linux?
Linux would do it's thing and format the disk, incl EFI. Then one could restore the windows EFI from ISO, and... bodge a Success?

I guess a second question is: after my Linux then Windows install - what exactly is that EFI? Pure Windows? Or some kind of hybrid? Why doesn't it break Linux?

Again thanks for the help!
User avatar
arvy
Level 6
Level 6
Posts: 1230
Joined: Sat Mar 26, 2016 11:22 am

Re: EFI conflict with NVME+Mint & SataSSD+Windows10

Post by arvy »

Generally speaking, for any multi-OS setup, the last one installed wins default control of the system.

It shouldn't, and normally doesn't, actually overwrite any boot loader that was previously installed into its own proper directory (e.g., /EFI/Microsoft/Boot/bootmgrfw.efi or /EFI/ububtu/grubx64.efi) under the common ESP. It may, and usually does, however, overwrite the fallback /EFI/boot/bootx64.efi boot loader with its own and will always at least try to make its own EFI boot loader the default in the system's UEFI (NVRAM) boot order sequencing. Often, just re-adjusting that boot order is all that's needed to deal with the consequences.

As for "cloning" any drive's ESP to another drive, I will admit to having done that myself onto a laptop's external SSD out of pure frustration with some distro installer quirks and it did work in my own situation. Actually, I just copied the contents of the ESP directory that I wanted. However, that is NOT to be regarded as any kind of recommendation. Trying it would be strictly an "own risk" undertaking.

EFI is an abbreviation for "Extended Firmware Interface" and UEFI just adds "Unified" in front of that. Microsoft had a lot to do with development of the UEFI standard, but the final product was an industry-wide "conspiracy" as is its ongoing OEM implementation. If you want more gory details, start here.
System: Asus ROG Maximus XI Code mobo, Intel i9-9900K CPU, Nvidia GTX1080 GPU, 32 GB DDR4-3600 RAM, Sumsung Pro 2x512GB NVMe & 3x1TB SSD, Multiboot
wurf
Level 1
Level 1
Posts: 4
Joined: Sun Aug 09, 2020 4:59 pm

Re: EFI conflict with NVME+Mint & SataSSD+Windows10

Post by wurf »

Haha, no thanks, I deal with enough gory details at work!

I'm not totally 'there' yet, but your elucidations will most likely do it. 8)

Nvram vs efi vs esp really helped
As did discovering that a fallback bootloader is a thing

Still open to more workaround thoughts & suggestions

(FYI: I'm thinking of diff'ing the ESP before and after second OS install. Just at filesystem level, not binaries except to check changes. Really curious now)
User avatar
arvy
Level 6
Level 6
Posts: 1230
Joined: Sat Mar 26, 2016 11:22 am

Re: EFI conflict with NVME+Mint & SataSSD+Windows10

Post by arvy »

Examination of the EFI System Partition (ESP) contents could certainly help in clarifying matters for you. As I said above, other than the fallback /EFI/boot/bootx64.efi boot loader, the contents of any other ESP directories and subdirectories should remain consistent for any given OS boot loader. Note the /EFI/ubuntu/grub.cfg file in particular and the absence from the /EFI/Microsoft directory of any equivalent provision for linking to a boot manager located elsewhere. Microsoft's major UEFI contribution is a pathetically crippled EFI boot loader-manager -- some might say deliberately so. Grub's potential is enormously superior, some silly distro installer quirks notwithstanding.

Also, even if you don't read all the "gory details", I would encourage you to familiarize yourself very thoroughly with your own system UEFI firmware's configuration options, especially its boot mode precedence and boot order settings. If you wish, while booted to a Mint "live" or working session, you could run a efibootmgr -v command and a sudo parted -l command and post their outputs here for more case-specific discussion. If you do that, please use the </> button to enclose the results between [code]<output>[/code] tags for easier readability.
System: Asus ROG Maximus XI Code mobo, Intel i9-9900K CPU, Nvidia GTX1080 GPU, 32 GB DDR4-3600 RAM, Sumsung Pro 2x512GB NVMe & 3x1TB SSD, Multiboot
Post Reply

Return to “Installation & Boot”