Dual boot 32bit and 64bit?

Is it possible to setup a dual boot system with the 32bit and 64bit versions of haiku? I’m mostly interested in the 32bit for playing with old BeOS apps.

Yes, absolutely.

If you use intel partition scheme, MBR and Haiku BootManager, there should be no problem. If you have to use EFI, it will be more complicated. I never managed to boot both versions together, rEFInd only see the 64 bits one, but it’s certainly possible with another EFI manager like grub.

3 Likes

Lats time I played with 2 Haiku installations on the same disk in UEFI setup (both were 64 bit however), I used single bootx64.efi executable in EFI partition. This bootloader was sufficient smart to detect 2 Haiku partitions and let me select which one I want to boot. I suspect the same holds also for 2 partition for Haiku x86 and Haiku x64.

But I agree with @Starcrasher in that Grub can boot each Haiku partition individually.

1 Like

It’s a 10+ year old thinkpad so good ol BIOS. It worked great, I just set them up in the boot manager on the installer.

2 Likes

I would suggest you make them visually distinctive (a different wallpaper will do) so you don’t end up confused about which one you are in at the moment and spend hours looking for the “missing” app which is on the OTHER installation.

Don’t ask me how I know that …

GRUB cannot boot Haiku, only Haiku loader can. The UEFI version of GRUB can chainload EFI executables, but they have to match bitness of the UEFI firmware you are running GRUB on. If you are using an x64 UEFI system, the Haiku loader has to be x64 as well regardless of whether you are chainloading it with GRUB or not. In order to boot Haiku x86 on x64 UEFI (or Haiku x64 on x86 UEFI) without CSM, you need to use the hybrid bootloader. GRUB is not needed nor useful for that purpose whatsoever.

Of course, x86 efi executables can chainload only another x86 efi executables, and x64 ones only another x64. But x86 efi executable can load x64 Haiku kernel and x64 efi executable can load x86 kernel.

When in Grub you write:

menuentry 'Haiku x86' {
    set root=(hd0,gpt2)
    chainload +1
}

menuentry 'Haiku x64' {
    set root=(hd0,gpt3)
    chainload +1
}

You instruct Grub efi bootloader to chainload not another efi executable but rather Haiku partition bootloader, which resides in Haiku partitions.

This is different from what is achieved by:

menuentry 'Haiku bootloader (32 and 64)' {
    set root=(hd0,gpt1)
    chainload /EFI/Haiku/bootx64.efi
}

In this case, you instruct Grub efi bootloader to boot Haiku efi bootloader, whose bitness should correspond with each other and with UEFI of computer. In this case Haiku bootloader searches for all Haiku partitions and founds two. Then it presents the menu and allows to choose which partition to boot.

Of course, x86 efi executables can chainload only another x86 efi executables, and x64 ones only another x64. But x86 efi executable can load x64 Haiku kernel and x64 efi executable can load x86 kernel.

Only the hybrid-boot branch which is not committed yet, master can’t do that.

You instruct Grub efi bootloader to chainload not another efi executable but rather Haiku partition bootloader, which resides in Haiku partitions.

What is a Haiku partition bootloader? Sounds like VBR, but that would apply only for BIOS/MBR installations. Afaik on UEFI systems, the Haiku loader (which is an EFI executable) is executed, which then directly loads and executes the kernel. No other loaders are involved in this process.

In this case, you instruct Grub efi bootloader to boot Haiku efi bootloader, whose bitness should correspond with each other and with UEFI of computer. In this case Haiku bootloader searches for all Haiku partitions and founds two. Then it presents the menu and allows to choose which partition to boot.

That would work only with the hybrid bootloader, but then GRUB is not needed at all for dual booting Haiku x86 and x64 installations. It might be needed only if you want multi boot setup also with other operating systems.

If you use “chainloader +1”, what you get is an execution of the VBR. How else would haiku_loader be executed? It’s either that or the EFI version.

Anyone remembers why this is not merged yet?

If you use “chainloader +1”, what you get is an execution of the VBR. How else would haiku_loader be executed? It’s either that or the EFI version.

The BIOS haiku_loader is loaded by the VBR, but the problem is haiku_loader.efi which has to match the bitness of UEFI firmware. I am not familiar with GRUB, but it seems that on UEFI version the chainload option is not even used in the same way, instead the path to the EFI executable is specified.

Anyone remembers why this is not merged yet?

IIRC it was not submitted yet.