Tinker
2018-02-15 13:08:52 UTC
Hi misc@,
This enquiry follows after ~15 hours of tinkering with making a system
UEFI-boot.
While EFI is almost totally undocumented in OpenBSD's manual today, one
of the few things that the documentation says is that
"fdisk -igy -b 960 sdN" will format a block device to GPT
partitionioning scheme, and put an EFI boot partition on the device.
I tested it, it does what it says, and the EFI FAT32 partition indeed
contains /EFI/BOOT/BOOTX64.EFI .
The problem is it doesn't boot. I tried on three different systems.
Next, I tried "fdisk -iy -b 960 sdN", and the USB stick won't boot too.
Last, I tried flashing a disk with OpenBSD's "install62.fs" image,
remove its default FFS BSD partition, and then add my own stuff using
disklabel, and that works!
Why does fdisk *NOT* create an UEFI-bootable USB disk, while
"install62.fs" can be used as a workaround?
I have gathered some insight:
* The install62.fs image contains no primary GPT partition table, it
does contain a secondary GPT partitioning table, and it contains an
MBR. That GPT and MBR have the same content.
* "fdisk -igy -b 960" creates a primary GPT partition table, no
secondary GPT, and a "protective" MBR.
* "fdisk -iy -b 960" creates an MBR and no primary or secondary GPT.
None of this explains why the USB stick won't boot however as in all
cases there's an EFI partition, containing the proper
EFI/BOOT/BOOTX64.EFI , and also a separate OpenBSD partition.
(A curious observation is that BOOTX64.EFI between install62.fs and
"fdisk -igy -b 960" are different, however that should still not
explain the difference.)
What am I missing?
Can you even make an UEFI-bootable USB memory stick from scratch using
OpenBSD tools today!?
Thanks!
Tinker
This enquiry follows after ~15 hours of tinkering with making a system
UEFI-boot.
While EFI is almost totally undocumented in OpenBSD's manual today, one
of the few things that the documentation says is that
"fdisk -igy -b 960 sdN" will format a block device to GPT
partitionioning scheme, and put an EFI boot partition on the device.
I tested it, it does what it says, and the EFI FAT32 partition indeed
contains /EFI/BOOT/BOOTX64.EFI .
The problem is it doesn't boot. I tried on three different systems.
Next, I tried "fdisk -iy -b 960 sdN", and the USB stick won't boot too.
Last, I tried flashing a disk with OpenBSD's "install62.fs" image,
remove its default FFS BSD partition, and then add my own stuff using
disklabel, and that works!
Why does fdisk *NOT* create an UEFI-bootable USB disk, while
"install62.fs" can be used as a workaround?
I have gathered some insight:
* The install62.fs image contains no primary GPT partition table, it
does contain a secondary GPT partitioning table, and it contains an
MBR. That GPT and MBR have the same content.
* "fdisk -igy -b 960" creates a primary GPT partition table, no
secondary GPT, and a "protective" MBR.
* "fdisk -iy -b 960" creates an MBR and no primary or secondary GPT.
None of this explains why the USB stick won't boot however as in all
cases there's an EFI partition, containing the proper
EFI/BOOT/BOOTX64.EFI , and also a separate OpenBSD partition.
(A curious observation is that BOOTX64.EFI between install62.fs and
"fdisk -igy -b 960" are different, however that should still not
explain the difference.)
What am I missing?
Can you even make an UEFI-bootable USB memory stick from scratch using
OpenBSD tools today!?
Thanks!
Tinker