From e5d8ac1f0476ed4028688ad7d2d549c07ba63992 Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 19 Jul 2017 14:15:49 +0000 Subject: [PATCH] MFC r302145: bsdinstall: increase EFI partition size to 200MB A larger EFI file system size will facilitate multi-boot configurations and the installation other EFI applications like firmware update tools. 200MB matches OS X. Note that this changes only the partition size, not the file system that bsdinstall places there. We need to do both, but as the partition size is difficult to adjust later make this change for now so that at least systems installed with FreeBSD 11.0 have a partition layout with room to grow. Also merge part of r320007: - use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86 - increase ZFS EFI partition to 200M PR: 201898 Relnotes: Yes Sponsored by: The FreeBSD Foundation git-svn-id: svn://svn.freebsd.org/base/stable/10@321202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/bsdinstall/partedit/partedit_x86.c | 8 ++++++-- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/partedit_x86.c b/usr.sbin/bsdinstall/partedit/partedit_x86.c index cc6a5713f..d783217bc 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_x86.c +++ b/usr.sbin/bsdinstall/partedit/partedit_x86.c @@ -32,6 +32,10 @@ #include "partedit.h" +/* EFI partition size in bytes */ +#define EFI_BOOTPART_SIZE (200 * 1024 * 1024) +#define EFI_BOOTPART_PATH "/boot/boot1.efifat" + static const char * x86_bootmethod(void) { @@ -96,7 +100,7 @@ bootpart_size(const char *scheme) if (strcmp(x86_bootmethod(), "BIOS") == 0) return (512*1024); else - return (800*1024); + return (EFI_BOOTPART_SIZE); return (0); } @@ -134,7 +138,7 @@ partcode_path(const char *part_type, const char *fs_type) if (strcmp(part_type, "GPT") == 0) { if (strcmp(x86_bootmethod(), "UEFI") == 0) - return ("/boot/boot1.efifat"); + return (EFI_BOOTPART_PATH); else if (strcmp(fs_type, "zfs") == 0) return ("/boot/gptzfsboot"); else diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 4bf98c9ff..b4b9f9fd6 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -816,7 +816,7 @@ zfs_create_diskpart() if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" ]; then f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ - "$align_small" efiboot$index efi 800k $disk || + "$align_small" efiboot$index efi 200M $disk || return $FAILURE f_eval_catch $funcname gpart "$GPART_BOOTCODE_PARTONLY" \ /boot/boot1.efifat 1 $disk || -- 2.42.0