Fix scripted installs on EFI systems using ZFS root with zfsboot.
Unlike attended installations, scripted installs did not mount non-ZFS
partitions when ZFS root (via zfsboot) was selected. Since this included
the ESP, the EFI loader was not installed. Copy logic from the
attended-install path to make this work.
PR: 255824, 255081
MFC after: 1 week
Obtained from: Mark Huizer
(cherry picked from commit 34766aa8cb514472c571f8b0e90e833833acef51)