Dual-booting Haiku with your other OS

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

Check your syslog and see if it has errors in it. Also, was this recently, or not? I made a lot of fixes to the XHCI driver a month or so before beta2 which resolved a lot of that kind of issue.

If there are no errors in the syslog, then it may be related to the fact that the usb_disk driver does reads all-at-once, which can indeed lead to lower perceived performance as large reads block smaller reads.

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.

Regards,
RR

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.

3 Likes

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.

9 Likes

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:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732696

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:

4 Likes

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.
mika@mika-desktop:~$

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.

Thanks.