Boot process oddity

I wanted to create a multi-boot uefi system and I used rEFind Boot manager, actually it works… I think the problem is Haiku itself.
the system has windows 10 partitions and 1 Haiku r1b2 partition.
EFI partition is structured this way:

under boot there’s BOOTX64.EFI (already there from Microsoft) and HAIKUBOOTX64.EFI which I put there (I even tried with an older haiku bootx64.efi which was smaller in size, with no luck)

skipping these details, the problems shows up when, in boot process, Haiku hangs on the disk icon…
If I have the Haiku dvd inside my dvd reader the boot process reads it and brings me to the installed haiku on hard drive, if I don’t put my dvd inside it hangs there (on that icon)…
Any suggestion?

Maybe you have to force some boot option?

Did you setup and install Haiku on a BFS partition on the disk?

I’m wondering which one… It seems none of them are involved

Yes the system is regularly installed on a bfs partition, and the system boots from there, but for some strange behaviour it needs the haiku’s dvd, it reads few things and stops reading the dvd for the rest of the time the system is up.

Ok, I enabled this function “Enable on screen debug output”
and realized that a lot of atapi error appeared… so I thought that there was a problem with the new dvd-rom reader. It seems that any CD/DVD inside the reader allows the boot process (not only the haiku one). On the contrary it halts the boot process… the errors I saw was like:
ata 2 error timeout waiting for interrupt
ata 2 error recoverlostinterrupt:lost interrupt, status 0x50
or errors like
atapi 3-0 error: invalid target lun 1 2 3 4 5 6 7
and others…

atapi 3-0 is the dvd

the model is HL-DT-ST DVDRAM GH24NSD5
Is a problem of this drive or should I file a ticket with syslog?

Check ATA component on Trac:!closed&component=Drivers%2FDisk%2FATA

I’ve played around with bios sata settings and after switching from IDE to AHCI (a compatibility setting?) I lost the reFInd boot loader (why?) as windows started automtically. So changed Sata cables layout (because I wanted to set first 3 sata ports to AHCI and the last 3 to IDE, to see if haiku boot error was related to this compatibility setting and in hope that reFInd will come back as it gone). No way reFInd turning back (maybe the windows boot loader overwrote something, reFInd files and haiku efi loader still present in EFI boot partition). So set all 6 sata ports to IDE as it were at the beginning and I decied to reinstall reFInd and magically now Haiku boots without problems (Why!?!?!).
In the end what I did is only swap some sata cable position (at the beginning sata 1 was disk and sata 2 dvd, now sata 1 disk and sata6 dvd).
Anyway I catched a syslog. If usefull I can put it on Trac.

@Diver It seems none of them matches the case, I’ll try to change again sata cable position to let the error spawn again as soon as possible (if it will ever show up again)

AHCI and IDE are not compatible. Once you have a setting, and the drives are partitioned and formatted with it, you have to stick with it. There are several BIOS’ that will give a warning about this if you try and change it, but I’m guessing yours isn’t one of them.

You can switch to AHCI and re-partition and re-format your hard drives if you wanted to.

This is only relevant for Windows, though.

There can be times when making the switch will kill grub. Re-installing or updating grub will generally fix it, though.

Switching to AHCI would be a good idea if possible, however. IDE mode would be useful only if you need to run old OS without SATA support.

I have UEFI Boot Manager with Ubuntu, Windows and Haiku.
You must install All of systems in EFI Mode.
Make a folder, for example, Haiku at EFI on first Partition with EFI files.
and make a progress with ->
Copy BOOTX64.EFI to folder Haiku Efi boot
Edit file

# for EFI systems
menuentry "Haiku" {
	insmod part_msdos
	insmod chain
	search --fs-uuid --set=root <EFIBOOT partition UUID>
	chainloader ($root)/HAIKU/EFI/BOOT/BOOTX64.EFI

Make a grub-update

Wła la :wink: done.

Thank you for your suggestion, these examples are always helpful. I have grub on other systems, but this one, due to disk space, don’t have linux, this is the reason for choosing to install refind. It would have been nice if there was a way to create a boot manager whitin windows
@PulkoMandy I’ll try to play more with ahci on that system maybe tomorrow.

Although Grub is usually installed during Linux installation process, it can be used independently from Linux. There is SuperGrubDisk2 which is just Grub2 installation without Linux. You can copy its content to some partition and install it from within Grub shell. Grub really does not imply any Linux binary to be installed, configured or used.

P.S. Novadays I always install Linux without any bootloader and just modify my separate Grub install to boot new Linux.

So it would be possible getting a program for haiku to use and config grub?

Btw I still have a patch to os-prober to autodetect Haiku on Linux but it seems nobody is interested in testing it


Grub is executed before any kernel is even loaded, so there is no such notion as “porting Grub to some OS”. Of course Grub can be also used to boot Haiku.

Should Haiku have Grub in its repositories? It will probably not happen still Grub is GNU’s software with GPL license.

A program in Haiku to use and config Grub should in essence generate grub.cfg and place it in Grub partition. It probably can be written in Yab.

Well, porting here would mean porting the install scripts (fixing paths and linux-only tools it uses…), and GPL isn’t really a problem anyway for userland tools.

OK, I see. I never trusted Linus’ OS prober and always wrote 40_custom by myself. But then I found that the result that really matters during booting with Grub is just grub.cfg, so manually editing this file saves me from the need to run update-grub whose purpose is just to read Linux input and write Grub output.