[SOLVED] Confused about efi dual linux/Haiku booting

I have been dual booting linux and Haiku beta5 on a Thinkpad 11e.
Before installing Haiku, I shrank my linux (btrfs) root partition to make room. Then I booted Haiku from the USB stick, created and formatted a new BeFS partition in the empty space, and installed Haiku on it.

So, I think the partition layout is:

sda1 is EFI (FAT32)
sda2 is Linux BTRFS
sda3 is BeFS

I am using rEFInd boot manager, installed from Linux. (In the past, refind has saved so much confusion…I hate grub: so many files and bizarro rescue shell!) Anyway…

I copied bootx64.efi from the USB stick into the hard drive’s EFI/Haiku folder.

Starting up, there’s Haiku on the refind menu. I choose it and (I think) it chainloads Haiku’s boot manager. But the Haiku boot manager screen says “Cannot continue booting (Boot volume is not valid)”

If I press enter on the first choice to “Select boot volume/state”, I get a menu where Haiku is listed twice. If I pick one I get a list of snapshot dates with Latest at the top. If I pick Latest (or anything) the screen just blinks and I think reloads.

If I choose rescan, I have the option to continue booting and Haiku finally boots normally when I press enter on “Continue booting.”

I have not made any customizations to refind.conf. If have found rEFInd is pretty good at finding kernels and root filesystems without any help from me, at least with Linux and FreeBSD.

Last weekend, I installed Ubuntu alongside Windows, install grub2 as bootloader, then install Haiku, copied the /system/data/platform_loaders/haiku_loader.efi from the USB stick into the EFI partition, added a menu entry to load it, Haiku boot smoothly.

My partition layout:
0 EFI (fat32)
1 Windows reserved (unknown)
2 Windows system (NTFS, C:)
3 Ubuntu (ext4)
4 Haiku (befs)

Reference to:

1 Like

There’s no need to install GRUB,which is really awful and frustrating as you already found out,rEFInd is supported well and often recommended for multi-boot setups with Haiku.
If you get to the Haiku Bootloader,it’s unlikely that the issue has anything to do with rEFInd at all.
It’s more likely that your partition isn’t setup correctly.
Only a few weeks ago,there was nearly the same question here and it turned out the partition type wasn’t set to BFS,but I think Linux data or something like that.
If that’s the case,you can still format the partition as BFS and have a bootable system,but the Haiku Bootloader will not find the right partition,as it only looks for BFS.
Please recheck your partition setup and change the partition type to BFS if it’s now anything else.

It’s true, I encountered same issue last week, I reinstalled Haiku and reformated the partition to BFS, after that Haiku boots fine.

Is there something like fdisk which allows me to view/modify partition type or do I have to reinstall?

There is the DriveSetup utility.

2 Likes

Obviously you can’t change the type of a partition currently in use. So, to use DriveSetup, you will have to boot on another drive. Ie. the one that you used to install.
But since you have dual boot, you can use fdisk and “t” to modify the type of a partition.

Yes, I know that. It looks like there is no way to change the partition type in DriveSetup, as far as I can see. Other than deleting and recreating a partition…

I meant was there a Haiku-native command line app similar to Linux’s fdisk. I guess not.

Is there a way to get a list of installed packages and turn it into a shell script for easy reinstall? Haiku Depot is cumbersome.

Wait a sec. I can use Linux’s fdisk to modify the partition type? What number do I pick for BeFS?

Oh, nevermind. I see it 0xEB for BeOS.

1 Like

Use Installer from your system to install Haiku on a USB drive, then boot from the USB drive, do whatever you need with DriveSetup and install from the USB back to the hard drive. The USB install will contain all packages installed on your system so no need for lists or anything.

2 Likes

/system/packages/activated_packages

I doubt a reinstall will fix your issue however…

No worries. Setting partition type to 0xEB did the trick.

1 Like

I tried to do it via Linux’s fdisk from my Debian partition (I was too lazy to burn another haiku bootable usb), and the 0xEB didn’t work for me, now Haiku doesn’t boot at all.

Honestly, I don’t know why this flag is not set automatically during the creation of the BeFS partition and installation of Haiku. I had the same problem in the past, and apparently a lot of other people too, judging from this forum.

This needs to be automatic during installation.

1 Like

Yes, it should be. There is a ticket here: Making sure you're not a bot!

Nobody has fixed it yet.

Eugenia, a blast from the past.

I hope you are doing well. I saw JBQ’s linked in profile (or another social site) that he’s moved to greece, is it safe to assume you’ve moved as well? After Covid, I moved from Australia back to Serbia. Every July we visit Neos Marmaros, its beautiful. Take care.

Hi! Yeah, I’m back to Greece. Great to hear from you! :slight_smile: We should get together this summer, maybe in Salonika.

The partition type is set during the creation of the partition if you create it with DriveSetup. It is not set if you use an existing partition and simply reformat it, because partition types and filesystem formatting are different things.

I don’t know if the user interface just makes this confusing, or maybe these are things we could expect computer users to know and understand in the 1990s, but not anymore today (which is a good thing - using a computer should be easier than that, and people shouldn’t need to worry about such details).

Anyway, yes, it should be fixed by adding an “automatic” mode in Installer as detailed in the bugreport (already linked here).

1 Like

Most of the time, the partition probably already exists, because no one I know uses Haiku as the single OS in a computer. I run it along 4 other Linux distros, I think this should be set automatically. I mean, what’s the use case for not setting it when you’re installing Haiku or formatting as BeFS?

I don’t know anyone that dualboots Haiku personally, but that isn’t really the issue here. If the “manual” path is taken some knowledge is required, for the Installer it should either refuse if the partition type is wrong, or fix it. The automatic mode will do everything, but probably not make it easy to dualboot.

Do you use GPT or MBR? If it’s GPT, I’d suggest to use gdisk and set the type to EB00

Something like this:

gdisk /dev/sd…
p    <-- list partitions and their numbers
t
…    <-- BeFS partition number
eb00
w
1 Like

Maybe Installer could just warn (before or after installation) if the partition type is wrong, and suggest to make it compatible with Haiku?

2 Likes