Last Rant for the night

This is not the first time I have installed Haiku. But it also isn’t the first time that I have had a great deal of trouble. I used the installer and followed the directions here: https://www.haiku-os.org/get-haiku/installation-guide. But it will not boot from HD. I get no errors, I run the “install boot code” and it says successful, I try to install bootman and it too says successful. Acording to the Haiku Installer absolutely everything went just fine. Except it won’t boot. I have tried every combination of GUID partition table, Install Partition table, creating a Haiku Partition on the Install Partition Table. Initializing the entire disk… nothing will work.

As far is ai know it should be MBR (pls correct me if i am wrong)
I am not shure if Haiku is working wiith GUID partition table
There some hints on this like:
https://www.haiku-os.org/articles/2009-11-18_multiboot_installation_gpt_disk
or

Yeah GUID is currently broken and EFI not merged, @jessicah i working on it, and was intending to merge this week. So for now you need to use mbr

GPT partitioning should work, although it still doesn’t generate a protective MBR, which some tools will choke on. GPT fdisk (gdisk) can easily create the protective MBR for you. However, BIOS booting from a GPT partitioned disk should still work.

Some things to note are that Haiku can get quite confused if your disk already has a partition table, and you change it. I would recommend partitioning your disk (not formatting at all), and then rebooting. After that, you should be able to format and install without issues.

Makebootable should definitely work with GPT, I’m not sure about writembr or bootman, however.

Your message isn’t very descriptive of the error. There is always some sort of error message when boot fails, which is it in your case?

There are several ways to install Haiku that will work, and several that won’t, especially if you start messing with the low level tools such as makebootable and writembr.

So, please tell us:

  • Which partition layout you want,
  • How you created the partitions and ran the installer and other tools,
  • What was the exact result (error messages and the like).

Then we can see what has gone wrong.

@PulkoMandy
I am sorry, I did finally get it to work. I created a Intel Partition Map then created a Partition using the whole drive. Then I initialized it to BFS. There was also a question during this process asking me if I want to make it the active partition. I tired both and I can’t remember at this time what setting I used when I got it to work. I assume I should set an active partition. Then I installed. I did have to install boot code for it to boot.

Also I saw a number of times where I would try to create a partition using the whole drive then install. Only to find after a reboot, and the OS not loading, that the partition that was supposed to be the entire drive was only something like 27gig. This happened a number of times.

In the end I did each step one at a time with a reboot between each one…

Yes, I have found that as well. It seems an existing partition can confuse Haiku’s installer. So, I usually just do:

dd if=/dev/zero of=/dev/disk/ata/1/master/raw bs=1M count=5

Of course that assumes my disk is ata/1/master. It almost always works. Actually, I’ve had pretty good luck using GPT when I beforehand used the dd command.

My only real point is this. I have ran into installer issues almost every time I have installed Haiku, for years now. This can’t happen when the 1.0 release is done. It has to be simple, intuitive and just work. and right now the partitioning for Haiku is just not.

@PulkoMandy - There is my real grip. At no time did the installer give me an error. As a matter of fact according to all the installer everything went great. It was only when I removed the install CD and tried to boot from the HD that the problem became known. Then after rebooting again from the CD and going into the partitioner did I see where things were wrong. It was really perplexing when I would partition, format etc the entire drive only to find after a reboot that it only created at 27gig, unusable, partition.

Well, the installer is just a 3-click process and can’t be made simpler. It will just copy all the files to a mounted partition and assume you have set that correctly for your system.

What’s a bit messy is creating said partition and making sure it can boot. We could make this a 3 click process too, but it would be a “wipe the hard disk and setup everything the way we want”. However, most people would then complain that their precious windows/linux/OSX/whatever install was erased with all the data on it.

So, we went for something a bit more manual, which allows a wide range of solutions and will get you a running system only if you do things right. It also tries to be non-intrusive and not prevent you from booting other systems.

What this means:

  • It does not replace the disk MBR, and assumes what you have there is suitable for booting (that is, a standard MBR that will boot the active partition). If this is not the case, you need “writembr” to install a suitable one. Alternatively, you can install bootman, which will add a boot menu (or GRUB, or another boot manager).
  • You need to remember to mark the Haiku partition active, otherwise the MBR will not boot it.
  • You need to remember to create your BFS volume inside a partition, and not as the whole disk (which is also possible, and used to be required on some devices, but people keep changing their mind about that).

So, the installer could warn in case the partition is not active. It could offer to install bootman if it detects some other OSes on the disk. But, I don’t think making it automatically replace the MBR and do the partition layout is a good idea, because that means erasing data from previously installed OSes, which is not so nice (it is the Windows way, however).

OK, I can see that. It would be nice if it did as much as reasonably possible… Like warn if there isn’t an active partition. What would be nice, but I am not sure is possible, is to tell the user they need to write mbr… Here is what I suspect may happen when that wonderful day 1.0 is released. People will download it, people with different degrees of technosavy and run into problems getting Haiku to work. I think this would give those people a bad first impression. Which is sad because once it is installed, it is a wonderful OS. So much easier to just pick up and use than any Linux distro I have ever tried.

I do like that you haven’t taken the Windows way to do thing with a shedge hammer. On the other hand, that is what most people are used to and expecting… If there was some way to give the user more guidance during partitioning I think that would be a tremendous help. The only idea I could come up with is maybe if the fist time the partiotioner was ran, or maybe just during the initial install, some kind of instructions came up first telling the user the same things you have here. The steps they need to take to make the HD ready, in the order they need to be done… I just really, really want that first time user experience to be great.

My suggestion may be lame, and not the best idea. But I do feel strongly that some kind of guidance at this point should be presented to the user what ever form that may be.

The long text that’s shown when you start Installer has some instructions. But people mistake that for a boring EULA and don’t read it.

For the MBR:

  • If you already ran Windows, you probably have an useable one,
  • If you create the partition table with DriveSetup, it will set one up,
  • In all other cases, it depends what’s on your disk (whatever was written there by some OS, or at the factory by the manufacturer). It may or may not be appropriate, and it may or may not have useful error messages.

This problem will go away when we start supporting EFI and GPT. In that configuration there is no need for MBR and active partitions, instead, the boot loader is stored in a specific EFI partition and the firmware usually includes a boot menu to choose one OS from there (or you can install an EFI boot manager). This will make things a little simpler, I hope (there will probably be some quirks to make this more complex than it should, unfortunately).

Ahh, maybe it needs some dancing bananas to get us idiot users attention.

Some linux installers can detect what other OSs you have installed and make suggestions for partitioning/bootloader installation based on that, perhaps something like that would be useful for haiku. However, I think that requires a lot of extra work.

Exactly. I suppose I should mention that the dd if=/dev/zero of=/dev/disk… command I mentioned earlier does wipe out the MBR, any boot manager, and all the data.

I have found that the installer can become confused (especially, it seems (from a small number of runs) - that this is true if the previous installation on the disk was made with FreeBSD, using GPT). Usually, I am coming from that OS, to overwrite with Haiku. In my case, Linux was the last writer for only a couple installs, and I didn’t notice any problem there. Writing the MBR, and installing bootman didn’t help in my situation, so I wiped everything with the dd command to get it going.

I’ve been able to boot multiple Haiku GUID partitions on a 3TB disk, but there are a few workarounds required to do it.
First, you must disable UEFI boot in your BIOS and use legacy mode.
After creating your partitions and installing Haiku on the hard drive you need to boot one of the partitions using the installation CD or USB drive with the Haiku anyboot image (tap spacebar while booting the CD to access the menu).
Select one of your new hard drive partitions and continue booting.
On my hardware, I was unable to boot any of my GPT partitions with the x86_gcc2 anyboot image for whatever reason. The x86_64 anyboot WAS able to successfully boot my x86_64 partition, but not the x86_gcc2 partition.
Once the x86_64 partition is successfully booted you can open a terminal and run “writembr”. Make sure it is writing to the raw drive i.e. /dev/disk/scsi/0/0/0/raw.
After that you can run “BootManager” to create a Boot Menu for your Haiku installs.
Again, for whatever reason, booting a LiveCD to a desktop did not work for the previously described operations. What happened is that the “writembr” command attempted to write the MBR to the installation disk rather than the hard drive!
Reboot and you should see your new boot menu and all your partitions should be bootable.

There are some strange things in this procedure:

  1. You can run writembr from a live CD, after creating the GPT partition table in DriveSetup. There should be no need to do this from the running install.
  2. Installing BootManager will erase the MBR written by writembr, so the writembr step shouldn’t be needed at all.

writembr writes a simple boot code to the disk. It is similar to bootman but without a menu, so it just boots the first partition it finds. When using legacy intel partitions, it will look for the first active partition and boot that. I don’t know what it does for a GPT disk, as there isn’t a notion of active partition there.

Using the bootloader from a Linux spin can also be problematic.
Ubuntu will pick it up with an ‘update-grub’.
The Debian minimal spins like Linux BBQ Lunchtime use a more basic grub setup and require a few extra steps.
I haven’t tested it from my Arch (Manjaro) drive.

I never managed to install Haiku and boot the system. Neither in multboot nor simple boot. I always need to use Bootmanager so that the Haiku is bootable.

I think we do need to add some kind of automatic partitioning wizard.

The current DriveSetup method requires moderate knowledge of partitioning and booting operating systems. The big issue is who is going to do the work, resources are thin and the current method actually works.

Maybe as an interim step for R1 we should provide detailed documentation on how to setup a disk with DriveSetup?

A side note, GPT disks caused quite a few issues historically. GPT stores identification signatures at the beginning and end of the disk. Until recently, we would try to use GPT if the end of the disk still contained the GPT backup signature (even if MBR / Intel was intended and valid at the beginning of the disk). As of a few commits ago that should be solved and MBR is preferred if only the GPT backup signature exists and a valid MBR record exists at the beginning.

If you don’t know about partitioning your drives:

  1. Don’t install a new OS yourself. You may destroy existing data on the machine. Ask for help.
  2. Wipe the whole drive, do not create a partition table, install Haiku to the whole drive as a single volume. This works fine and there is no need to mess with active partitions and the like.

And in the future, we should move to GPT, where the required setup is quite different anyway (and bootman needs a different implementation). So, we have to revisit the DriveSetup/Installer steps anyway.

1 Like