Can you install Haiku "the hard way"?

Over the coming festive days I would like to try again if I can get Haiku on my game-dev laptop in a small test partition to mess around with. So far I had no luck achieving this since booting from USB ends Haiku up in a black screen without even getting to the boot icons. Now my next idea is if I can install “manually” Haiku from a nightly build into this partition (from inside Linux). This system there is EFI only so I would not need to mess with MBR and could place the haiku loader in the EFI partition. But I’m not sure if Haiku can be installed “the hard way” like this. Lacking options right now.

It may be that you enjoy the challenge of what you are attempting, but the easiest method of getting going with Haiku is to buy a cheap laptop from Ebay. A T61 Thinkpad costs little, is a joy to use and offers a 64 bit chip.

Normally you can dd an installation image to a partition and make it bootable using makebootabletiny. You need two partitions, one for the small installer image and then after booting that you install onto a larger partition and delete the first one. I tend to temporarily delete my Linux swap partition and use that for the install, then restore it afterwards. But I don’t know how you can do this with EFI, though it is probably possible.

For EFI systems, there is nothing special to do about installing Haiku other than copying the files to a BFS partition. The Installer is just a fancy way to copy a lot of files.

makebootable is only needed for MBR systems.

You will need to copy haiku_loader to the EFI partition of your system (even if you use Installer, it does not do this by itself yet)

However, if all you get is a black screen, you can start by installing just haiku_loader to your EFI partition and try to get that to work first. The code to setup the framebuffer and icons is in the loader, so if you don’t even get there, you don’t need the filesystem to be installed anywhere at this point.

3 Likes

I forgot, I have also done the install by copying the files to a bfs partition mounted from Linux using the fuse driver. See here Problems booting on a Sony Vaio P

How does the loader actually know where to find the haiku partition? Is it stored in a config file or does it just try the first BeFS formatted partition it finds?

It just uses the first BFS partition where there is an haiku package, if it doesn’t find one, you get a boot menu where you can select one manually.

Easiest way I could think of inside of a Gnu/Linux system (but then again, I’m obsessed with VMs) is to make sure VT-x/AMD-V is enabled and that kvm is available for your Linux-based system or distribution. From there, you’ll first want to check no processes are being used by the disk then umount the disk as root that you want to use as the destination, install qemu and at last, run something similar to the following (as root, so the device can get access; in this case, I’ll say sdc): qemu-system-x86_64 --enable-kvm -m 2G -hda /dev/sdc -cdrom $HOME/Downloads/haiku-nightly-anyboot.iso But before doing this, definitely check with parted -l, fdisk -l, (or GParted as a graphical option) as root first to visually confirm what disk you will be writing to. Once started, Qemu should automatically presume we’re using a raw device; of course, for more reliability, you could manually specify we’re using a raw device plus other disk options, but the above is the simplest way to get the job done. Once inside, install Haiku to the extra disk like you would from a flash drive, safely exit the session (i.e. don’t abruptly kill the VM), and restart the computer. Hopefully, you’ll have a working Haiku system on the disk you wrote to.

Oh – and I might add, for safety’s sake, definitely only use this method with a spare, dismounted disk! I’ve never tested it on a live disk (i.e. by installing it to another partition) and I can’t guarantee doing so on mounted media would have good results. (If you’re looking to share the same drive, the other options listed here would definitely be much safer to use!)

i’ve done that, but with a slight variant: i use host tools to partition target disk before starting the VM, qemu warns and forbids writings to first sector of a disk in some cases

Okay, I got it working but the process was annoying. The boot EFI file is located in a place I had a hard time to find it. I used VirtualBox to attach the haiku partition as physical device and installed things over there. Booting works… but only if I disable secure boot. Is there a way to get the haiku loader “certified”?

Second problem is now… no network. I’ve got an “Wireless-AC 9560” adapter and from what I googled it should work but haiku tells me it does not detect any adapter. Anything special I need to do to get wifi enabled?

Your searching-fu failed here, freebsd doesnt supports this hw yet and Haiku uses drivers from freebsd, so logically Haiku doesnt supports it currently. Be patient, maybe freebsd 13 will get support for it, or replace the wlan card.

The reason I think it should work are these pages here:

https://sites.google.com/view/hardware-list-for-haiku/servers : cocobean says everything works so this would include the WLAN.

https://www.freelists.org/post/haiku-commits/haiku-hrev53016-in-src-dataids-bin : The commit contains the device string “Wireless-AC 9560” so haiku should at least know the device (even if not working) and not calling it “unknown”.

There is no driver for your card. Swap it or wait or use a wired alternative.

Those ID files are just names for the device IDs, so they show up as such in the Devices preferences, but it doesn’t mean there is a driver for them. I wish it was that easy to support new hardware :smiley:

Huh? is something broken? I installed a bunch of software with HaikuDepo and then tried to compile my source project but nothing works. I get a strange error
File “”, line 48
SyntaxError: invalid syntax

Has there been any changes on the nightly Haiku build that you can not compile anymore? Last time I tried (some month ago) it still worked.

EDIT:
This is using SCons. When this did not work I’ve noticed there is no python3 installed so I used pkgman to install it. For some reason I can though not switch to python3 system wide. The SCons in pkgman is not compatible with python3 so I also installed the current 3.1 version and used an “export PATH” to test it without altering the system. The error message is the same also with the new version so I’m not sure if I still can’t get that blasted python3 to be used system wide. I tried changing the /bin/python sym-link but it’s read-only… GRRR

You should be able to symlink python in /boot/system/non-packaged/bin which is not readonly, and is listed before /bin in PATH.
You could also update the recipe for SCons and submit a pull-request on HaikuPorts. :wink:

I’d love to do it but it’s impossible. When I fork on GitHub and try to check out the fork on Haiku I get
“error: cannot run ssh: No such file or directory”
“unable to fork”
I thought I need to install OpenSSH so I searched with pkgman but openssh is installed. I even uninstalled openssh then installed again but still the same. Looks like the openssh package is broken not installing the “ssh” binary as it should.
I’ll try now forking on Linux to update the receipt but I’m unable to test like this.

Can you show up in IRC? It’s easier to debug stuff live than on a forum…

If you have unsupported hardware who stop you installation, and you know there is the problem, take a look in the user guides about black listing drivers.

Not before this evening.

In the mean time on Linux I’ve forked and added the SCons-3.1.1 receipt. Obviously untested but based on the 2.5.1 one: https://github.com/LordOfDragons/haikuports

What I’m not sure about is how to deal with python. SCons 3.1.1 supports python 2.7+ and 3.5+ . I’ve added to the receipt a dependency on both so SCons is installed into both python versions. Here I’m not sure if this is the way to go or if there is “conditional” support as GenToo knows them.