DaemonForums  

Go Back   DaemonForums > Other Operating Systems > Other BSD and UNIX/UNIX-like

Other BSD and UNIX/UNIX-like Any other flavour of BSD or UNIX that does not have a section of its own.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th November 2021
dchmelik's Avatar
dchmelik dchmelik is offline
Real Name: David Chmelik
Port Guard
 
Join Date: Oct 2017
Location: USA
Posts: 38
Question *BSD Unix with MBR or moving to non-UEFI GPT?

If I install NetBSD, FreeBSD, maybe OpenBSD, and DragonFlyBSD (which I heard does best symmetric multiprocessing, SMP) Unixes on my PC, can any boot on MBR from extended/logical partitions, or can I redo my solid state drive (SSD) as non-UEFI GPT and then boot them from any partitions, with LILO or GRUB2?

These day's I'd probably only install a DOS (FreeDOS or even MS/Win9x/ME) on my classic PC for classic graphics/music demonstrations (demos) & games but not on my main desktop PC, so I may as well switch to GPT when Slackware GNU/Linux 15 is out, if it'll make installation & booting easier, right?
__________________
David
homesite mirror (most uptime) / homesite (updated first)
Reply With Quote
  #2   (View Single Post)  
Old 7th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,989
Default

I can answer for your "maybe" OpenBSD. It may be possible to boot from a logical MBR partition if the BIOS can do it, but the Project doesn't support it:
Quote:
Originally Posted by the OpenBSD FAQ
Preferably use one of the four primary MBR partitions for booting OpenBSD. Extended partitions may not work.
For EFI multiboot, the Project states:
Quote:
Originally Posted by the OpenBSD FAQ
rEFInd is reported to usually work. GRUB is reported to usually fail. In either case, you are completely on your own.
Reply With Quote
  #3   (View Single Post)  
Old 7th November 2021
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,508
Default

There are 2 potential conflicts:
1 The need for a primary partition as @jggimi mentioned
2. The location and name of BOOTX64.EFI

/boot
/efi
/EFI
/BOOT
/BOOTX64.EFI
BOOTIA32.EFI

https://ackstorm.de/posts/uefi-openb...dual-boot.html

OpenBSD names and places BOOTX64.EFI exactly as Fedora/RHEL does and installing OpenBSD to free disk space in Fedora results in the next boot starting OpenBSD. The Fedora install is still there and can be recovered by re-installing Grub2 and configuring Grub. Debian Derivatives and Crux place the BOOTX64.EFI in a different location and are easy, via Grub2, to dual-boot with OpenBSD.

I think there is a keysum in OpenBSD's BOOTX64.EFI that is involved in kernel re-linking because re-linking will fail if OpenBSD's BOOTX64.EFI is moved and/or renamed. @jggimi walked me through debugging what probably is not really a bug but a conflict.

The generic NetBSD kernel does not re-link and actually uses lower case: bootx64.efi (may not matter in a case-insensitive msdos/vfat /boot/efi partition).
Appears to be amendable to gpt partition numbered greater than 4. I am using the 5th gpt partition for NetBSD swap.

If FreeBSD/Dragonfly do not kernel re-link and can install to gpt partitions >4, you may be able to get all 4 BSD's on one disk. I can think of 3 paths:

1. First install NetBSD/FreeBSD and then install Grub2 from the respective package repository.
https://wiki.netbsd.org/grub2/
https://forums.freebsd.org/threads/h...freebsd.28443/
2. Install a compatible Linux with Grub2
With the Grub2 option you can use /etc/grub.d/40_custom and 41_custom. I have not tried it but I believe that you can duplicate 4*_custom multiple times beyond 41.
3. Use reFIND - I have not used but believe that it is capable of finding and creating the additional boot options.

Last edited by shep; 12th November 2021 at 12:41 AM.
Reply With Quote
  #4   (View Single Post)  
Old 8th November 2021
dchmelik's Avatar
dchmelik dchmelik is offline
Real Name: David Chmelik
Port Guard
 
Join Date: Oct 2017
Location: USA
Posts: 38
Exclamation

NON-UEFI GPT?
__________________
David
homesite mirror (most uptime) / homesite (updated first)
Reply With Quote
  #5   (View Single Post)  
Old 8th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,989
Default

If your hardware is UEFI-capable, then you're already using UEFI. So-called "Legacy Boot" to boot MBR uses a Compatibility Support Module (CSM) within UEFI firmware to simulate an x86 BIOS.

Some OSes have bootloaders which can read a GPT partition table on systems without UEFI. Wikipedia states "FreeBSD and most Linux distributions can boot from GPT partitions on systems with either the BIOS or the EFI firmware interface." https://en.wikipedia.org/wiki/GUID_Partition_Table
Reply With Quote
  #6   (View Single Post)  
Old 8th November 2021
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

Quote:
Originally Posted by dchmelik View Post
NON-UEFI GPT?
GRUB (Linux) needs a BIOS boot partition to hold the core.img on a GPT disk.
__________________
Are you infected with Wetiko?
Reply With Quote
  #7   (View Single Post)  
Old 10th November 2021
dchmelik's Avatar
dchmelik dchmelik is offline
Real Name: David Chmelik
Port Guard
 
Join Date: Oct 2017
Location: USA
Posts: 38
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
GRUB (Linux) needs a BIOS boot partition to hold the core.img on a GPT disk.
What about LILO or a *BSD bootloader?
__________________
David
homesite mirror (most uptime) / homesite (updated first)
Reply With Quote
  #8   (View Single Post)  
Old 10th November 2021
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

LILO has been dead since 2016[0]. I don't have any experience of it though so I would have to refer you to a search engine for details if you still want to use it. For example https://www.linuxquestions.org/quest...ns-4175560467/

In respect of BSD, I've only tried OpenBSD and for that I know that the installer will default to a UEFI system if it detects a GPT disk. I don't know if it's possible to force a non-UEFI installation to a GPT disk but I suspect not.
__________________
Are you infected with Wetiko?
Reply With Quote
  #9   (View Single Post)  
Old 10th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,989
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
I don't know if it's possible to force a non-UEFI installation to a GPT disk but I suspect not.
I've just tested this with vmm(4). A GPT drive is not bootable with the default SeaBIOS. It only becomes usable when you bypass the BIOS and load a kernel directly with vmctl(8)'s start -b option.
Reply With Quote
Old 10th November 2021
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,508
Default

I think Slackware is the only distribution using elilo. Crux linux used to but now recommends grub2-efi:
https://crux.nu/Main/Handbook3-6#ntoc11

The Slackware elilo documentation was updated 1/11/2021 but contains many dead links:
https://docs.slackware.com/howtos:sl...uefi_and_elilo

It also looks like the firmware of your system may impact your effort.

https://docs.slackware.com/howtos:sl...void_surprises

If you decide to try a Linux Distribution with grub2-efi, I would recommend either a Debian based distribution
that uses the following paths:
Debian installs grub-efi for its EFI bootloader, as:

For amd64 architecture:
/boot/efi/EFI/debian/grubx64.efi
or Crux
/boot/efi/EFI/grub/BOOTX64.EFI
Slackware uses:
/boot/efi/EFI/Slackware/elilo.efi
or in case of potential firmware constraints:
/boot/efi//EFI/boot/bootx64.efi
Not sure where it goes in Slackware if you use grub2

The OpenBSD path is hard coded into kernel re-linking. You can move it and
still boot but kernel re-linking will fail.
/boot/efi/BOOT/BOOTX64.EFI
NetBSD path is flexible
/boot/efi/bootx64.efi
or
/boot/efi/NBSD/bootx64.efi
Crux has some BSD features including /etc/rc.conf and a ports system that might be attractive to you. Using uefi gives you 128 partions while using MBR's 4 partition limit will need some workarounds for 4 BSD's + swap and boot partition.

As to whether FreeBSD or DragonFlyBSD can boot from higher partitions you will have to test. I did test NetBSD with /swap at gpt4 and / at gpt5 and it booted but had issues (panic) near the end while the kernel was setting up /swap for kernel dumping. Reversing the partitions; / at gpt4 and /swap at gpt5, made the issue go away.

Last edited by shep; 12th November 2021 at 12:44 AM.
Reply With Quote
Old 10th November 2021
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default

FreeBSD and NetBSD can indeed boot a GPT disk from a BIOS firmware. See gptboot(8) ("GPT bootcode for UFS on BIOS-based computers)" and gpt(8) biosboot respectively. Both man pages at the bottom contain an example of how to manually set up a GPT disk to boot *BSD on a BIOS system.
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dragonfly BSD UEFI myway_1 Other BSD and UNIX/UNIX-like 4 31st March 2017 09:29 PM
UEFI support myway_1 NetBSD Installation and Upgrading 0 26th November 2016 07:20 PM
FreeBSD 7 EOL and UEFI shep News 0 8th March 2013 01:51 AM
Moving /var to /usr/var sharris FreeBSD General 2 6th August 2010 12:00 AM
Moving to ZFS Business_woman FreeBSD General 6 20th October 2008 03:28 PM


All times are GMT. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick