This patch mounts the ESP (on UFS installations, see notes below) at /boot/efi. It also dramatically simplifies the creation/detection and initialization of the ESP by leveraging the parts of the partition editor that detect pre-existing boot partitions.
NB: The bootconfig parts of this patch are at present *for discussion only*. They should work, but I have only tested the partedit changes so far.
After the patch, the ESP behaves as follows:
- The partition editor will reuse an existing ESP, otherwise will make one and format as FAT32
- The ESP will be mounted at /boot/efi (though see D28814)
- The bootconfig script is now only responsible for setting up the loader on a mounted ESP rather than formatting/mounting/etc. It detects an EFI system by seeing if there is a /boot/efi directory on the installed system.
Before this can be committable, we need to figure out what to do with ZFS-root systems. The installer currently makes one ESP per disk in the root pool. This is fundamentally incompatible with the idea of mounting the ESP at a well-known path.- For redundant ZFS-root systems, Allan Jude suggested the very nice idea on IRC of having the zfsboot script set up a gmirror of ESPs and placing that in /etc/fstabspace is reserved for an ESP on all root-pool disks, which makes sure that they get updated together and allows the new version of bootconfig not to need to know about these thingsbut only one is initialized and mounted.