From bef65b9618b18488eb074ad5a92d3b578c229ea0 Mon Sep 17 00:00:00 2001 From: David Marec Date: Sat, 3 Nov 2018 16:38:17 +0100 Subject: [PATCH] back to efi --- zfsinstall.sh | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/zfsinstall.sh b/zfsinstall.sh index 6d86850..71a781d 100644 --- a/zfsinstall.sh +++ b/zfsinstall.sh @@ -33,10 +33,12 @@ echo partitioning ${DESTDISK} echo ============= gpart create -s gpt ${DESTDISK} -gpart add -a 4k -t freebsd-boot -s 512k -l gptboot0 ${DESTDISK} -gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${DESTDISK} -gpart add -a 1m -s 32G -t freebsd-swap -l swap0 ${DESTDISK} -gpart add -a 1m -t freebsd-zfs -l zfs0 ${DESTDISK} +gpart add -a 4k -t efi -s 200M -l efiboot0 ${DESTDISK} +gpart bootcode -p /boot/boot1.efifat -i 1 ${DESTDISK} +gpart add -a 4k -t freebsd-boot -s 512k -l gptboot0 ${DESTDISK} +gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ${DESTDISK} +gpart add -a 1m -s 32G -t freebsd-swap -l swap0 ${DESTDISK} +gpart add -a 1m -t freebsd-zfs -l zfs0 ${DESTDISK} gpart set -a active ${DESTDISK} gpart show ${DESTDISK} @@ -46,7 +48,7 @@ sysctl vfs.zfs.min_auto_ashift=12 echo set up zfs pool: ${ZPOOL} alt mount: ${DESTDIR} echo ================= -zpool create -m none -f -R ${DESTDIR} ${ZPOOL} ${DESTDISK}p3 ada1 +zpool create -m none -f -R ${DESTDIR} ${ZPOOL} ${DESTDISK}p4 ada1 if [ "${?}" -ne 0 ]; then echo "unable to create zpool" exit 1 @@ -88,7 +90,7 @@ zfs list -r ${ZPOOL} cd ${DESTDIR}/tmp if [ "${?}" -ne 0 ]; then - echo zfs mountpoints arent ready + echo zfs mountpoints are not ready exit 1 fi @@ -97,7 +99,7 @@ echo ======================================= for I in base.txz kernel.txz lib32.txz; do - fetch http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-BETA2/${I} + fetch http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-BETA3/${I} tar --unlink -pJxf ${I} -C ${DESTDIR} done @@ -118,16 +120,6 @@ cat << EOF >> ${DESTDIR}/boot/loader.conf.local vfs.root.mountfrom="zfs:${ZPOOL}/ROOT/master" EOF -cat << EOF >> ${DESTDIR}/etc/rc.conf -sshd_enable="YES" -sendmail_enable="NONE" -# kld_list="vmm cuse4bsd cpuctl filemon" -ntpd_enable="YES" -# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable -dumpdev="AUTO" -zfs_enable="YES" -EOF - COPYCAT="/etc" cd ${SCRIPTBASE}${COPYCAT} || exit 1 echo installing files into ${COPYCAT} -- 2.47.0