Dear all,
multiboot installation of a BSD system with other operating systems
(OSs) on UEFI hardware is not officially supported by any of the popular
BSDs. Because of the general interest in this topic, here I would like
to share my experience of running DragonFly BSD, OpenBSD, and Slackware
Linux on an UEFI ASUS laptop. The only boot manager you need is
rEFInd.
Preliminaries
As each OS is going to reside on its own hard drive slice,
the first step of setting your system for multiboot is slicing the hard
drive. In general, if you want to multiboot n OSs, you would need n + 1
slices. The extra slice is for the EFI system partition (ESP). Of
course, you have to make sure each partition is large enough for the OS that is
going to reside on it. As mentioned, in this post I share my experience
with installing DragonFly, OpenBSD, and Slackware Linux. I sliced the hard
drive from DragonFly, which I have exemplarily described in the
DragonFly documentation on multiboot. Of course, you will slice the hard drive from the first OS that you are going
to install. In the above link to the DragonFly documentation, I have also
described how the ESP is to be set up. The installation of OpenBSD is described
in
this post. Therefore, in the following I assume your first OS has already been installed
in its slice, rEFInd has been installed in the ESP, and I only consider the
specifics of the Slackware installation.
Installation of Slackware Linux
After booting with the installation media, use gdisk make the Linux partition
of type 8300 or 8e00 in case you use LVM. After creating your LVM partitions,
you can type setup and proceed with the Slackware installation. Install
neither lilo nor elilo. At the end of the installation do not reboot but
change to shell. Chroot to /mnt, create the initrd image, mount the ESP, create
a Slackware directory under EFI/BOOT in the ESP and copy the generic-kernel
image and the initrd to EFI/BOOT/Slackware. Assuming the Slackware partition is
nvme0n1p4 as on my system, run
to obtain the UUID and PARTUUID. These are to be used at the
'volume' and 'options' entries of refind.conf, respectively.
Add the following entry to refind.conf:
Code:
menuentry "Slackware" {
icon /EFI/BOOT/icons/os_slackware.png
volume the-UUID-from-blkid
loader /EFI/BOOT/Slackware/vmlinuz-generic-kernel_version
options "ro root=PARTUUID=the-PARTUUID-from-blkid"
initrd /EFI/BOOT/Slackware/initrd-kernel_version.gz
}
Reboot and have fun!
Best regards,
Martin