DragonFly BSD

Installation

This document describes the installation of DragonFly BSD. This process uses a bootable DragonFly CD or USB disk image, usually referred to as a 'live CD' or 'USB disk image'. These are available at one of the current mirrors, which distribute the images by various protocols.

It is recommended to install DragonFly with USB because USB is faster and more flexible.


Installation from CD or USB

Downloading DragonFly BSD

Choose the closest mirror site and go to iso-images/ directory. Then choose installation image:

dfly-x86_64-X.X.X_REL.iso uncompressed image for CD and VM.
dfly-x86_64-X.X.X_REL.iso.bz2 compressed image for CD and VM.
dfly-x86_64-X.X.X_REL.img.bz2 compressed image for USB.

Then download md5.txt and verify image:

% md5 -C md5.txt dfly-x86_64-X.X.X_REL.*
(MD5) dfly-x86_64-X.X.X_REL.img.bz2: OK
(MD5) dfly-x86_64-X.X.X_REL.iso: OK
(MD5) dfly-x86_64-X.X.X_REL.iso.bz2: OK

Creating install media

Decompress downloaded image if it is compressed:

% bzip2 -d dfly-x86_64-X.X.X_REL.iso.bz2

Flash drives

A bootable USB flash drive can be created by attaching the target device and copying over the image with dd(1).

Using DragonFly BSD, assuming device was recognized as sd8:

# dd if=dfly-x86_64-*_REL.img of=/dev/sd8 bs=1m

CD

DragonFly's image is too big to fit on CD-ROM, however, it fits on DVD.

You can create a bootable CD on DragonFly BSD by using cdrecord(1)

# cdrecord -tao dfly-x86_64-*_REL.iso

Performing a simple install

The installer is designed to install DragonFly BSD with a minimum of user intervention. In fact, you can often just hit [Enter] to get a good DragonFly BSD install, moving your hands to the rest of the keyboard only to make choices.

After dmesg(8) is shown, you will see the first installer question:

...
Welcome to DragonFly!

To start the installer, login as 'installer'. To just get a shell prompt, login as 'root'

DragonFly/x86_64 (Amnesiac) (ttyv0)

login: 

Type installer and press [Enter] and follow the instructions.

Manual Installation (all types) (assumes whole disk)

WARNING! These instructions assume that 'da0' is the drive you are installing to and that you booted from somewhere else. 'da0' in these instructions must not contain anything you used to boot the system from. Normally you will have booted from some other media, such as a USB stick, CD, or the network.

WARNING! These instructions assume that you are not sharing the drive with any other operating system and have no data on the drive that you wish to keep. Generally speaking, my recommendation is to not have multi-OS boot setups (its too easy to mistakenly wipe them when messing around with other installations). Instead, invest in a hot-swap drive bay and put each OS on its own SSD.

To do a manual installation you need to initialize the disk. DragonFlyBSD uses a modified fdisk which works on any-sized disk by having the kernel recognize the maximum size fdisk supports and translate that to the whole disk's actual size. You need to install the boot sector and also setup a bootable DragonFlyBSD disklabel.

# fdisk -IB /dev/da0

# disklabel -r -w -B /dev/da0s1 auto

Edit the label and create three partitions: a, b, and d. The 'a' partition is going to be /boot and needs to be a 1GB UFS partition. 'b' is your swap and should be roughly 2x main memory (we recommend at least 4GB or more, particularly if you will be running browsers). 'd' is your root partition.

# disklabel -e da0s1

a: 1G 0 4.2BSD
b: 8G * swap
d: * * HAMMER

One can simply use HAMMER2 instead of HAMMER on the d: line if the HAMMER2 filesystem is going to be used.

Manual Non-Crypto Installation

Format the filesystems and mount them:

# newfs /dev/da0s1a
# newfs_hammer -L ROOT /dev/da0s1d # Use newfs_hammer2 for HAMMER2
# mount /dev/da0s1d /mnt
# mkdir /mnt/boot
# mount /dev/da0s1a /mnt/boot

Once you have them mounted, copy from a working DragonFly installation. This can be from installation media or via NFS if you have setup the network and have a server somewhere. Two cpdup commands are needed since we have two partitions. If the source of your image is broken up into additional partitions, you may have to cpdup each one (cpdup nominally stops at mount boundaries on the source):

# cpdup /boot /mnt/boot
# cpdup / /mnt

# mv /mnt/etc /mnt/etc.live
# mv /mnt/etc.hdd /mnt/etc
# pwd_mkdb -p -d /mnt/etc /mnt/etc/master.passwd
# pw -V /mnt/etc userdel installer

Finally, edit "/mnt/boot/loader.conf", "/mnt/etc/fstab", and "/mnt/etc/rc.conf" to point to your disk. At a minimum you will need this line in your "/mnt/boot/loader.conf" (we recommend configuring by serial number, which you can get from the dmesg output, but if you don't want to then use the drive name which might be something like 'da0s1d'):

vfs.root.mountfrom="hammer:serno/SERIALNUMOFDISK.s1d" # Use vfs.root.mountfrom="hammer2:serno/SERIALNUMOFDISK.s1d" for HAMMER2

Your "/etc/fstab" file should contain something like the below:

serno/SERIALNUMOFDISK.s1a    /boot           ufs     rw              1 1
serno/SERIALNUMOFDISK.s1b    none            swap    sw              0 0
serno/SERIALNUMOFDISK.s1d    /               hammer  rw              1 1
#following line for HAMMER2
#serno/SERIALNUMOFDISK.s1d    /               hammer2  rw              1 1

Finally, unmount the partitions and reboot the machine. Once the machine is in reset, before it hits the BIOS, unplug your installation media:

# umount /mnt/boot
# umount /mnt
# reboot

Manual Crypto Installation

To setup a crypto system follow the generic non-crypto steps above. Make sure that your boot drive has a "/boot/kernel/initrd.img.gz" file in as the system will need to bootstrap through MD0 in order to mount an encrypted root. In this example I am also encrypting swap.

If your drive partitions previously contained unencrypted data and you want to wipe it, you can dd /dev/urandom to the target partitions. It can take many hours to do this so you might decide to skip this optional step:

# dd if=/dev/urandom of=/dev/da0s1b bs=32k
# dd if=/dev/urandom of=/dev/da0s1d bs=32k

Setup an encrypted swap and root partition as shown below (be careful of the password you type as the keyboard will be in qwerty when you decrypt, that can be changed by modifying the initrd later):

# kldload dm
# cryptsetup --key-size 256 --hash sha512 -y luksFormat /dev/da0s1b
# cryptsetup --key-size 256 --hash sha512 -y luksFormat /dev/da0s1d
# cryptsetup luksOpen /dev/da0s1b swap
# cryptsetup luksOpen /dev/da0s1d root # Use rootd instead of root for HAMMER2

Format the filesystems and mount them. Note that the boot partition is not encrypted.

# newfs /dev/da0s1a
# newfs_hammer -L ROOT /dev/mapper/root # newfs_hammer2 /dev/mapper/rootd for HAMMER2
# mount /dev/mapper/root /mnt           # mount_hammer2 /dev/mapper/rootd /mnt for HAMMER2
# mkdir /mnt/boot
# mount /dev/da0s1a /mnt/boot

Once you have them mounted, copy from a working DragonFly installation. This can be from installation media or via NFS if you have setup the network and have a server somewhere. Two cpdup commands are needed since we have two partitions. If the source of your image is broken up into additional partitions, you may have to cpdup each one (cpdup nominally stops at mount boundaries on the source):

# cpdup /boot /mnt/boot
# cpdup / /mnt

# mv /mnt/etc /mnt/etc.live
# mv /mnt/etc.hdd /mnt/etc
# pwd_mkdb -p -d /mnt/etc /mnt/etc/master.passwd
# pw -V /mnt/etc userdel installer

Finally, edit "/mnt/boot/loader.conf", "/mnt/etc/fstab", and "/mnt/etc/rc.conf" to point to your disk. At a minimum you will need this line in your "/mnt/boot/loader.conf" (we recommend configuring by serial number, which you can get from the dmesg output, but if you don't want to then use the drive name which might be something like 'da0s1d').

initrd.img_load="YES"
initrd.img_type="md_image"
vfs.root.mountfrom="ufs:md0s0"
vfs.root.realroot="crypt:hammer:serno/SERIALNUMOFDISK.s1d:root" # vfs.root.realroot="crypt:hammer2:serno/SERIALNUMOFDISK.s1d:rootd" for HAMMER2
dm_load="YES"
dm_target_crypt_load="YES"

You can note that we are using rootd in the case of HAMMER2, that's because it's not possible to pass a HAMMER2 label to the rcmount_crypt script in the initrd, and so the mapping name has to end in d so that mount_hammer2 will automatically use the ROOT label for mounting

Your "/etc/fstab" file should contain something like the below:

serno/SERIALNUMOFDISK.s1a    /boot           ufs     rw              1 1
/dev/mapper/root              /               hammer  rw              1 1
#following line for HAMMER2
#/dev/mapper/rootd              /               hammer2  rw              1 1

You can setup the encrypted swap via the "/etc/rc.local" file with the following lines:

# cryptsetup luksOpen /dev/serno/SERIALNUMOFDISK.s1b swap
#swapon /dev/mapper/swap

Finally, unmount the partitions and reboot the machine. Once the machine is in reset, before it hits the BIOS, unplug your installation media:

# umount /mnt/boot
# umount /mnt
# reboot

Installation to a Disk Slice in a Multiboot Set-up with rEFInd

Currently, the DragonFly BSD Installer only supports a full-disk installation. Obviously, this set-up is not appropriate for multibooting with other operating systems (OSs), because each OS resides on its own hard drive slice. Therefore, for multiboot you have to install DragonFly to a hard drive slice. For this, you have to do a manual installation.

rEFInd is a powerful boot manager for machines with Unified Extensible Firmware Interface (UEFI), which are prevalent today. Prior to starting the DragonFly installation, please download the latest rEFInd version as a binary zip file, unzip it and write it to a USB stick.

After booting DragonFly with the install medium, login as root. To see how your hard drive is recognised, issue:

# camcontrol devlist

to list your IDE/SCSI devices

or, if you have a Solid State Drive (SSD),

# nvmectl info

An IDE/SCSI drive will be recognised as ad0/da0 (see Disk Slices, Partitions and local UNIX file systems) and a modern SSD as nvme0. For simplicity, hereafter an nvme device is assumed. If you have an IDE/SCSI drive, you can simply substitute nvme0 with ad0/da0 in the following instructions.

Partition the hard drive

To be safe, first clean up the starting sectors of the disk drive from remnants of any previous partitioning:

# dd if=/dev/zero of=/dev/nvme0 count=1024 bs=1m

Here, we assume GUID Partition Table (GPT) partitioning (see the gpt manual page).

Destroy any existing GPT partition table:

# gpt destroy nvme0

Create a new partition table:

# gpt create -f nvme0

In between, to view the current partition table, you can issue:

# gpt -v show -l nvme0

Before you start adding the slices, note that slice sizes are specified in number of disk drive sectors. Normally, a sector has 512 bytes. To check that, you can run:

# dmesg | grep blksize

The output will look something like this:

nvme0: Disk nvme0 ns=1 blksize=512 lbacnt=1000215216 cap=476GB serno=S33UNB0J606162-1

in which case it confirms that the sector size is 512 bytes. So, if you need a slice of size S bytes, you have to specify S/512 number of sectors for it.

First, you have to create the EFI system partition (ESP) of 512 MiB. The ESP will be your first slice and hence it will get a slice number of 0. The corresponding number of sectors is (512 * 1024 ** 2) / 512 = 1048576:

# gpt add -i 0 -s 1048576 -t efi nvme0

In the above command, -i specifies slice number 0, -s the slice size in sectors, and -t specifies the slice type.

Give the EFI slice a UTF-8 label:

# gpt label -i 0 -l "EFI System" nvme0

Create the DragonFly slice of, say 200 GiB:

# gpt add -i 1 -s 419430400 -t dfly nvme0

Label the DragonFly slice:

# gpt label -i 1 -l "DragonFly BSD" nvme0

Now you can create your disklabel partitions on the DragonFly slice. Normally, you want a disk layout consisting of an "a" partition for /boot, a "b" partition for swap and a "d" partition for the root file system.

Create a standard virgin disk label for the DragonFly slice:

# disklabel64 -r -w nvme0s1 auto

Create the disklabel partitions on the DragonFly slice:

# disklabel64 -e nvme0s1

The above command opens a text editor, where you can describe the partitions you want to add, with their sizes and file system types. For the above layout, you can add the following three lines:

    a: 1G * 4.2BSD
    b: 16G * swap
    d: * * HAMMER2

to specify a partition "a" of 1 GiB that will carry a UFS file system, a partition "b" of 16 GiB for swap, and a partition "d" encompassing the remaining space on the DragonFly slice for the root file system. The size of the swap space depends on the available RAM.

Now you can proceed adding slices for the rest of the OSs you plan to install. E.g., to add a 200 GiB OpenBSD slice:

# gpt add -i 2 -s  419430400 -t "Unused" nvme0

Specifying -t "OpenBSD" in the above command is not supported. You will have to modify that partition type later when installing OpenBSD.

Label the OpenBSD slice:

# gpt label -i 2 -l "OpenBSD" nvme0

To add a linux slice encompassing the remaining space on the disk drive:

# gpt add -i 3 -t linux nvme0

Label the linux slice:

# gpt label -i 3 -l "Linux"

Install rEFInd to the ESP

Format the ESP slice with FAT file system:

# newfs_msdos nvme0s0

Create a mount point for the ESP:

# mkdir /efimnt

Mount the ESP:

# mount_msdos /dev/nvme0s0 /efimnt

Create the required directory structure of the ESP:

# mkdir -p /efimnt/EFI/BOOT

Create a mount point for the USB stick with the rEFInd executables:

# mkdir /usb

Go to the EFI/BOOT directory of the ESP:

# cd /efimnt/EFI/BOOT

Insert the USB stick with the rEFInd executables. On inserting the stick, the system reports the new device. You can double-check how it is recognised by issuing:

# camcontrol devlist

Assuming the USB stick is recognised as /dev/da9, mount the USB stick with the rEFInd executables:

# mount_msdos /dev/da9s1 /usb

Copy the rEFInd executables to the current directory (assuming you have rEFInd version x.y.z):

# cp -r /usb/refind-bin-x.y.z/refind/* .

Unmount the USB stick with the rEFInd executables and delete its mount point:

# umount /usb
# rmdir /usb

Remove the unnecessary drivers, efi executables and tools. E.g, for an amd64 machine you have to remove the aa64 and ia32 files and directories:

# rm -rf *aa64* *ia32* 

Rename the rEFInd executable:

# mv refind_x64.efi bootx64.efi

Copy the DragonFly BSD boot1.efi under a different name:

# cp /boot/boot1.efi bootx64-dragonflybsd.efi

Rename the rEFInd configuration file:

# mv refind.conf-sample refind.conf

Edit refind.conf:

# vi refind.conf 

Add this section:

 menuentry "DragonFly BSD" {
   loader /EFI/BOOT/bootx64-dragonflybsd.efi
   icon /EFI/BOOT/icons/os_freebsd.png
 }

You may ask why the FreeBSD icon is provided above? Well, currently there is no os_dragonflybsd.png icon distributed with rEFInd. If you wish, you can create your own one and copy it to the ./icons directory; it has to be a 128 x 128 png, or use this theme. Of course, as you install other OSs at a later stage, you have to provide relevant entries for them in the refind.conf file and copy the necessary booting executables to the ESP. Information on this is usually provided by the OS or available as part of the rEFInd documentation -- the file refind.conf itself is very well documented and contains example entries for many OSs. Caveat: when installing the other OSs, make sure their installers do not overwrite the ESP you just created. Therefore, do not let the OS's installer install rEFInd or any other boot loader. Instead, after finishing the installation, just copy the few relevant files to the ESP and make a respective entry in refind.conf. For example, with OpenBSD, after finishing the installation and before rebooting, copy the file /mnt/usr/mdec/BOOTX64.EFI to a USB stick; then boot into DragonFly, copy that file to the ESP under EFI/BOOT, and rename it to bootx64-openbsd.efi; add a respective entry in refind.conf, using again a different icon as an OpenBSD one is currently not available as well; for Linux, you will have to copy the kernel image (vmlinuz-generic-version_number) and the corresponding initrd image (initrd.gz) to a subfolder in EFI/BOOT, and create a respective entry in refind.conf, following the examples in refind.conf. On your next reboot, the rEFInd menu should contain both DragonFly and your other OS(s) as boot options.

Leave the ESP:

# cd

Unmount the ESP:

# umount /efimnt

Delete the ESP's mount point:

# rmdir /efimnt

Now you can proceed formatting the DragonFly disklabel partitions with the filesystems of your choice and installing DragonFly as described above in the section on Manual Non-Crypto Installation. When you reboot, you should see the rEFInd menu prompting you to select an OS to boot.

Manual Installation with an Extended HAMMER2 Disk Layout

HAMMER is a file system that allows creating pseudo file systems (PFSs) within it, which dynamically share a common storage space. Oversimplified, you can think of HAMMER as of a logical volume manager (LVM) with logical volumes (PFSs) that are not of fixed size. Each PFS obtains as much space from the HAMMER file system as it needs. Here, we consider the HAMMER2 file system, which is the follower of HAMMER.

This section shows how to create the following disk layout:

# mount -p
nvme0s1d        /       hammer2 rw          1 1
devfs           /dev        devfs   rw,nosymfollow      0 0
/dev/nvme0s1a       /boot       ufs     rw          1 1
@usr            /usr        hammer2 rw          0 0
@usr.dports     /usr/dports hammer2 rw          0 0
@usr.local      /usr/local  hammer2 rw          0 0
@usr.src        /usr/src    hammer2 rw          0 0
@var            /var        hammer2 rw          0 0
@home           /home       hammer2 rw,nosuid       0 0
@build          /build      hammer2 rw          0 0
/build/usr.distfiles    /usr/distfiles  null    rw          0 0
/build/usr.obj      /usr/obj    null    rw          0 0
/build/var.cache    /var/cache  null    rw          0 0
/build/var.crash    /var/crash  null    rw          0 0
/build/var.log      /var/log    null    rw          0 0
/build/var.run      /var/run    null    rw          0 0
/build/var.spool    /var/spool  null    rw          0 0
tmpfs           /tmp        tmpfs   rw,noexec,nosuid,nodev  0 0
tmpfs           /var/tmp    tmpfs   rw,noexec,nosuid,nodev  0 0
tmpfs           /var/run/shm    tmpfs   rw          0 0
procfs          /proc       procfs  rw          0 0

The entries that start with a "@" in front are PFSs. This layout is relatively complicated, as it uses separate PFSs for directories that are separately mounted in many UNIX installations. Furthermore, file systems that do not need backup are mounted under the /build PFS, which is something like scratch space in DragonFly. /tmp and /var/tmp are implemented as tmpfs.

In the following, it is assumed you have already booted the install medium, logged in as root, sliced the hard drive and created your disklabel partitions "a" for /boot, formatted with UFS, "b" for swap, and "d" for /, formatted with HAMMER2. It is furthermore assumed your disk drive is recognised as nvme0. If your drive is recognised as something else, e.g. da0, you can simply replace nvme0 with da0 in the following commands.

Note: When creating mount points and mounting disk partitions it is important to keep in mind that the directory hierarchy determines the order of the commands. More specifically, if partition B is to be mounted under a directory of partition A, then first partition A has to be mounted, then the mount point for partition B created on A, and finally partition B mounted. If you proceed first creating the mount points and then mounting the partitions without heeding the hierarchy you will get into trouble :-). Be warned about that.

So, let's create the layout.

Mount the disklabel partitions (the swap partition is not mounted):

# mount_hammer2 nvme0s1d /mnt
# mkdir /mnt/boot
# mount nvme0s1a /mnt/boot

Note that first the / partition is mounted, then the mount point for /boot is created on the mounted /, and finally the /boot partition is mounted. This sequence of commands is determined by the file system hierarchy as discussed in the note above.

Create the HAMMER2 PFSs. The path to the mounted HAMMER2 ROOT file system is specified via the -s parameter:

# hammer2 -s /mnt pfs-create usr
# hammer2 -s /mnt pfs-create usr.dports
# hammer2 -s /mnt pfs-create usr.local
# hammer2 -s /mnt pfs-create usr.src
# hammer2 -s /mnt pfs-create var
# hammer2 -s /mnt pfs-create home
# hammer2 -s /mnt pfs-create build

To view the created PFSs, you can in between issue:

# hammer2 pfs-list /mnt

Create the mount points and mount the PFSs, taking care of the directory hierarchy (see the note above on creating mount points and mounting partitions):

# mkdir /mnt/usr
# mount_hammer2 @usr /mnt/usr

# mkdir /mnt/usr/dports
# mkdir /mnt/usr/local
# mkdir /mnt/usr/src
# mkdir /mnt/var
# mkdir /mnt/build

# mount_hammer2 @usr.dports /mnt/usr/dports
# mount_hammer2 @usr.local /mnt/usr/local
# mount_hammer2 @usr.src /mnt/usr/src
# mount_hammer2 @var /mnt/var
# mount_hammer2 @build /mnt/build

Note that among these directories there are such with non-existent (/usr/dports and /usr/src) or empty (/build and /home) counterparts on the install medium. You may ask why /usr/dports and /usr/src are mounted although they will remain empty; the answer is, as cpdup does not cross mount boundaries, this prevents cpdup from asking whether to delete them (because they do not exist on the installation media) when copying /usr from the install medium at a later stage. There is no need to mount /home, as it is an independent file system that will remain empty. On /build, we create directories for file systems that do not normally need backup. At a later stage, we will null-mount these directories to their respective mount points in the hierarchy.

Create directories for file systems that do not normally need backup:

# mkdir /mnt/build/usr.distfiles
# mkdir /mnt/build/usr.obj
# mkdir /mnt/build/var.cache
# mkdir /mnt/build/var.crash
# mkdir /mnt/build/var.log
# mkdir /mnt/build/var.run
# mkdir /mnt/build/var.spool

Create the mount points for the /build null mounts that do not exist on the install medium:

# mkdir /mnt/usr/distfiles

Create mount points for the non-empty /build null mounts:

# mkdir /mnt/var/crash
# mkdir /mnt/var/log
# mkdir /mnt/var/run
# mkdir /mnt/var/spool

There is no need to create mount points for the empty /build null mounts that exist on the install medium (/usr/obj and /var/cache), as they will be copied by cpdup together with /usr and /var at a later stage.

Mount the non-empty /build null mounts:

# mount_null /mnt/build/var.crash /mnt/var/crash
# mount_null /mnt/build/var.log /mnt/var/log
# mount_null /mnt/build/var.run /mnt/var/run
# mount_null /mnt/build/var.spool /mnt/var/spool

Mount /usr/distfiles as it does not exist under /usr on the installation media (to prevent cpdup from asking whether to delete it when copying /usr at a later stage):

# mount_null /mnt/build/usr.distfiles /mnt/usr/distfiles

Install DragonFly by copying the non-empty file systems. Luckily, cpdup won't cross mount boundaries on the source or destination, so it takes a few commands:

# cpdup / /mnt
# cpdup /boot /mnt/boot
# cpdup /usr /mnt/usr
# cpdup /usr/local /mnt/usr/local
# cpdup /var /mnt/var

Copy the non-empty /build null mounts:

# cpdup /var/crash /mnt/var/crash
# cpdup /var/log /mnt/var/log
# cpdup /var/run /mnt/var/run
# cpdup /var/spool /mnt/var/spool

DragonFly BSD uses a different /etc from the one present on the install medium. The /etc on the install medium is only used during installation. It is the /etc.hdd directory that is intended for permanent use. You can delete /etc, but it is preferable to store it under the name /etc.live instead:

# mv /mnt/etc /mnt/etc.live
# mv /mnt/etc.hdd /mnt/etc
# pwd_mkdb -p -d /mnt/etc /mnt/etc/master.passwd
# pw -V /mnt/etc userdel installer

There is no example fstab in /etc.hdd. The one from /etc.live has to be copied:

# cp /mnt/etc.live/fstab.example /mnt/etc/fstab

Describe all mounts in fstab:

# vi /mnt/etc/fstab

Enter the following content:

/dev/nvme0s1a /boot ufs rw 1 1
/dev/nvme0s1b none swap sw 0 0
/dev/nvme0s1d / hammer2 rw 1 1
@usr /usr hammer2 rw 0 0
@usr.dports /usr/dports hammer2 rw 0 0
@usr.local /usr/local hammer2 rw 0 0
@usr.src /usr/src hammer2 rw 0 0
@var /var hammer2 rw 0 0
@home /home hammer2 rw,nosuid 0 0
@build /build hammer2 rw 0 0
/build/usr.distfiles /usr/distfiles null rw 0 0
/build/usr.obj /usr/obj null rw 0 0
/build/var.cache /var/cache null rw 0 0
/build/var.crash /var/crash null rw 0 0
/build/var.log /var/log null rw 0 0
/build/var.run /var/run null rw 0 0
/build/var.spool /var/spool null rw 0 0
tmpfs /tmp tmpfs rw,nosuid,noexec,nodev 0 0
tmpfs /var/tmp tmpfs rw,nosuid,noexec,nodev 0 0
proc /proc procfs rw 0 0

Now, specify the correct root file system:

# vi /mnt/boot/loader.conf

Add the following content:

vfs.root.mountfrom="hammer2:nvme0s1d"

Unmount mounted filesystems:

# umount /mnt/boot
# umount /mnt/usr/distfiles
# umount /mnt/usr/dports
# umount /mnt/usr/local
# umount /mnt/usr/src
# umount /mnt/var/crash
# umount /mnt/var/log
# umount /mnt/var/run
# umount /mnt/var/spool
# umount /mnt/usr
# umount /mnt/var
# umount /mnt/build
# umount /mnt

Halt to give you time to remove the install medium:

# halt

Wait for the system to halt, remove the installation medium after that, and finally press any key to reboot.