From c599610d3a4c27267fd68b48e2457077aa14eed6 Mon Sep 17 00:00:00 2001 From: allanjude Date: Thu, 21 Jan 2016 01:15:40 +0000 Subject: MFC: r294191 Never 4k align the MBR bootpool because zfsldr can not deal with a gap Sponsored by: ScaleEngine Inc. --- usr.sbin/bsdinstall/scripts/zfsboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index e230ac6..59c9b2e 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -825,6 +825,7 @@ zfs_create_diskpart() if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then align_small="-a 4k" align_big="-a 1m" + sysctl kern.geom.part.mbr.enforce_chs=0 fi case "$ZFSBOOT_PARTITION_SCHEME" in @@ -940,11 +941,12 @@ zfs_create_diskpart() # # Always prepare a boot pool on MBR + # Do not align this partition, there must not be a gap # ZFSBOOT_BOOT_POOL=1 f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_INDEX_WITH_SIZE" \ - "$align_small" 1 freebsd-zfs ${bootsize}b ${disk}s1 || + "" 1 freebsd-zfs ${bootsize}b ${disk}s1 || return $FAILURE # Pedantically nuke any old labels f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ -- cgit v1.1