-
-
Notifications
You must be signed in to change notification settings - Fork 6
Grub 2
Some users like to dual boot their computers with multiple operating systems. if you're already using a system with Grub 2 available, you can install MidnightBSD on another disk and select them from the grub menu.
Ubuntu
On Ubuntu 21.10, you can configure grub2 to boot MidnightBSD by doing the following:
Edit /etc/defaults/grub
Change these two configuration options to:
GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=10
You can also optionally enable a sound with
GRUB_INIT_TUNE="480 440 1"
Next, cd /etc/grub.d
Edit the 40_custom file and add the following:
menuentry "MidnightBSD" {
set root='(hd0,gpt2)'
chainloader /boot/boot1.efi
}
This will work on MidnightBSD 2.1.x amd64 systems with UEFI support. You will have to modify the set root line above to match your disk layout.
On the test system, ubuntu is installed on a nvme m.2 drive and a traditional SATA SSD is installed for MidnightBSD so it appears as the first disk (/dev/ada0 in MidnightBSD) on a GPT partition scheme with UFS2.
The chain loader file mentioned is part of the MidnighBSD /boot directory
If you use zfs, you'll need to use the zfs efi loader instead.
Finally, run sudo update-grub. On the next reboot, the menu should appear and you can boot either OS.