Tag Archives: bsd

Let there be dragonflies

After an inspiring post by Siju George on bsd-india list, I decided to use DragonFlyBSD 2.10.1 for NAS (a long-time pending project). The installation using their installer was super-simple, and went fine. The userland is same as FreeBSD userland, and I used HAMMER filesystem as root. The NAS is not finished yet, have to install/configure BackupPC yet.

After installing on NAS, I decided to install on my notebook side-by-side with GNU/Linux. My notebook’s HDD is a GPT disk, with GNU GRUB2 used as bootloader. To install DragonFlyBSD on it, I booted with DragonFlyBSD’s USB image, started shell, and created a large partition of type DragonFly HAMMER, and a small UFS2 (to be used as /boot) using gpt(8). Encrypted partitions using dm-crypt. After that I newfs_hammer(8)-ed it, mount(8)-ed it, cpdup(1)-ed USB filesystem onto it as per instructions, and created an initrd using mkinitrd(8). Following is GRUB2 configuration I used to boot into it.

insmod bsd

menuentry "DragonFlyBSD 2.10-RELEASE" {
        set root='(hd0,6)'

        kfreebsd /kernel/kernel

        kfreebsd_module /kernel/initrd.img type=md_image

        kfreebsd_module_elf /kernel/acpi.ko
        kfreebsd_module_elf /kernel/ahci.ko
        kfreebsd_module_elf /kernel/ehci.ko
        kfreebsd_module_elf /kernel/dm.ko
        kfreebsd_module_elf /kernel/md.ko
        kfreebsd_module_elf /kernel/dm_target_crypt.ko
        kfreebsd_module_elf /kernel/wlan.ko
        kfreebsd_module_elf /kernel/wlan_ccmp.ko
        kfreebsd_module_elf /kernel/wlan_tkip.ko
        kfreebsd_module_elf /kernel/ath_hal.ko
        kfreebsd_module_elf /kernel/ath_rate.ko
        kfreebsd_module_elf /kernel/if_ath.ko
        kfreebsd_module_elf /kernel/coretemp.ko
        kfreebsd_module_elf /kernel/sound.ko
        kfreebsd_module_elf /kernel/snd_hda.ko

        set kFreeBSD.vfs.root.mountfrom=ufs:md0s0
        set kFreeBSD.vfs.root.realroot=crypt:hammer:/dev/da0s4:dragon
}
### END /etc/grub.d/01_bsd ###

Thanks to alexh on #dragonflybsd on EFnet for help with installation.