helloSystem / Utilities

Utilities written in PyQt5, meant for use with helloSystem
BSD 2-Clause "Simplified" License
28 stars 29 forks source link

Install FreeBSD: Allow to install into partitions without wiping whole disk (multiboot) #137

Closed probonopd closed 1 year ago

probonopd commented 2 years ago

According to @pmhausen, EFI makes it really easy to install multiple operating systems these days without bootloaders overwriting each other, since EFI firmware itself seems to contain a bootloader of sorts. If it is really that easy, then we "just" need a way to use something else in place of bsdinstall zfsboot which wipes the whole disk?

https://twitter.com/Sweordbora/status/1584239800718352384

But for the UEFI firmware to be able to read efi/freebsd/loader.efi, I suppose that needs to be written to the EFI System Partition (ESP), correct? How do you prevent multiple efi/freebsd/loader.efi from overwriting each other there?

Each EFI compatible OS can place its boot loader in efi// and the EFI BIOS will identify all "things" that are a correct boot loader binary and offer them for booting via some mechanism. If it's an older BIOS it will default to boot/bootx64.efi instead which was originally intended for removable media only.

If you install multiple boot loaders in e.g. freebsd/loader.efi and foobsd/loader.efi the BIOS will offer both. Everything after that is the boot loader's business. So to boot more than one. The firmware does not write that. The OS installer does. The firmware lets you pick from

/efi/freebsd/loader.efi /efi/ubuntu/loader.efi /efi/windows/loader.efi ... EFI is great! One FAT partition and no conflicting boot mechanisms.
probonopd commented 2 years ago

Any hints (especially: shell script examples) for how to multiboot install FreeBSD are welcome. Maybe we can work that into the installer if it can be made straightforward enough (no questions asked) and risk-free (no stealing bootability away from preexisting OSes) for the end user.

CocoCR300 commented 1 year ago

What would be the preferred boot manager: GRUB, rEFInd, Clover, other?

And this is not only about multiboot, the installer needs a disk partition utility for those who want to preserve their data partitions, or at least a partition selector (And use the included disk utility).

probonopd commented 1 year ago

FreeBSD bootloader.

Fallback if absolutely needed: Clover or rEFInd.

probonopd commented 1 year ago

Closing as a duplicate of https://github.com/helloSystem/ISO/issues/140.

karthik-holla commented 1 year ago

Any solutions for those who want to multiboot hello system with Linux and windows?

probonopd commented 1 year ago

No, need use a separate SSD. No one has implemented this so far.

pmhausen commented 1 year ago

Install on a different system e.g. in a VM, boot a rescue system, use ZFS send/receive to transfer the pool. rEFInd is a great EFI boot manager to use afterwards.

http://www.rodsbooks.com/refind/

karthik-holla commented 1 year ago

When freebsd can be dual booted as shown here why it is not possible for hello system?

pmhausen commented 1 year ago

It can be dual booted. Until now simply nobody had got the time to teach the installer how to perform a dual boot installation. Contributions welcome ;)

If you install on a second system, then manually partition the disk and restore the ZFS pool from a live/rescue system, dual boot works.

probonopd commented 1 year ago

Until now simply nobody had got the time to teach the installer how to perform a dual boot installation. Contributions welcome ;)

Ideally zfsboot could learn how to (optionally) just use the unallocated space on an existing hard disk rather than all of the hard disk.