<div dir="ltr">I was wanting to find out something like this. I think directions to add a small vfat/msdos/fat32 partition to share files between these OSes in the documentation would be great :-)<div><br></div><div>Thank you.</div><div><br></div><div>--Siju</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 4:10 PM Martin Ivanov <<a href="mailto:martin.ivanov@greenpocket.de">martin.ivanov@greenpocket.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I promised to prepare a page on multiboot installation of DragonFly. My <br>
notes are at the end of this message. Approximately 95% of the suggested <br>
procedure have been tested. I would be happy to get your feedback and <br>
critics. I would like to know whether you think the notes are worthy of <br>
getting space in the documentation and if yes, where, in which part of <br>
the documentation.<br>
<br>
Thank you very much in advance!<br>
<br>
<br>
DragonFlyBSD Multiboot Installation Notes<br>
<br>
Note that there are non-existent as well as empty directories on the <br>
installation medium. These are:<br>
Non-existent:<br>
/usr/distfiles<br>
/usr/dports<br>
/usr/src<br>
Empty:<br>
/usr/obj<br>
/var/cache<br>
/tmp<br>
<br>
Installation steps:<br>
Do:<br>
<br>
nvmectl info<br>
camcontrol devlist<br>
<br>
to see which devices you have. We assume we have nvme0. Then:<br>
<br>
dd if=/dev/zero of=/dev/nvme0 count=1024 bs=1m<br>
<br>
Partition the hard drive:<br>
<br>
gpt destroy nvme0<br>
gpt create -f nvme0<br>
gpt -v show nvme0<br>
<br>
Add a slice with index 0.<br>
-s specifies the slice size in sectors. A sector has 512 bytes. For an <br>
EFI Partition of half a GiB oder 512 MiB: (512 * 1024 ** 2) / 512= 1048576<br>
-t specifies slice type: efi, swap, ufs, hfs, linux, dfly, hammer2.<br>
<br>
gpt add -i 0 -s 1048576 -t efi nvme0<br>
<br>
Add labels: labels must be UTF-8<br>
<br>
gpt label -i 0 -l "EFI System" nvme0<br>
<br>
gpt -v show nvme0<br>
<br>
Add a 200GiB DragonFly partition<br>
<br>
gpt add -i 1 -s 419430400 -t dfly nvme0<br>
<br>
gpt -v show nvme0<br>
gpt label -i 1 -l "DragonFly BSD" nvme0<br>
disklabel64 -r -w nvme0s1 auto<br>
disklabel64 -e nvme0s1<br>
# a: 1G * 4.2BSD<br>
# b: 16G * swap<br>
# d: * * HAMMER2<br>
gpt add -i 2 -s 419430400 -t "Unused" nvme0<br>
<br>
Add a 200 GiB OpenBSD slice<br>
<br>
gpt label -i 2 -l "OpenBSD" nvme0<br>
gpt -v show nvme0<br>
gpt add -i 3 -t linux nvme0<br>
<br>
Use the remaining free space for Slackware<br>
<br>
gpt label -i 3 -l "Slackware Linux" nvme0<br>
gpt -v show nvme0<br>
<br>
Make filesystems and mount them:<br>
<br>
newfs_msdos nvme0s0<br>
newfs nvme0s1a<br>
newfs_hammer2 -L ROOT /dev/nvme0s1d<br>
mount_hammer2 nvme0s1d /mnt<br>
mkdir /mnt/boot<br>
mount nvme0s1a /mnt/boot<br>
<br>
Special care for the EFI System partition (ESP):<br>
<br>
mkdir /efimnt<br>
mount_msdos /dev/nvme0s0 /efimnt<br>
<br>
Take care of the ESP:<br>
<br>
mkdir -p /efimnt/EFI/BOOT<br>
<br>
Install rEFInd:<br>
<br>
cd /efimnt/EFI/BOOT<br>
mount_? /dev/da?s? /usb<br>
cp -r /usb/*/refind-bin-0.12.0/refind/* .<br>
<br>
Remove the unnecessary drivers, efi executables and tools. E.g, for an <br>
amd64 machine you have to remove the *aa64* and *ia32* files and <br>
directories.<br>
<br>
mv refind_x64.efi bootx64.efi<br>
cp /boot/boot1.efi bootx64-dragonflybsd.efi<br>
mv refind.conf-sample refind.conf<br>
vi refind.conf<br>
menuentry "DragonFly BSD" {<br>
loader /EFI/BOOT/bootx64-dragonflybsd.efi<br>
icon /EFI/BOOT/icons/os_dragonflybsd.png<br>
}<br>
menuentry OpenBSD: analogical<br>
menuentry Slackware: analogical<br>
<br>
cd<br>
<br>
Create the H2 PFSs:<br>
<br>
hammer2 -s /mnt pfs-create usr<br>
hammer2 -s /mnt pfs-create usr.dports<br>
hammer2 -s /mnt pfs-create usr.local<br>
hammer2 -s /mnt pfs-create usr.src<br>
hammer2 -s /mnt pfs-create var<br>
hammer2 -s /mnt pfs-create home<br>
hammer2 -s /mnt pfs-create build<br>
<br>
Create the mount points for the PFSs:<br>
<br>
mkdir /mnt/usr<br>
mkdir /mnt/usr/dports<br>
mkdir /mnt/usr/local<br>
mkdir /mnt/usr/src<br>
mkdir /mnt/var<br>
mkdir /mnt/home<br>
mkdir /mnt/build<br>
<br>
Null-mount the non-empty PFSs:<br>
<br>
mount_null nvme0s1d@usr /mnt/usr<br>
mount_null nvme0s1d@usr.local /mnt/usr/local<br>
mount_null nvme0s1d@var /mnt/var<br>
mount_null nvme0s1d@build /mnt/build<br>
<br>
Create the file systems under /build: these are the file systems that do <br>
not need backup; /build is something like scratch space in DragonFly:<br>
<br>
mkdir /mnt/build/usr.distfiles<br>
mkdir /mnt/build/usr.obj<br>
mkdir /mnt/build/var.cache<br>
mkdir /mnt/build/var.crash<br>
mkdir /mnt/build/var.log<br>
mkdir /mnt/build/var.spool<br>
<br>
Create the mount points for the non-existent /build null mounts:<br>
<br>
mkdir /mnt/usr/distfiles<br>
Mount the /build null mounts:<br>
mount_null /mnt/build/usr.distfiles /mnt/usr/distfiles<br>
mount_null /mnt/build/usr.obj /mnt/usr/obj<br>
mount_null /mnt/build/var.cache /mnt/var/cache<br>
mount_null /mnt/build/var.crash /mnt/var/crash<br>
mount_null /mnt/build/var.log /mnt/var/log<br>
mount_null /mnt/build/var.spool /mnt/var/spool<br>
<br>
Mount the TMPFSs:<br>
<br>
mount_tmpfs tmpfs /mnt/tmp<br>
mount_tmpfs tmpfs /mnt/var/tmp<br>
mount_tmpfs tmpfs /mnt/var/run<br>
<br>
Install DragonFly by copying the non-empty file systems. Luckily, cpdup <br>
won't cross mount boundaries on the source or destination, so it takes a <br>
few commands:<br>
<br>
cpdup / /mnt<br>
cpdup /boot /mnt/boot<br>
cpdup /usr /mnt/usr<br>
cpdup /usr/local /mnt/usr/local<br>
cpdup /var /mnt/var<br>
<br>
Copy the non-empty /build null mounts:<br>
<br>
cpdup /var/crash /mnt/var/crash<br>
cpdup /var/log /mnt/var/log<br>
cpdup /var/spool /mnt/var/spool<br>
<br>
Copy the non-empty TMPFSs:<br>
<br>
cpdup /var/tmp /mnt/var/tmp<br>
cpdup /var/run /mnt/var/run<br>
<br>
Use the correct /etc:<br>
<br>
mv /mnt/etc /mnt/etc.live<br>
mv /mnt/etc.hdd /mnt/etc<br>
<br>
There is no fstab in /etc.hdd. The one from /etc.live has to be copied<br>
<br>
cp /mnt/etc.live/fstab.example /mnt/etc/fstab<br>
<br>
Describe ALL mounts in fstab:<br>
<br>
vi /mnt/etc/fstab<br>
#edit<br>
/dev/nvme0s1a /boot ufs rw 1 1<br>
/dev/nvme0s1b none swap sw 0 0<br>
/dev/nvme0s1d / hammer2 rw 1 1<br>
/dev/nvme0s1d@usr /usr null rw 0 0<br>
/dev/nvme0s1d@usr.dports /usr/dports null rw 0 0<br>
/dev/nvme0s1d@usr.local /usr/local null rw 0 0<br>
/dev/nvme0s1d@usr.src /usr/src null rw 0 0<br>
/dev/nvme0s1d@var /var null rw 0 0<br>
/dev/nvme0s1d@home /home null rw 0 0<br>
/dev/nvme0s1d@build /build null rw 0 0<br>
/build/usr.distfiles /usr/distfiles null rw 0 0<br>
/build/usr.obj /usr null rw 0 0<br>
/build/var.cache /var/cache null rw 0 0<br>
/build/var.crash /var/crash null rw 0 0<br>
/build/var.log /var/log null rw 0 0<br>
/build/var.spool /var/spool null rw 0 0<br>
tmpfs /tmp tmpfs rw 0 0<br>
tmpfs /var/tmp tmpfs rw 0 0<br>
tmpfs /var/run tmpfs rw 0 0<br>
proc /proc procfs rw 0 0<br>
<br>
#nosuid option for /home ?<br>
<br>
vi /mnt/boot/loader.conf<br>
#add<br>
vfs.root.mountfrom:"hammer2:nvme0s1d"<br>
umount /efimnt<br>
umount /mnt/boot<br>
umount /mnt/<br>
halt<br>
# remove the installation media<br>
# press any key to reboot<br>
<br>
<br>
<br>
-- <br>
Dr. Martin A. Ivanov<br>
GreenPocket GmbH - Kundennähe durch Smart Metering -<br>
Labor 3.09 | Schanzenstraße 6-20 | 51063 Köln<br>
Telefon +49 | 221 | 355095-0<br>
Fax +49 | 221 | 355095-99<br>
E-Mail <a href="mailto:martin.ivanov@greenpocket.de" target="_blank">martin.ivanov@greenpocket.de</a><br>
<br>
Webadresse <a href="http://www.greenpocket.de" rel="noreferrer" target="_blank">www.greenpocket.de</a><br>
<br>
</blockquote></div>