Dual boot Grub configuration for Fedora Cinnamon 37 and OpenBSD 7.2.
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dual boot Grub configuration for Fedora Cinnamon 37 and OpenBSD 7.2.
I have successfully installed Fedora Cinnamon 37 and OpenBSD on a single SSD (as that is all my computer supports). Unfortunately, I am having a difficult time with Grub's naming of hard disks and partitions. Here is what I know:
1) My SSD is at /dev/nvme0n1 in Fedora.
2) OpenBSD needs to be chain loaded for Grub to boot OpenBSD.
3) My OpenBSD 7.2 system is on the 6th. partition.
Is there anyone that can guide me with setting up Grub, so that I can boot my OpenBSD system?
Thanks for the reply. Running grub> ls I get (hd0,gpt3), gpt4, gpt5, and gpt6. Exiting from the prompt boots me into OpenBSD. I think chain loading should take place at (hd0,gpt6), however the Fedora 37 system refuses to recognize anything due to the OpenBSD file system. I have also tried copying an OpenBSD BOOTX64.EFI file to /boot/efi/EFI/openbsd. I assume /boot is in / but it could be in the GPT partition as well. In other words, I am unsure where /boot resides.
To my knowledge, partition #6, which is where the OpenBSD system is installed, only is flagged in Linux as NTFS. I used the following procedure booting from a Parted Magic USB drive:
$ sudo gdisk /dev/nvme0n1
: t
: 6
: A600
: w
This was done to get OpenBSD to identify this as an OpenBSD partition during install, to allow the installer to autmatically partition this now former (?) NTFS partition.
Last edited by globetrotterdk; 12-01-2022 at 10:14 AM.
Well, I thought that I had solved the problem, but of course, I didn't. However, the resulting errors were interesting, or at least I thought so. They can be seen here.
I have read warnings about not using something called osprober, but here the grub2-probe seems to be tied into Grub, without the option of it getting involved with the menu entry creation.
The Grub entry I created is as follows:
$ doas nano /etc/grub.d/40_custom
menuentry "OpenBSD" {
set root=(hd0,gpt1)
chainloader +1
}
That seems to work, thanks. Is there a way that I can move the entry for OpenBSD further up the list? I am still getting errors in connection with updating Grub, so I’m not sure grub-customizer will work… Most importantly, I don’t want to break anything, now that the entry is working.
Is there a way that I can move the entry for OpenBSD further up the list?
The order of the grub entries is somewhat based on the numbering of the *.conf files in /etc/grub.d
copy /etc/grub.d/40_custom to /etc/grub.d/11_custom or /etc/grub.d/09_custom will move the entry just after or before the fedora entries.
Last edited by colorpurple21859; 12-02-2022 at 09:55 PM.
The standard method of setting a menuentry in grub.cfg as the default is to edit the file /etc/default/grub and change the first line (GRUB_DEFAULT=0) from the default zero to whatever the number is for the BSD menuentry in grub.cfg. Grub count begins with zero. Renumbering the custom file should also work as you found.
Quote:
Most importantly, I don’t want to break anything, now that the entry is working.
Make a backup copy of the menuentries from grub.cfg since it is "mostly working" and put it somewhere else, /home/user directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.