Installing a Haiku Image to a Disk Partition

This guide describes how to install Haiku from Linux on a spare hard disk partition directly without using a CD-ROM or USB memory key. It is assumed that you are already running Linux and have prepared an empty partition for Haiku.

Download Haiku

You need to download an Anyboot image from the Haiku website.

Convert Anyboot to a raw image

Anyboot images are a combination of ISO and raw images. They can be written to DVDs, CD-ROMs, USB memory keys and hard disks. If you need to write the image to a partition, then you must first convert the Anyboot image to a raw image. You can do so using:

dd if=haiku-anyboot.image of=haiku.raw bs=1M skip=$(expr $(od -j 454 -N4 -i -A n haiku-anyboot.image) / 2048)
dd if=/dev/zero of=haiku.raw bs=1 seek=506 count=4 conv=notrunc

Write the raw image to a disk partition

For example, to write the raw disk image to the second partition of your “sda″ device:

dd if=haiku.raw of=/dev/sda2 bs=1M conv=notrunc

Please modify as needed.

Make the partition bootable

You only need to use makebootable in the specific case where you are trying to copy the Haiku filesystem directly to a partition and you are booting it using legacy BIOS. In other cases, do not try to use makebootable.

After the image is written to the partition, its VBR needs to be modified to make it bootable. You can either use the makebootable program from Haiku, or makebootabletiny with Linux.

Assuming that you downloaded makebootabletiny, you need to compile and run it:

gcc makebootabletiny.c -o makebootabletiny
./makebootabletiny /dev/sda2

Add the partition to your boot manager

This really depends on which boot manager you are using. For information on how to chain load Haiku from the GRUB 2 and GRUB Legacy boot managers, please see the Configuring GRUB guide.

Set the partition type

Optionally, you should set the partition type using fdisk. The partition type for Haiku's BFS file system should be set to "eb".



Initial version of this guide published by Evert Mouw.