OK, I did 3 different installs onto another USB flash drive.
- UEFI mode, after wiping 1MB at the beginning and the end of the drive (to erase any secondary GPT)
Told sysinst
to use the standard partition sizes. In the screen which it presented, I reduced the size of the msdos
(UEFI ESP) and swap
partitions (4MB and 50MB resp.--the flash drive is only 500MB). Chose a minimal
install, and everything went fine. Could boot directly from the USB flash drive.
- UEFI mode. told
sysinst
to use the existing GPT partitions.
Made sure to do a newfs (as indicated by the N
flag) for both the msdos
and /
partitions.
This too worked just fine.
- CSM (BIOS) mode (verified using
machdep.bootmethod
) after wiping drive.
sysinst
naturally wanted to create an MBR
here. I told it I wanted GPT. This time it only created 2 partitions instead of 3: /
and swap
. Didn't let me add an msdos
partition; and I told it to skip installing any rubbish bootblocks
(why? I told you I wanted GPT...)
As expected, with no ESP containing the UEFI bootloader files, and no MBR bootblocks either, the drive didn't boot. But, this is GPT, so it's easy to fix: Deleted swap
, made it smaller, squeezed in a small 4MB UEFI ESP partition, formatted it, copied the /usr/mdec/boot*.efi
files into /efi/boot/.
and hey presto! now it's a bootable drive.
So, my question is: what does
sysctl machdep.bootmethod
print on this system of yours?