Making a Haiku USB Stick

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/alpha2, 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 copy the "anyboot" disk image directly to the raw drive, not to a partition, replacing everything including the MBR, destroying all the partitions and data that were there. Although the size of the Haiku bootable partition is fixed, the anyboot image contains a partition table and will allow to create one or more partitions in the remaining space (with any partitioning tool and file system). Alternatively, if you are already under Haiku, you can also use the the Installer method, see below in the "Haiku" section.

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. You might need to hit a function key (e.g F8) at boot or change the boot device order in your BIOS for the USB stick to be picked up, please refer to your computer or mother-board manual.

Start by downloading the "anyboot" disk image from the download page. Get a sufficiently big USB flash drive (at least the size of the unzipped anyboot 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-anyboot.image of=/dev/sd[x] bs=1M

Where /dev/sd[x] is your USB device. *Make sure to use /dev/sdx and not /dev/sdx1. This is a very common mistake!

Haiku/BeOS

Using Haiku's Installer and 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 if you choose so.

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/disk/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-anyboot.image of=/dev/disk/usb/[x]/0/raw bs=1M

Where /dev/disk/usb/[x]/0/raw is your USB device.

Windows

Using ImageWriter for Windows

Note that ImageWriter for Windows is considered experimental (alpha) software by it's own author. Be sure to read the README.txt file included with the software.

Rename the downloaded haiku-anyboot.image to haiku-anyboot.img otherwise you won't see it in ImageWriter's file selection panel.

Get ImageWriter for Windows (https://launchpad.net/win32-image-writer). Unzip it in the place of your choice.

Be sure to carefully identify and note the drive letter corresponding to your USB stick, the risk is that you could completely overwrite and destroy data on the wrong disk.

Run the ImageWriter program (Win32DiskImager.exe), select the image file haiku-anyboot.img, select the correct USB stick drive letter, and click the 'Write' button. Writing should take around five minutes, don't remove the USB stick while it's still writing to it. When finished, Windows will not be able to access the content of the stick and might propose you to format it, this is perfectly normal, do not format it if asked.

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

Using dd for 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-anyboot.image of=\\?\Device\Harddisk1\Partition0 bs=1M --progress --size

Where \\?\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-anyboot.image of=/dev/rdisk[x] bs=1m

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

diskutil eject /dev/disk[x]