summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-07-19 14:15:49 +0000
committeremaste <emaste@FreeBSD.org>2017-07-19 14:15:49 +0000
commit48ce3b4e3aea30b479095da20d7f04ed723e8451 (patch)
treeb20d358612c5a50909507d9ca8c39cb46b92b798
parentf6ea0676c0865291e050e2db86ad2034ce95726a (diff)
downloadFreeBSD-src-48ce3b4e3aea30b479095da20d7f04ed723e8451.zip
FreeBSD-src-48ce3b4e3aea30b479095da20d7f04ed723e8451.tar.gz
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
-rw-r--r--usr.sbin/bsdinstall/partedit/partedit_x86.c8
-rwxr-xr-xusr.sbin/bsdinstall/scripts/zfsboot2
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 cc6a571..d783217 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 4bf98c9..b4b9f9f 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 ||
OpenPOWER on IntegriCloud