On Sun, Apr 30, 2023 at 1:43 AM Klemens Nanni <k...@openbsd.org> wrote: > > Installing to a wiped disk on EFI machines suggests MBR not GPT when chosing > (E)dit because MBR vs. GPT in this manual case is picked based on existing > data on the disk, not whether it has EFI. > > Fix that so users get correct instructions and don't end up with legacy > partitioning in fresh installs on new machines.
While you're working on such things, mind taking a look at my patch for detecting EFI mode without a working efifb [1]? Perhaps I wasn't clear before, but the issue is that an EFI system without an efifb (e.g. a headless VM, or efifb is broken for some reason) is not properly detected as EFI, and it wants to install in MBR mode. A one-line patch will make MDEFI properly key on either of these: efifb0 at mainbus0: ... efifb at mainbus0 not configured AFAICT this is still the best way to detect EFI mode, as even with no framebuffer in the VM config, it will still print the "efifb at mainbus0 not configured" line, but in BIOS mode this is not printed. I couldn't find any applicable sysctls; I did notice that 7.3 added a new efi device which prints efi0 at bios0: UEFI 2.7 but this device is apparently not included in the ramdisk kernel. Thanks, Andrew [1] https://marc.info/?l=openbsd-tech&m=160019579222286&w=2