After Beta6 install, device will only boot if the installation SD is inserted

i’ve just got B6 installed on an old MinisForum gn34 computer but have the following problem:

If the USB stick from which it is installed is not inserted, it won’t boot - it’s going straight to BIOS and the hardware key (F7) to select a boot option lists only an old/stale “Ubuntu” entry.

If the USB stick it was installed from is inserted then it boots to the installed Haiku rather than booting into the installer.

What mystical invocations can be performed to get it booting without the installation disk plugged in?

PS: i don’t mind reinstalling and repartitioning or the like. It’s currently one big BeOS partition.

PS: and how does one boot into install mode again? It’s now always booting to the installed copy, despite booting from the USB stick.

That looks like your installed Haiku system is missing the bootloader.
Do you use BIOS or UEFI for booting?
If you’re using BIOS (often called CSM or Legacy boot),open the Installer,select the disk you installed Haiku to and in the Tools menu,click Write boot sector.
If your device supports both BIOS and UEFI,you should prefer BIOS as that’s easier to get working after you already installed Haiku.
If your device supports only UEFI,there’s unfortunately no other solution except deleting your Haiku partition,then create a small FAT32 partition for the Haiku bootloader and with the rest of the free space,create a BFS partition for Haiku and install it again,then copy the contents of the USB Sticks FAT32 partition to the one on your harddisk.

Thank you!

Do you use BIOS or UEFI for booting?

No clue. i booted and tapped next-next-repartition-next-done-reboot.

open the Installer,select the disk you installed Haiku to and in the Tools menu,click Write boot sector.

The installer does not give me such an option now. i can only select the installed copy a source and the USB stick as a destination.

If your device supports only UEFI,there’s unfortunately no other solution except deleting your Haiku partition,then create a small FAT32 partition for the Haiku bootloader and with the rest of the free space,create a BFS partition for Haiku and install it again,then copy the contents of the USB Sticks FAT32 partition to the one on your harddisk.

i seem to recall the system being able to do both but i’m a complete zero when it comes to UEFI. i’ll try this approach - it sounds promising.

The problem, though, is that i cannot boot into the installer anymore and the installer of course can’t overwrite the running system.

You should see if you’re using BIOS or UEFI boot in your BIOS menu.
Make sure there that Legacy mode or CSM or Compatibility mode is enabled if such a option exists,and make that the highest boot priority.
Maybe the BIOS bootloader is already correctly installed to your hard disk,but not used due to wrong BIOS configuration.

It turns out that this system has two drives - a 64gb emcc where the mysterious stale bootloader is hidden away and a 256gb nvme where the OS was installed. The B6 installer is not showing the emcc, so i’d forgotten it’s there. (B5 previously installed without this issue, curiously enough, but i accidentally nuked my b5 installation when selecting the wrong partition as a target for “dd”.)

So what i’ve done is:

  • Boot from a Linux stick to wipe out all partitions on both the emcc and nvme
  • Set boot mode to legacy
  • Boot from Haiku installer
  • Select the nvme as the target (the emcc doesn’t show up as an option)
  • Install
  • Shut down… and it’s now stuck on “Tidying up” since about 5 minutes. So…
  • Hard reboot. Unplug the USB stick
  • Nope - it’s booting right into bios because it doesn’t detect anything bootable.

i’ll give it another try tomorrow.

Here’s what worked for me:

  • Boot from a Linux stick and delete all partitions on the two internal drives
  • Add a 128mb UEFI partition to the nvme
  • Copy all files from the B6 installer’s UEFI partition to that one.
  • Shut down
  • Ensure that boot mode is UEFI (it had been toggled several times while experimenting).
  • Reboot from the B6 installer
  • Click click click…
  • Reboot without the B6 installer plugged in

Now it boots from where it’s supposed to. No idea how, though - UEFI is still black-box to me.

1 Like

The computer sees the UEFI partition,it locates the EFI executable at the standard location.
That EFI executable is the Haiku bootloader,which then searches for the first bootable BFS partition it finds,and starts Haiku from there.
I don’t know all the technical details either,but from a end-user perspective setting up UEFI boot with Haiku is easy,as you surely have found out.
You only need the UEFI partition with the files from the Haiku USB stick,the rest will just magically work in most cases.

“The problem” is that that apparently cannot be done from within the Haiku installer boot. i had to fall back to a Linux booter to get the partitions straightened out and copy the UEFI files. That, admittedly, may also be ignorance of Haiku-fu on my part.

In any case, it’s all working now :). Thank you for the tips!

EFI supports PE executables (i.e what Windows has) on a Fat32 (or fat16) partition with the right parttition type. (ESP)

If you put a bootloader onto the drive in a location the firmware considers for booting it will just load this bootloader and hand over control.

EFI also supports a bit of machine-specific state like efi runtime variables, these control stuff like where it searches for bootloaders and such. If there is no bootloader in a location indicated by an efi variable it will instead pick the fallback location.

From an end user perspective I think this is much nicer, you go from “write the bootloader to a magic place in the partition table with special tools” to “mount this partition and copy a file”.
I think the latter is much easier to understand, especially when it ammounts to “just copy partitionA files to parittionB”

It can be done on Haiku from the installer USB stick.
The only thing that doesn’t yet work is automatically setting up the UEFI partition for you.
I think even copying the contents to the partition can be done directly in the installer application now (is it in the Tools menu?),there was a change for that recently,but not sure if it’s in Beta6 already.

From Installer media :

-> for BIOS mode boot : you can run bootman Haiku boot manager installed.
It is featured in Installer’s menu as first item. bootman installs into the Haiku installment
drive MBR with this wizard. Select the appropriate drive to install, it will create a backup
of your selected drive actual MBR, you can select and name - as you want - the bootable
partition(s), and save the config finally. For boot, the boot order should be set in (UEFI)
BIOS to select the type of drive you boot from - I assume nvme or how as it in the (UEFI)
BIOS.
At boot the bootman has a menu, now it shows one item if you just have one chunk
BFS prepared. Hitting enter will boot this Haiku from that one chunk BFS partiton.

If you prepare your Haiku drive as Installer to boot both from UEFI mode and legacy
BIOS mode as well, then I suggest to do the layout the same.
Create the BFS partition first (select the bootable tick at creation), and the smaller
HAIKU_ESP partition (select uefi as partiton mode) next, after that.
Format as FAT, and advice to name the formatted partition like ESP or HAIKU_ESP
In DriveSetup you can see how it is there on the Installer media.

-> for UEFI mode boot :
manual installment
After the Haiku install finished onto BFS partiton, do not reboot, but
you mount the ‘haiku esp’ FAT partition of the installer media, and
also mount the newly created uefi partion of your new Haiku drive.
Copy the whole content of the new drive. I alsways do this way.

Now actually there is a new method, that make it from Installer menu for you.
I had not use that, you can try if you would spare the manual steps. I do not exactly
know how it works, it may require to create the usfi partition and its formatting.
Also I assume it copy the always fresh bootloader from the Haiku filesystem, that delivers
with the actual Haiku, and when upgrade the Haiku it compiled again, so if there fixes or
improvement (and on Nightly, in some cases, may have a possible regression ) then
compiled with them.
In case R1B4, I used the old bootloader for the last days, I just switched to new one under
R1B5, when stopped loading well.
In case R1B5 era, I have copied bootloaders frequently from the filesystem to ESP
appropriate directory, renaming to the standard BOOTX64.EFI, and always kept the earlier
versions with hrevxxxxx number to be able to restore a working one if needed. In that time
I mostly used rather the Haiku Nightly, so there the bootloader changed more frequently
than in the Beta version of Haiku.

I have old laptops now, and due to more improvements in Haiku that better fit for new
hardware.
I have one with Core2 root and USB 2.0 only, so I had to gave up on new Beta6 on them. Nightly boots and however still have some issues - both 32 and 64 bit - but Beta6 now miss
so much, I do not waste my time and energy to ask fix on them, as in Nightly more of them
fixed.

EDIT :
I forgot to mention, but UEFI has also a boot order separately.
From your (UEFI) BIOS you can see the system has which boot mode(s) available, select boot mode - if there’s more - and setup the appropriate boot order for it (or them, if there’s more).
In some cases it also required to boot the installer media to put first place, and after install, redo the order when the newly installed media comes first.
It can be done in the BIOS itself only, you cannot done from any OS installer, so there’s no the installations such these operations – I mean you have to get into the firmware of your system and take care these operations there.

1 Like