Dual-booting Haiku with your other OS

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.

You need to add the ā€œ-fā€ or ā€œā€“forceā€ flag (depending on the version of grub).

sudo grub-install -f /dev/sda3
or
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