installer: Add basic UEFI system setup.
commit7b1aa074fcd99442a1345fb8a695b62d01d9c7fd
authorSascha Wildner <saw@online.de>
Sun, 15 Jan 2017 19:32:06 +0000 (15 20:32 +0100)
committerSascha Wildner <saw@online.de>
Sun, 15 Jan 2017 19:32:06 +0000 (15 20:32 +0100)
treeeda1c65bcfb76532b57d6e9b01597dfc5f1a9a26
parentd195d5099328849c500d4a1b94d6915d3c72c71e
installer: Add basic UEFI system setup.

GPT partition 0 is a 128MB FAT32 EFI system partition. Microsoft
recommends at least 100MB and FAT32 in [1]. Partition 1 is a
"DragonFly Label64" (aka "dragonfly" in gpt(8)) for the rest of
the disk. It is analogous to slice 1 in our MBR setup, and has the
same name, e.g. /dev/da0s1. The rest of the UEFI setup is identical
to an MBR setup. disklabel64, newfs*, and so forth.

We currently only support installing DragonFly to the whole disk
in UEFI mode, and we don't set any NVRAM EFI variables during
installation, so for now we are copying our stage 1 loader to
\EFI\BOOT\BOOTX64.EFI on the EFI system partition.

Also, there isn't any support for Secure Boot.

[1] https://technet.microsoft.com/en-us/library/hh824839.aspx#DiskPartitionRules
share/installer/cmdnames.conf
usr.sbin/installer/dfuibe_installer/flow.c
usr.sbin/installer/dfuibe_installer/flow.h
usr.sbin/installer/dfuibe_installer/fn.h
usr.sbin/installer/dfuibe_installer/fn_disk.c