Dual-booting Haiku with your other OS

It was a few months ago, after your fixes. There were not errors in syslog. I will check again, tho.

This is likely #15585.

Good day,

Not sure if it’s the same @X512. I can’t remember now if the Haiku on the USB drive is UTD to the latest hrev.

I should check again to see if its the same issue you pointed out or if it’s a different one. In my case, it usually happens when I download something from Web+ (big OS ISO file) and try to access the HD (the USB pendrive) at the same time, thus I presume is read/write conflict, but need to check and test properly to report. Hopefully will have time this weekend if it rains.


Thank you to those who made suggestions re booting. I’m having a busy week, but will try them out at the weekend.

Sorry not to have responded earlier Sometimes life gets in the way of one’s plans.

I am using three flavours of Puppy Linux - Tahr, Slacko, and Xenial. The first two on 32 bit machines.

Apart from wanting a fall-back OS for those (increasingly rare) occasions when Haiku can’t do something, I have a small project on the go. For reasons I won’t explain (call it Magpie Syndrome) I have a number of old Thinkpads that I need to sell, and I thought it would be good to put a choice of OS on them.

It’s a small way to spread the word about Haiku. Having the ability to directly compare Windows, Linux and Haiku is an excellent way to demonstrate how fast and elegant Haiku is.

No problem, same here. :wink:
Just had to take a look at puppy linux, Tahr and Xenial seem to be Ubuntu based or compatible, so the little tutorial in alpopa’s comment in this thread should apply. On Slacko the grub configuration might be in a different file but the basics remain the same on any linux

Sorry, I forgot to mention the sources of the Puppy variants.

Of the three, Xenial is the best, but I’ve never been able to get it to work on the 32 bit machines.

The Puppy family is quite impressive, and has a superb community, but at the end of the day it’s still Linux, with all the pluses and many minuses that that entails.

It’s because of the minuses that I found myself here, and I have to say that I have huge hopes for Haiku. Progress might appear to be slow, but given the modest number of active developers, it’s actually remarkable. I think that those developers, who are modest in more ways than just their numbers, don’t fully appreciate what a wonderful thing their creation is - and what a future it has.


Sorry to bump an old topic, but I found this thread very helpful when dualbooting Haiku and Linux, and I wanted to share how I did it. I configured an old ASUS VivoBook S400C to dualboot Haiku and Pop!_OS 22.04.

Pop!_OS 22.04 uses systemd-boot rather than GRUB, so the steps are slightly different than what I found here.

I mostly combined the steps from the following tutorials to set this up:

  1. Install Pop!_OS on a clean drive. Choose custom installation and partition the drive (it’s easier now than after installing Linux). Make sure to leave a partition for Haiku. On my 1TB drive I used the following setup:
  • 1GB - /boot
  • 100GB - /root
  • 100GB - /haiku
  • Remaining - /home
  • 4GB - swap (at the end of the disk)
  1. Install Haiku from bootable USB. Use DriveSetup to format the space you reserved for Haiku. Format it as BeFS partition.

  2. Remove the USB and reboot the computer. It will boot to Pop!_OS.

  3. Mount the HDD’s ESP partition (the first partition) to /boot directory. Execute command sudo mount /dev/sdxy /boot, where /dev/sdxy is the ESP partition, something like /dev/sda1 or /dev/sdb1, etc. Now the /boot directory will contain all the systemd-boot files.

  4. From Haiku’s USB installer, mount the USB’s EFI partition (there is a small FAT32 partition on the USB) to any location. On that FAT32 partition there is a BOOTX64.EFI file, which is the Haiku’s boot loader.

  5. Copy BOOTX64.EFI somewhere you can access it in a moment (e.g. your /home folder).

  6. Edit systemd-boot’s global configuration file /boot/efi/loader/loader.conf and insert (if not already there) a line at the beginning of the config file: timeout 10 . This will make the boot loader’s menu stay on screen for 10 seconds before it commences with the default entry. You can also show the menu by holding or spamming the space key during POST.

  7. For the next steps you might have to enter sudo su to be able to create and edit files as super user.

  8. In the /boot/EFI directory, create a subdirectory named haiku-project. Run sudo mkdir /boot/EFI/haiku-project

  9. Copy the earlier saved BOOTX64.EFI file /boot/EFI/haiku-project. cd to where the BOOT64.EFI is and run sudo cp BOOTX64.EFI /boot/EFI/haiku-project/

  10. Create a config file for the Haiku in the boot loader with filename haiku.conf. Run the command sudo nano /boot/loader/entries/haiku.conf. The config file should contain the following lines:

title Haiku OS
efi /EFI/haiku-project/BOOTX64.EFI
options root=PARTUUID=<Haiku’s partition PARTUUID>

You can find the Haiku’s partition PARTUUID by running the command: blkid in another terminal window

Run sudo umount /dev/sdxy to unmount the esp partition and reboot the system.

You should now be able to choose between Linux and Haiku when the computer boots.


FWIW, I made a patch for os-prober to detect package_manager installs properly years ago, but nobody cared enough to test it and report back so it’s likely not merged yet:

Oh, seems @agmsmith updated that… Well, maybe if someone tries and report it it will finally be merged?

But now we have the problem that Debian disabled non-Linux detection “because security” so you have to got edit an obscure config file to enable it back :frowning:


Is this why other Linux distributions still aren’t detecting Haiku?

yes, they all reuse the work from debian os-prober

I tried this and got no luck.

mika@mika-desktop:~$ grub-install /dev/sda3
Installing for i386-pc platform.
grub-install: error: cannot backup `/boot/grub/i386-pc/gcry_seed.mod': Permission denied.
mika@mika-desktop:~$ sudo grub-install /dev/sda3
[sudo] password for mika: 
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

It’s especially weird considering that /dev/sda3 is ext4 in my case, not ext2. And it has Linux installed on it, just like in alpopa’s guide.

Also, don’t look at /dev/sda2 marked as /boot/efi. My PC for sure isn’t (U)EFI, it has old blue BIOS and IDK why is it marked as EFI. Weird…

There’s also an option using GRUB, but I’m not sure where GRUB should be installed for it and which steps should I complete to go from single Xubuntu system to dual-boot Haiku R1/Beta4_rc1 + Xubuntu. Including the step where I actually should install Haiku (and where?). I (and maybe other (X)Ubuntu users which want to use Haiku as well) would really appreciate a detailed step-by-step guide like that.


You need to add the “-f” or “–force” flag (depending on the version of grub).

sudo grub-install -f /dev/sda3
sudo grub-install --force /dev/sda3.

There are 2 types of system firmware: old BIOS and new EFI. There are also 2 types of partitioning schema for HDD (which we are interested in): MBR and GPT. Typically, MBR is used together with BIOS and GPT together with EFI, and some software (e.g. Windows) make use of it.

In your case you have BIOS, as you said and GPT as I can see from your screenshot. It may help to convert your HDD to MBD partitioning and removing EFI partition (sda2). With gdisk this can be done without loosing data. Alternatively, you can use GParted to re-partition your HDD with MBR partition schema. Of course, you need to boot from some live media, not from HDD to do this.

So, your MBR partitioning may be something similar to the following:

  • sda1 7.63 GiB linux-swap
  • sda2 165.71 GiB linux ext4
  • sda3 50 GiB haiku befs

From within Linux sda is a whole disk where MBR resides, and where Haiku bootmanager would be installed.

From GRUB’s perspective, ext4 is identical to ext2 (use the same driver).

hmm, you sure? I’ve got EFI and it’s blue, I have it set to boot as BIOS though
also, if you have Ubuntu installed, you should have GRUB already regardless if it’s EFI or BIOS, so just do those steps. as to where to install Haiku to - man, you have like 50 gigs of free space on sda3, just resize it and make some space for the haikk. how to? use gparted on some linux liveusb or livecd, you can’t really do it on your running system.
so again, in step to step:

  1. Get a linux live thing, if you have a livedvd/usb from installing xubuntu that should work

  2. Boot into it, if it asks you if you want to try or install, pick try

  3. Run gparted, right click on /dev/sda3, click something alike to Resize/Move (I have it in Polish, so that’s my translation), slide the thing from the right to left but not all the way - you probably want to still have some free space on the Linux part.
    I gave it ~21 gigs (~21000mb) , depending on your usage you might be extra generous, though between 8 and 16 also might be ok if you aren’t really gonna install stuff - in any case after installing Haiku you can’t really resize the partition, so make your mind here.
    After pressing resize, you can accept with the green ✓ or go back with Ctrl-Z (or you have the yellow thing to the left as well (I don’t have that))
    Then you wait… and when it’s hopefully done and everything’s ok, you can close everything

π. (I just do that sometimes, optional). Maybe reboot into Linux, let it understand it has smaller space, maybe it wants to fsck

  1. OK, now back to the action - you have the Haiku install thing? boot from that and get installin’. you probably did it already in a vm, but yeah, make a BeFS partition in place of empty space you freed in the step 2, install Haiku on it.

  2. After you’ve installed it, reboot to your Linux on your disk (not live thing), edit /etc/grub.d/40_custom and add

menuentry "Haiku" {
	set root=(hd0,4);
	chainloader +1

at the end. Text editor run with sudo, if you don’t it will probably complain about lack of permission. so like, sudo nano /etc/grub.d/40_custom, you can replace nano with your text editor.
it probably is (hd0,4) for you, might be (hd0,3), generally it\s (hdX,Y) with X being a disk number and Y being partition number, but for now don’t really worry about it, you can change it at any moment.
edited, lines added? run sudo update-grub and reboot

  1. After that reboot, you should see the GRUB2 menu and Haiku option, try to boot from it. Works? Great. Doesn’t work? Press,(I think) E to edit, change 4 to a different number, press Ctrl-X and if it boots, then you know what number that should be, so then you can reboot to linux, edit that number in that file and update-grub (with sudo).

ok that’s pretty much it, hope it helps, though also there is this Installation Guide | Haiku Project, but I’ve wrote this already so maybe my explanation helps more somehow

1 Like

I’m sorry, but I already fixed my issue:

Will update my message in this topic.
Also, can you copy-paste your solution to the topic I linked? I’m keeping it as a little MBR-GRUB solutions collection so other people can find that topic, read multiple different solutions and fix their dual-boot issue :wink:

UPD: oops, it seems like I can’t change that message. That’s… really unfortunate. I’ll need to reply to every solution manually…

1 Like

Why is swap first in this disk/GUID table? The first should be the EFI volume, which is usually the convention most systems follow by default

The location of the esp is irrelevant, that is one nicer thibk of efi that we don’t have to reserve some special section anymore.

The haiku anyboot image has the esp at last position for example (though this should change if we finish the bfs resizing code at some point, so the installer medium can directly become the inszalled OS)

I get it isn’t a GPT requirement to have it in the first position (I have a Mac with 9 different operating systems on it), but traditionally speaking Windows, macOS, OpenIndiana and most major Linux-based systems like Fedora and Ubuntu place it in the front. So conventionally speaking, this is where I was saying the EFI system volume or ESP should be in the front, it seems off imho to have swap space be the very first one — but I also know it doesn’t have to be this way either, sorry I was pushing my own preference in my last comment and I probably shouldn’t have said it

Thanks for the info. :slight_smile: I, too, didn’t know that.