UEFI BOOT FOR DRAGONFLY (WARNING, THIS WILL WIPE THE DISK!) (1) Create the GPT partition table gpt create -f ${DISK} (2) Create the EFI system partition, format a msdos (FAT32) filesystem on it, mount, and copy over the uefi low level boot. I suggest at least 256MB (524288 sectors) to future-proof the layout. 1GB (2097152 sectors) would probably be overkill. gpt add -i 0 -s 524288 -t "EFI System" ${DISK} newfs_msdos ${DISK}s0 mount_msdos ${DISK}s0 /mnt mkdir -p /mnt/efi/boot cp /boot/boot1.efi /mnt/efi/boot/bootx64.efi sync umount /mnt (3) You have two choices, you can either create the DragonFly /boot partition under GPT and then the root partition under GPT, or you can create a GPT partition for a DragonFly disklabel and put boot, swap, root in the disklabel as you would for a non-UEFI system. We will do the disklabel method in this example. It requires a master branch kernel from Nov-2-2016 or later. Calculate how big a partition you can create using the rest of the disk, rounded off to a multiple of 2048 sectors: gpt show ${DISK} expr / 2048 expr '*' 2048 gpt add -i 1 -s -t "DragonFly Label64" ${DISK} disklabel -r -w ${DISK}s1 auto (4) Edit the label as you would a non-UEFI system, creating a 1g UFS 'a' partition for /boot, however much swap you want for the 'b' partition, and (typically) the remainder of the space as a HAMMER 'd' parittion. disklabel -e ${DISK}s1 (example): # size offset fstype a: 1g 0 4.2BSD b: 4g * swap d: * * hammer (5) Create and populate the filesystems. WARNING! Due to bug fixes, you must be running a recent master (repo after January 1st 2017) to ensure that you are running a system that has fixed bugs related to installing to UFS on a NVMe drive, as well as other bugs. newfs ${DISK}s1a newfs_hammer -L ROOT ${DISK}s1d mount ${DISK}s1d /mnt mkdir -p /mnt/boot mount ${DISK}s1a /mnt/boot (install the root and boot system to /mnt, SEE INSTRUCTIONS BELOW) sync vi /mnt/boot/loader.conf <--- edit to add appropriate vfs.root.mountfrom="..." line vi /mnt/etc/fstab <--- edit to setup the appropriate fstab lines. vi /mnt/etc/rc.conf <--- edit as appropriate umount /mnt/boot umount /mnt (6) Reboot into the drive with UEFI to see if it all works. HOW TO INSTALL BASE (1) To install the base DragonFly system, first be sure you have built the world and kernel on some other machine that you have sources on. cd /usr/src make -j 4 buildworld make -j 4 buildkernel (2) Mount the boot AND the root partition of the new drive, the install the base system. Be careful to not make type-o's, make distribution will blow up your running system if you do not specify DESTDIR properly. mount ${DISK}s1d /mnt (example) mkdir -p /mnt/boot mount ${DISK}s1a /mnt/boot (example) cd /usr/src make installworld DESTDIR=/mnt make installkernel DESTDIR=/mnt cd /usr/src/etc make distribution DESTDIR=/mnt (3) Make appropriate edits as shown in the UEFI instructions vi /mnt/etc/fstab vi /mnt/etc/rc.conf vi /mnt/boot/loader.conf