Installing a bootloader

I’ve put Haiku on a hard drive using the .iso image a few times, but one thing always stumps me: getting the bootloader to where the computer can see it.

Apparently copying files from a BFS partition runs the risk of corrupting the destination partition, and I don’t want to ruin the setup I already have (a dual-boot of Windows 10 and Xubuntu). Which leaves me at an impasse: no other system can read Haiku partitions, so how do I get the file safely from the Haiku installation to my boot partition?

It doesn’t help that Haiku doesn’t have the lsblk command either.

Which bootloader? If it is the efi one you can copy it from the esp partition of the installer, which is fat32 formatted.

If you need the mbr bootloader then write it with the live installer

It’s the EFI one. Thanks for the prompt reply.

Little hiccup: I used Ventoy, which means I just copied the .iso image to a USB stick. Where do I find the appropriate file in said .iso image?

an iso image is special disk image, if your OS provides this you will have to mount it somewhere as a loopback device to make the internal partitions visible, and then mount it.

The easier option is to boot from the haiku installer and copy the file from the installers esp to the hard drives esp directly.

That assumes I know how to identify the esp from Haiku…which I don’t.

it‘s named appropriately :slight_smile:

Alternatively open the partition manager and check the partitions for their type and filesystem.

Where do I find the partition manager? Do you mean DriveSetup? Also, it appears as /dev/sda1 on Ubuntu; that’s probably a good starting point…

Not really, haikus file paths are different, the only relevant info is that it is partition #1 here.

Haikus paths are /dev/disk/usb etc.

But really, using deskbars mount menu should make it obvious which one is to mount… Haiku does not need as much terminal stuff as linux.

Yes, drivesetup is the application to view disk layouts with. (or edit it)

The partitions are named “Haiku” and “Haiku ESP”, no way to miss it.

If you go Haiku, just “Try” instead of “Install”, right-click on the desktop and choose from the mount submenu.
Captura desde 2024-05-23 19-21-16
Captura desde 2024-05-23 19-21-47

If you don’t and you are not keen on the command line, just insert the USB with your preferred system booted. If it is not automounted, go to wherever the disks are shown in that system or fire your preferred disk utility (gnome-disks would do) and mount it from there. You can do the same with the iso.
Captura desde 2024-05-23 19-23-47

I meant my computer’s esp, but yeah, Ventoy has its own boot partition. Starting to think I should use something else to reduce the number of surprises.

Still the same but pointing to your computer disk. If using Haiku and the partition doesn’t have a recognizable name or you are not sure, scroll to the right in DriveSetup to see the partition types. The EFI one should be “EFI system data”. You can mount it from within DriveSetup.

Any way I can take a screenshot and show you what the situation is?

The PrtScn key.

You don’t have to copy the bootloader from Haiku, you can do so from any of your other systems if you feel more comfortable there. I don’t know about Windows, but I guess Xubuntu has the same gnome-disks utility I used in my screenshots, so you can get it from the iso or the usb and put it in your system disk EFI partition, which is probably already mounted under /boot/efi.

Okay…thought only the bootloader from Haiku could boot Haiku? Or at any rate, I have to copy the .efi file?

1 Like

Yes, that’s it.

Have you had a look at UEFI Booting Haiku | Haiku Project? You will have a “system” partition where the different bootloaders will be and should already contain the ones for Windows and Xubuntu, and select the appropriate one on boot from the firmware (or have a general one like grub, refind or the like that will manage the others).

I’m definitely confused. I have GRUB installed; I have an entry for Haiku; what I don’t have is a way of pointing GRUB to Haiku’s .efi file. Which is why I’m trying to copy it to my esp.

Not so much confused, then. That is exactly what you need. Get the efi file from the iso/usb, put it in its own directlry in the EFI partition of your system disk, and tell a menuentry in the grub config to load that.

And therein lies the problem: how to mount or extract or generally get at the image’s contents, which, as I said, is awkward because said image was copied, not extracted, to my USB stick.

It’d be so nice if I could just grab the one from a Haiku installation…

Again, you have the iso. Use gnome-disk to mount the EFI partition from the iso file. Got screenshots in a previous message.