Making a Haiku USB Stick

Note that except with the Haiku/Installer technique (in the Haiku section below) some systems won't be able to boot drives created with this guide. This is due to the fact that the image is written to the whole disk without a partition table, and that isn't supported by some BIOS'es. The issue is well known and an easy method will be documented soon. In the mean time if details don't scare you, you can adapt this method with the detailed information found in Makebootable whys and hows.

Using a USB flash drive is one of the best ways to install Haiku. It is also the only way to really try and enjoy all the features of Haiku without touching your hard drives. The Haiku live CD is limited by the slow access time of CD's and, as of R1/alpha1, still lacks a few features due to the added complexity to run on a read-only media. Note that running off a USB flash drive might still be a lot slower than a real hard drive depending on your model.

In the following guide, we will just copy a raw disk image directly to the raw drive, not to a partition, replacing everything including the MBR, destroying all the partitions that were on there. This is destructive and you won't be able to use the remaining space on that drive, you are limited to the size of the image.

Once this is done, you'll be able to either use Haiku directly or make a real install by running Installer (found in the Applications menu).

First, be sure you have a computer that supports booting off of USB flash drives. That shouldn't be a problem on most recent computers.

Start by downloading a raw disk image from the download page. Get a sufficiently big USB flash drive (at least the size of the unzipped raw image), then depending on your operating system, follow one of the methods below.

Linux/FreeBSD

Open a terminal.

Find the device name of your USB flash drive by typing this command:

sudo fdisk -l
This will output the device name of the disks present on your system. You can guess the name by looking at the drive size or by executing this command before and after plugging your USB flash drive.

Ensure the USB device is unmounted,

umount /dev/sd[x]
and then issue the following command.
Be sure to verify by all means that it is the correct device name as the following command will erase everything on that drive!
dd if=path/to/haiku.image of=/dev/sd[x] bs=1M

Where haiku.image is the path to the raw image file and /dev/sd[x] is your USB device. *Make sure to use /dev/sdx and not /dev/sdx1. This is a very common error!

Haiku/BeOS

Using Installer/DriveSetup

Under Haiku you can use the Installer application to prepare a USB stick, the advantage is that it will be able to use all the space available on the drive and that it will contain a partition table, which has better boot compatibility (see info box at the top of this guide).

Note that although briefly summarized here, this is basically a standard install procedure, except the destination media is a USB flash drive. More details can be found in the Install Guide

Run Installer (found in Applications), then select the whole USB drive (ending with /raw), double check this is the correct drive, and invoke from the menu: Partition->Initialize->Intel Partition Map. Then create a BFS partition and check the 'Active Partition' checkbox. (You might need to unmount and delete previous partitions if they are of the wrong type). The last step is to Initialize the new partition (format) to the BFS filesystem.

Close DriveSetup and in the Installer window, select your newly created partition in the "Onto" destination menu. You can now click on 'Begin' to complete the install then enjoy your bootable Haiku stick.

Using the Terminal

Open a terminal.

Find the device name of your USB flash drive by typing this command:

ls /dev/usb

This will list the device name of the usb disks present on your system. You can guess the name by executing this command before and after plugging your USB flash drive.

The device name looks like this: /dev/disk/usb/[x]/0/raw where x is the disk number. ("/0/raw" represents the entire disk and not a partition of it)

Ensure the USB device is unmounted using the Mount context menu of Tracker, and then issue the following command.

Be sure to verify by all means that it is the correct device name as the following command will erase everything on that drive!
dd if=path/to/haiku.image of=/dev/disk/usb/[x]/0/raw bs=1M

Where haiku.image is the path to the raw image file and /dev/disk/usb/[x]/0/raw is your USB device.

Windows

Get dd for windows (http://www.chrysocome.net/dd)

Start a command line console (StartMenu->Run... and type "cmd"). Note that you might need to run the console with administrator privileges (StartMenu->Run... type "cmd" then right click on "cmd.exe"->Run As Administrator) otherwise you might not see and access the whole drive (Partition0).

Find the device name of your USB flash drive by typing this command:

dd --list --filter=removable

This will output the device name of the removable disks present on your system. You can guess the name by looking at the drive size or by executing this command before and after plugging your USB flash drive.

The device name looks like this: \\?\Device\Harddisk[x]\Partition0 where x is the disk number. (Partition0 always represents the entire disk and not a real partition)

Be sure to verify by all means that it is the correct device name as the following command will erase everything on that drive!
dd if=path/to/haiku.image of=\\?\Device\Harddisk1\Partition0 bs=1M --progress --size

Where haiku.image is the path to the raw image file and \\?\Device\Harddisk[x]\Partition0 is your USB device.

If you'd like to unplug the USB flash drive, be sure to eject it properly using the usual "Safely remove device" button in the task bar.

MacOSX

Open a Terminal (under Utilities)

Find the device name of your USB flash drive by typing this command:

diskutil list

This will output the device name of the disks present on your system. You can guess the name by looking at the drive size or by executing this command before and after plugging your USB flash drive.

Be sure to unmount the drive:

diskutil unmountDisk /dev/disk[x]

Where [x] is the disk number of your USB flash drive as found previously

Be sure to verify by all means that it is the correct device name as the following command will erase everything on that drive!
sudo dd if=path/to/haiku.image of=/dev/disk[x] bs=1m

If you'd like to unplug the USB flash drive, be sure to eject it properly:

diskutil eject /dev/disk[x]