Installing DragonFly BSD is extremely simple, even moreso than most Linux distros,
it can be done in a matter of minutes, depending on your drive speeds. However, there
are just a few considerations to be aware of.
First and foremost is how you want to install the system, recently flash drives have been
the most popular way to install a new OS. DragonFly, like most other BSD's has two separate
types of install images, there's an install ISO which must be burned to a CD or other
optical drive, and an IMG file which must be burned to a flash drive. This may seem
abnormal for those of you coming from Linux, but Linux distros are actually the abnormality
in this case where they release hybrid ISO images that can be used both on optical media and
flash media.
FreeBSD/TrueOS/DragonFly BSD: dd if=/path/to/DragonFly.img of=/dev/da%d bs=4m && sync OpenBSD: dd if=/path/to/DragonFly.img of=/dev bs=4m && sync Linux: dd if=/path/to/DragonFly.img of=/dev/sd%c bs=4M conv=fsync status=progress && sync
To start the installer, simply enter the username "installer" at the login prompt,
this will start the ncurses based installer, which will guide you through the necessary
choices to get DragonFly BSD installed properly.
The installation consists of only 4 mandatory sections:
While not strictly necessary, I highly recommend not setting a root password in the installer, this allows you to quickly gain access to the installed system after rebooting, where you can then run:
vipw root:*:0:0:Charlie &:/root:/bin/csh toor:*:0:0:Bourne-again Superuser:/root:to "star out" the root password as shown above. If you're unfamiliar with vi(1), this may be difficult to do properly, you can use the 'h,j,k,l' or arrow keys to navigate the cursor to the colon directly after "root", hit 'i' and '*', then hit Escape, then ':wq' to save and close the modified document. This will prevent anyone from being able to log in as root or use su(1) to escalate their privileges. Because of this, it's important to have a network connection configured so you can install and configure either sudo(1) or doas(1) so a regular user can escalate privileges without needing to know the root password.
/etc/rc.conf: # Enable ssh for remote work sshd_enable="YES" # Turn off sendmail sendmail_enable="NONE" # Enable pf(4) pf_enable="YES" # This should be on by default, but it's DragonFly's NTP Daemon dntpd_enable="YES"
/etc/sysctl.conf: # Disable the bell, so your PC isn't beeping at you kern.sysbeep_enable=0 # Needed for chromium to work properly kern.ipc.shm_allow_removed=1 # General System Hardening ## These prevent other non-privileged users from seeing your ## processes and threads in the output of ps(1) security.ps_showallthreads=0 security.ps_showallprocs=0 ## Take Advantage of ASLR vm.randomize_mmap=1 kern.elf64.pie_base_mmap=1 ## Randomize the PID value kern.randompid=1 ## Prevent Hardlink Abuse security.hardlink_check_gid=1 security.hardlink_check_uid=1These files can be modified with any text editor, if you're not familiar with any of the popular editors like vi, vim, emacs, or neovim, you can use ee(1) with the invocation of:
sudo ee /etc/rc.confOf course, if you would rather use something like nano, you need to either use pkg_ng or the dports collection. For example:
# pkg_ng, the binary package manager pkg install nano # Using the Dports collection, for compiling packages yourself cd /usr # This only needs to be done the first time, updates are handled via `make dports-update` make dports-create-shallow cd dports/editors/nano make config installThis installs nano to /usr/local/bin/nano, if you are using csh or tcsh as your interactive ${SHELL}, you'll need to run the command `rehash` to update the list of programs that the shell can run, then you can use:
nano /etc/rc.conf
This should get you far enough to be able to have a working DragonFly BSD installation. Be sure to check the community maintained documentation available here to ensure you have the best documentation possible for what you're trying to accomplish, as I may not cover it in my adventures here.