Dual-booting Haiku with your other OS

One thing that I think many people would like is to have a simple and clear explanation of how to install Haiku in a computer with an existing OS so that the user has a choice of which one to boot. Very few non-computer people are used to dealing with Grub or other boot managers, and the explanations I have seen all assume a lot of prior knowledge.

2 Likes

Things like this?

http://besly.de/index.php/de/system/systemstartup/haiku-im-windows-bootmenue-einfuegen

2 Likes

Thanks for that, which I hadn’t seen. What I really want is some way to allow me to dual boot Haiku and Linux.

The problem is, Linux makes things complicated. Every other OS boots the same way. Except Linux. Linux kernel cannot be started directly from the normal boot process, and always needs Grub. And Grub is complicated.

So, please complain to the Linux people :confused:

3 Likes

On modern computers linux can be booted directly as an efi executable (config_efistub), in that case using something like refind is much better than using grub2, since refind offers a graphical menu to simply select the os to boot, as efi executables.

If we want to make haiku install next to existing oses i would simply support efi for that usecase, and refuse to do it with mbr installs (or bsd dislabels), just my 2 cents. :)

You can. I dual-boot Haiku and Linux Mint on one of my machines. With BIOS that is, because it’s an older machine, so with UEFI it might be different. You install GRUB in the MBR (or the installer of your Linux distro does it for you, like in my case) and then you have to add the commands for chainloading Haiku to your GRUB config under Linux. So far so easy, what made it quite annoyingly difficult was that you can’t just edit GRUB config files under any Debian-derived distro but you have to edit different files and then run some commands to update the real config files. And that most of the examples I found were for GRUB 1.x and GRUB 2 uses a slightly different format. But it is definitely doable. If you want I can post my configuration as a guideline.

As @PulkoMandy already noted, there’s not really anything that can be done on the Haiku side to make the process easier.

Yeah, I was hoping someone would mention refind. It’s a great piece of software being worked on by a single developer, and it deserves so much more attention:
http://www.rodsbooks.com/refind/

For ease of dual-booting, maybe we could consider working with Rod Smith (the refind developer) to ensure Haiku works well with refind? And then we could probably consider shipping refind with Haiku to help users boot multiple OSes.

It’s also themable which means we can make our own theme for refind as well.

In terms of installation, someone has already suggested we make an installer like Wubi:

I have reached out to the maintainer of Wubi-UEFI on Github to ask if it’s possible to fork the installer to make it install a non-Ubuntu OS.

Yes, I know it can be done, and that people like you know how to do it.
The problem is that people like me don’t, and we need it spelt out in full detail.
Saying “install Grub in the MBR” is not detailed enough.

But I take Pulkomandy’s point about Linux making things difficult. I’ll take it up with them.

I don’t see why it shouldn’t work, although i haven’t tested it.
We have an efi executable that loads our kernel, and refind probably finds that.
They even have an icon to display for hiaku in the sourcetree:

1 Like

I was offering you to post my configuration :wink:
I can still do that if you want, and also explain the process in detail (if I still remember it)
But you have to wait until tomorrow, I’m not at my dual-boot machine right now.

It would probably be good if one of the admins could split this into it’s own topic, as it has nothing to do with Haiku marketing.

1 Like

I should be very grateful if you would. I can happily wait - I’ve been doing so for four years!

@Sebrof : No problem, will do. I just hope I still find the right config files. Are you using a Debian based Linux distro as well (Ubuntu, Linux Mint etc.)? Because things might be a bit different on other distros

This discussion went away from the main question about marketing. Someone should split it.

1 Like

Agreed. Any admins reading, please go ahead!

Personally, I go the other way: I have Linux install Grub in Linux’ partition and install Haiku’s Bootmanager in the MBR. No messing around with Grub config files, just Bootmanagers easy GUI.

It’s important to have Grub NOT in the MBR, or it may be wiped by future Linux updates.

See this thread and PulkoMandy’s sound advice in the first comment:

1 Like

I had triple boot on my PCs from R5 days to 2 years ago using same principle that Humdinger.
I had Windows alone on first disk with Bootman. Be/Haiku sharing 2nd disk with linux.
Using Bootman has a big advantage, you know when to hit the space bar to enter boot menu.
Nowadays, I’m using USB sticks, it allows to show something easily. You just have to borrow a PC.

Yes, that’s the better and easier way for sure. :+1:
I’m still going to document the process with GRUB in MBR, just in case someone has a specific reason to use GRUB as the main bootloader.

And thanks for splitting the topic :slight_smile:

EDIT: No need for me to document anything, @alpopa has done that very well and in all detail right below. @sebrof: Just look at alpopa’s comment, there you find anything you need to dual-boot.

1 Like

Linux and Haiku already can be booted with Haiku’s BootManager, rEFInd and GRUB (1 or 2). I personally configured all these scenarios.

As @PulkoMandy mentioned, Linux complicated things, but actually GRUB would be much easier if it would not be managed by Linux. And as it was mentioned by @humdinger, the only way to boot Linux kernel (non-efi) is via some Linux aware bootloader (ISOLINUX, LILO, GRUB). The only thing to keep in mind is to install this loader to linux partition rather than to whole disk.

Configuration-wise, there are several possibilities:

  1. BIOS / MBR system
  • Using Haiku’s BootManager:
    Make sure GRUB is installed in partition, not in whole disk. Usually this is an option during installation time (it may be hidden somewhere in advanced options). For this, use:
    grub-install /dev/sda3
    rather than
    grub-install /dev/sda
    (sda3 is the 3rd partition of the first disk, this should be the partition where Linux is installed, sda is the whole first disk). This can be done manually after Linux installation.
    After this step, boot to Haiku and (re)install BootManager. No configuration is necessary.
  • Using GRUB
    Linux will of course configure GRUB to boot itself. In order to boot also Haiku (if is doesn’t detected), add the following lines to /etc/grub.d/40_custom file:
    menuentry Haiku {
    set root=(hd0,2) # 0 = first disk, 2 = 2nd partition, the Haiku partition
    chainloader +1
    }
    After that run inside Linux update-grub.
  1. EFI system
  • Using Haiku’s BootManager or rEFInd
    Ensure GRUB is installed in Linux partition as above. After that (re)install BootManager or rEFInd. Usually little or no configuration is necessary.
  • Using GRUB. The procedure is identical to GRUB for BIOS / MBR system.
1 Like

Good day,

Actually, there is always the simplest option which is install Haiku onto an external USB HD and tell the BIOS do default boot to External USB Device. That way no need to touch any GRUB or whatever.

Then again, I’ve found that running Haiku off an USB pendrive causes temporary lockdowns due to presumed write/read cycles at the same time making Haiku not responsive for some seconds. Not sure if due to pendrive not being UASP compatible, or whatever, as running Linux off the same pendrive does not present such issue, or at least doesn’t seem to be present.

Anyway, with an USB 3.1 or 3.2 external drive connected to an USB 3.1 or 3.2 port should be fast enough, being transfer rates at 6 to 10 Gbps, and SSDs around 560 MBps.

Actually, that is what I plan to do: remove the multiboot and boot each OS from its external drive when needed.

Regards,
RR

I’ve experiences the sam running off USB 3 pendrive. It must be a xhci issue as other OSes run without lockups. @waddlesplash any idea?

2 Likes