I have encounter a little trouble about it at the chainloader line
I had due to create a variable with the path before this chainloader. Something similar to it:
I suppose, you did not write it as it is written here. <EFIBOOT partition UUID> needs to be replaces with uuid code of that partition. You can find it out from Debian Terminal by issuing:
ls -l /dev/disk/by-uuid
and search for partition where EFI resides. Then copy it to /etc/grub.d/40_custom file (or whatever you use to configure Grub2) and it should make the trick.
Additionally, Grub2 gives you an interactive shell to try all these commands and see what it finds. For this, in Grub2 press C to enter the command prompt. Use <TAB> for auto-completion and try all the commands between { and }. Finally, if the efi file was successfully located and loaded, in prompt, issue:
Thank for your explanation, but it work like I wrote in the first post.
Maybe the official web page need little update here about Grub2 commands, cause I had following this guide: https://www.haiku-os.org/guides/booting/
That’s when I encounter the trouble.
So, you propose in User Guide about booting Haiku with Grub2 to change from:
chainloader ($root)/EFI/haiku/BOOTX64.EFI
(which apparently does not work) to:
chainloader /EFI/BOOT/BOOTX64.EFI
?
Does ($root)/EFI/BOOT/BOOTX64.EFI evaluate to something like (hd0,0)(hd0,0)/EFI/BOOT/BOOTX64.EFI (just a guess). Can you try it in Grub2 interactive prompt? It may be a Grub2 bug. Or it may mean the Haiku documentation really needs a correction.
I don’t think the documentation is wrong as such, the problem is more that configuring grub2 is needlessly hard, and there exists little information in Haiku since nobody really bothers to do it.
“Make grub2 boot this .efi file” should not be such a hard problem, really.
The common advice here is to use another software that does make this easy, like rEFInd. Which can just find efi files on it’s own and boot them. Linux can be booted from rEFInd without grub2 aswell. Either wirh gummiboot, kernel-as-efi-stub etc.
Yes it is. But outside of Linux it is basically not used because of the complexity, many linux distros even have alternatives but choose to use grub2 always because they don’t want to support two “different” bootloaders. Despite EFI and bios booting beeing very different. : )
Just my 0.02 but you might find it easier to install rEFInd, since it happens at a level above and it’s very easy to configure. Especially when Haiku itself makes it so easy to work with the EFI partition
The 2 echo seem to feedback the same line but it’s appear really quickly on my screen.
And Maybe I have just made a type error cause now it work without prefix as in this screen:
I will restart again the computer for a new test of this file…
ok it work with this code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# for BIOS systems
menuentry "Haiku" {
load_video
insmod part_msdos
insmod chain
search --fs-uuid --set=root 1C93-8EC3
chainloader ($root)/EFI/haiku/BOOTX64.EFI
}
You are welcome, I am glad to see it works and User Manual is correct. Just 2 more cents to the discussion:
You can enter in Grub2 prompt by pressing C button when in Grub menu. And there you can run whatever Grub2 commands you want to research your system configuration and bootability, <TAB> for autocomplete is of great help here. When in prompt, you can also see the result of your commands, including echo, without worrying about messages quickly going away.
Usually Grub2 automatically loads all modules it needs, but you can help it or speed loading necessary modules when doing it explicitly. I see you load module part_msdos. This one is responsible to recognize MBR partitioning scheme. However you probably have GPT partitioning scheme with dedicated EFI partition. In this case insmod part_msdos is useless, instead you can use insmod part_gpt.