aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vmimage.subr
diff options
context:
space:
mode:
Diffstat (limited to 'release/tools/vmimage.subr')
-rw-r--r--release/tools/vmimage.subr11
1 files changed, 10 insertions, 1 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 7bad725c9870..7bd971013656 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -52,7 +52,16 @@ write_partition_layout() {
# Create an ESP
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi
- BOOTPARTS="${BOOTPARTS} -p efi:=${espfilename}"
+ BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}"
+
+ # Add this to fstab, requires temporarily remounting the fs
+ mddev=$(mdconfig -f ${VMBASE})
+ mount /dev/${mddev} ${DESTDIR}
+ mkdir -p ${DESTDIR}/boot/efi
+ echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \
+ >> ${DESTDIR}/etc/fstab
+ umount ${DESTDIR}
+ mdconfig -d -u ${mddev}
fi
mkimg -s ${SCHEME} -f ${VMFORMAT} \