Index: usr.sbin/bsdinstall/partedit/Makefile
===================================================================
--- usr.sbin/bsdinstall/partedit/Makefile
+++ usr.sbin/bsdinstall/partedit/Makefile
@@ -10,6 +10,8 @@
 PARTEDIT_ARCH= ${MACHINE}
 .if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
 PARTEDIT_ARCH= x86
+.elif ${MACHINE} == "arm64" || ${MACHINE} == "riscv"
+PARTEDIT_ARCH= efi
 .endif
 .if !exists(partedit_${PARTEDIT_ARCH}.c)
 PARTEDIT_ARCH= generic
Index: usr.sbin/bsdinstall/partedit/partedit_efi.c
===================================================================
--- usr.sbin/bsdinstall/partedit/partedit_efi.c
+++ usr.sbin/bsdinstall/partedit/partedit_efi.c
@@ -34,6 +34,11 @@
 
 #include "partedit.h"
 
+/*
+ * partedit implementation for platforms on which the installer only offers
+ * UEFI-based boot. Currently, this includes arm64 and RISC-V.
+ */
+
 /* EFI partition size in bytes */
 #define	EFI_BOOTPART_SIZE	(260 * 1024 * 1024)
 
@@ -94,7 +99,7 @@
 partcode_path(const char *part_type, const char *fs_type)
 {
 
-	/* No boot partition data for ARM64 */
+	/* No boot partition data. */
 	return (NULL);
 }
 
Index: usr.sbin/bsdinstall/scripts/auto
===================================================================
--- usr.sbin/bsdinstall/scripts/auto
+++ usr.sbin/bsdinstall/scripts/auto
@@ -301,7 +301,7 @@
 
 CURARCH=$( uname -m )
 case $CURARCH in
-	amd64|arm64|i386)	# Booting ZFS Supported
+	amd64|arm64|i386|riscv)	# Booting ZFS Supported
 		PMODES="
 			'$msg_auto_zfs' '$msg_auto_zfs_desc' '$msg_auto_zfs_help'
 			$PMODES
Index: usr.sbin/bsdinstall/scripts/bootconfig
===================================================================
--- usr.sbin/bsdinstall/scripts/bootconfig
+++ usr.sbin/bsdinstall/scripts/bootconfig
@@ -51,7 +51,7 @@
 	X86_BOOTMETHOD=$(sysctl -n machdep.bootmethod)
 fi
 
-if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then
+if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "riscv" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then
 	UFSBOOT_ESPS=$(cat $TMPDIR/bsdinstall-esps 2>/dev/null)
 	ZFSBOOT_DISKS=$(cat $TMPDIR/bsdinstall-zfsboot 2>/dev/null)
 	num_esps=0
@@ -127,6 +127,7 @@
 	case $(uname -m) in
 	    arm64)	ARCHBOOTNAME=aa64 ;;
 	    amd64)	ARCHBOOTNAME=x64 ;;
+	    riscv)	ARCHBOOTNAME=riscv64 ;;
     #	    arm)	ARCHBOOTNAME=arm ;; # No other support for arm install
     #	    i386)	ARCHBOOTNAME=ia32 ;; # no support for this in i386 kernels, rare machines
 	    *)		die "Unsupported arch $(uname -m) for UEFI install"
Index: usr.sbin/bsdinstall/scripts/zfsboot
===================================================================
--- usr.sbin/bsdinstall/scripts/zfsboot
+++ usr.sbin/bsdinstall/scripts/zfsboot
@@ -1554,8 +1554,8 @@
 # Determine default boot type
 #
 case $(uname -m) in
-arm64)
-	# We support only UEFI boot for arm64
+arm64|riscv)
+	# We support only UEFI boot for arm64 and riscv.
 	: ${ZFSBOOT_BOOT_TYPE:=UEFI}
 	: ${ZFSBOOT_PARTITION_SCHEME:=GPT}
 	;;