More on makebootable ...

Modifying the Boot Sector

  • is not necessary when

    • dd:ing to an entire disk device and not a partition
    • using Qemu or other Virtualization Software
    • using Haiku's Installer program, as it is done automatically
    • using the build system to install directly to a partition from source, as it is done automatically
  • is necessary when

    • dd:ing to a partition
    • manually installing using Tracker
    • installing using BeOS/Zeta's Installer program
  • Ways to modify the boot sector

makebootabletiny

makebootabletiny is a simple little program that can be compiled and ran, without needing any Haiku sources. It is ideal for people who write raw image files to disk.

It reads out the offset of the specified partition and writes it into the boot record of this partition at a defined offset (506).

You can download the file, compile it with:

gcc makebootabletiny.c -o makebootabletiny

Then run

sudo chmod o+r /dev/sda2
sudo chmod o+rw /dev/sda2
makebootabletiny /dev/sda2

and make sure you put the correct path to your Haiku partition.

In case someone is interested, HeTo made a version of makebootabletiny for BeOS, available here: http://www.students.tut.fi/~vettenrh/dump/ . makebootabletiny.c contains the source code, makebootabletiny_beos contains a binary for BeOS R5.

Bootstrapping from BeOS or Zeta

Mount your Haiku partiiton as /Haiku and then:

cd /Haiku
mkdir -p beos/system
cp system/haiku_loader beos/system/zbeos  

Reboot into Haiku and then:

makebootable /boot
rm -Rf /boot/beos

Running makebootable via the build system

Another option is to use the build platform built makebootable using the jam run target like this:

jam run ":<build>makebootable" /dev/disk/path/to/partition