• DragonFlyBSD
  • Installing DragonFlyBSD on an SSD with Multiple Partitions

Hello,

I was given an old motherboard as a gift from my sister. I like tuning and upgrading old hardware. I added more memory, a more powerful processor, an SSD, and so on.

I enjoy studying operating systems, so I decided to install multiple ones: Fedora, FreeBSD, NetBSD, DragonFlyBSD, and Haiku.

I first partitioned the SSD into 8 partitions (plus two for GRUB boot) using GParted on a USB drive (GPT scheme).

lsblk command in Fedora:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 155.3G 0 part /
├─sda4 8:4 0 155.3G 0 part
├─sda5 8:5 0 155.3G 0 part
├─sda6 8:6 0 155.3G 0 part
├─sda7 8:7 0 155.3G 0 part
└─sda8 8:8 0 154.3G 0 part
zram0 252:0 0. 1.9G 0 disk [SWAP]
I installed the operating systems in the following order:
Partition 3: Fedora 40
Partition 4: FreeBSD 14.2
Partition 5: NetBSD 10
Partition 6: DragonFlyBSD 6.4.0
Partition 7: (still empty, possibly Amiga-like OS)
Partition 8: Haiku R5
Installing Fedora, FreeBSD, and Haiku was easy.
The problem started with the NetBSD installation.

I had to enter the shell and use dkctl to complete the installation.

After that, I tried installing DragonFlyBSD, but the installer does not recognize the GPT scheme; it only sees the entire SSD as a single unpartitioned disk.

gdisk /dev/sda command in Fedora:

Number Start (sector) End (sector) Size Code Name
1 40 2087 1024.0 KiB EF02
2 2088 2099239 1024.0 MiB 8300 boot
3 2099240 327688231 155.3 GiB 8300 Fedora
4 327688232 653275175 155.3 GiB A503 FreeBSD
5 653275176 978862119 155.3 GiB A902 NetBSD
6 978862120 1304449063 155.3 GiB 8300 DragonFlyBSD
7 1304449064 1630036007 155.3 GiB A503 Amiga-Like
8 1630036008 1953523751 154.3 GiB EB00 Haiku

I searched on ChatGPT 😁 and found these steps:

I first started FreeBSD and formatted partition /dev/ada0p6:

newfs -U -O1 -L DragonFlyBSD /dev/ada0p6

Then, I downloaded the DragonFlyBSD image:

curl -O http://mirror-master.dragonflybsd.org/iso-images/dfly-x86_64-6.4.0_REL.img.bz2

I decompressed the package:

bzip2 -dk dfly-x86_64-6.4.0_REL.img.bz2

I mounted the /dev/ada0p6 partition:

mount /dev/ada0p6 /mnt

I copied the image file to the mounted partition and then unmounted it:

cp dfly-x86_64-6.4.0_REL.img /mnt
umount /mnt

I restarted the system and booted from a USB drive with the DragonFlyBSD installer.
In the shell, I created a new directory dflydsk in /mnt, mounted the partition I wanted to use at /mnt/dflydsk, and created a virtual device for the DragonFlyBSD installer image stored in /mnt/dflydsk:

mount -t ufs /dev/ad4s5 /mnt/dflydsk
vnconfig vnd0 /mnt/dflydsk/dfly-x86_64-6.4.0_REL.img

I created another directory dflyimg in /mnt and mounted the virtual device at /mnt/dflyimg:

mount -t ufs /dev/vnd0s2 /mnt/dflyimg

I copied the contents of /mnt/dflyimg to /mnt/dflydsk:

cpdup -vv /mnt/dflyimg /mnt/dflydsk

After that, I used chroot to set the root password and edit fstab.

Finally, I configured Fedora's GRUB in the 40_custom file with:

nano /etc/grub.d/40_custom

...

menuentry "DragonflyBSD" {
insmod part_gpt
insmod ufs1
set root=(hd0,gpt6)
kfreebsd /boot/loader
}

...

And I loaded with:

grub2-mkconfig -o /boot/grub2/grub.cfg

Well, I think I described the steps as accurately as possible—maybe a mistake here and there, but that's the gist of it.

However, when I booted, I got this screen:

Am I doing everything correctly? If not, what do I need to change?

  • rvp replied to this.

    Hello,

    Only more a question! Does DragonflyBSD need a own disk to be installed and without others operating systems?

    • pin replied to this.

      Hello @pin and @rvp,

      Thank you for the recommendation. I honestly am accustomed to installing FreeBSD and NetBSD, and I hardly ever look at the documentation.

      3 months later

      @miltoncsl that's not supported by the installer itself, but it's doable without issues with a manual installation 🙂