How to install Haiku to USB Flash Drive from Windows

IMPORTANT!!!
YOU USE AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR
MISUSING THIS SOFTWARE.

Note: When entering commands shown quotes, do not enter the actual quote characters!

  1. Connect Your Flash Drive.

  2. First download the latest Haiku raw image from HERE and the latest Flashnul program from HERE.

  3. Extract both files to a new directory (e.g. c:\haiku). Rename the raw image to haiku.img

  4. Open a Command Line (Start → Run, type “cmd”, and press enter.) You will see a black window appear with a blinking cursor. You can use basic DOS commands to navigate the directory of the image and the Flashnul. For example “cd \haiku”.

  5. Type “flashnul -p” to list the available devices.

Example:

Flashnul>flashnul -p

Available physical drives:
0 size = 81961123328 (76 Gb)
1 size = 1000341504 (954 Mb)

As you can see, I have 2 physical disks, the first is 76Gb, and the second is 954 Mb. The second is my Flash drive, shown at index 1. The list will vary depending on your own storage setup. It is very important that you use the number that your listing shows!!! Use the media size as an extra clue to identify the correct media.

  1. Write image to flash drive
    In step 4 we listed the available devices. We need the index of the Flash drive to write the image to it.

To write the image to Flash drive use the following command (Check the number 3 times before You press enter!!!):

“flashnul number_of_Your_flashdrive -L haiku.img”

Example:

Flashnul>flashnul 1 -L haiku.img

Disk PhysicalDrive1 (UNC name: \.\PhysicalDrive1)
------------------------------------------------------------[Drive geometry]–
Cylinders/heads/sectors = 121/255/63
Bytes per sector = 512
CHS size = 995258880 (949 Mb)
---------------------------------------------------------------[Device size]–
Device size = 1000341504 (954 Mb)
delta to near power of 2 = 73400320 (70 Mb), 7%
Surplus size = 5082624 (4963 kb)
-----------------------------------------------[Adapter & Device properties]–
Bus type = (7) USB
Removable device = Yes
Command Queue = Unsupported
Device vendor = Kingston
Device name = DataTraveler 2.0
Revision = PMAP
--------------------------------------------------------------[Hotplug info]–
Device hotplug = Yes
Media hotplug = No

   Selected operation:      load file content
   Selected drive:          PhysicalDrive1, 1000341504b (954 Mb)

   THIS OPERATION IS DESTRUCTIVE!!!
   Type 'yes' to confirm operation. All other text will stop it.

   Really destroy data on drive PhysicalDrive1?  :yes

-----------------------------------------------------------------------[Log]–
Running operation [load file content] for drive PhysicalDrive1

Writing 0xf9f0000 (250 Mb), 899733 b/s
image load finished

----------------------------------------------------------[Operation result]–
passes: 1
errors: 0
write bytes: 262144000 (250 Mb)
avg. write speed: 899731 (878 kb/s)
max/min write speed: 0 (0 b/s) / 0 (0 b/s)

Press ENTER to exit.

Ta-Da! Your Boot-able Haiku Flash Drive is ready!

  1. Reboot Your computer and open the BIOS, select USB device for first boot device, and save the changes.
    After rebooting the computer will boot from the USB disk. It can take a long time, so please be patient.

I wish you good luck!
Thank You for EuanK for the spell correcting.

ByE!
miqlas

I’m afraid it didn’t work for me, but that may be a problem with my BIOS moreso than the Haiku setup :frowning: Great guide though!

Hello!

You can boot another OS from USB?

I can select the USB in BIOS for first booting device, but when i save the setting, and restarted my computer, my computer don’t use the new settings. (I don’t know why the restart is not enough, maybe an small problem in the BIOS.)
First i need power off my computer, and after i can start it again. And then it works, and booting from USB. :slight_smile:

Try it, and maybe it will work for You.

Bye!
miqlas

It turns out that it IS my BIOS being difficult, as i’ve tried the drive on several other computer and it’s worked just fine. Well, I say worked…it’s booted up :smiley: I still get kernel panic once it reaches the hard drive icon, but it’s progress! Thanks for the advice Miqlas, you’re awesome!

-Grant

Thank You!
I hope You don’t need wait long for the fix to boot Haiku on Your Computer…

I’m only an Haiku fan :wink:

You should be glad Grant, I can’t seem to boot from USB at all on this Acer Travelmate 4600 :-/

I have Cygwin installed on Win XP, any idea how to do this with dd? Cygwin has no /dev/* only cygdrives (/cygdrive/*) and dd complains that eg. of=/cygdrive/d is a directory

Is it possible to boot at all? On another laptop I got Kernel Panic unable to mount, when I enter es (continue) or exit, the boot icons all finish lighten up and then nothing happens.

Oh and Miglas I opened the image with hexedit, seems the 256MB image is padded with zeroes from 111MB therefore I could get it on a 128MB USB thumb drive. You can search backwards for 0a by going to the end of the file with > and Ctrl-R

Nutela,

I’m having the same problem on my personal Desktop. It gives me numerous USB BIOS boot options, but not one of them seems to correctly recognize and boot the flashdrive. :frowning:

I don’t have any USB BIOS boot options on this laptop :frowning: I can only boot from CD/DVD, HDD, Network, and floppies whatever that means, seen a floppy drive on any notebook? Not in 200x

nutela - I’ve used the plop boot manager/diskette to boot from usb, and my laptop doesn’t support usb booting. Try it out. Personally I just download the image, and mount it on zeta, and copy it to an empty beos partition. Here’s the link - http://www.plop.at/en/bootmanager.html

miqlas,

Considering that USB2 flash drives these days can run as fast as 20+MB/s, that seems to be a viable, and the most convenient method for a Haiku installation that will win the applause from the Haiku community and members-would-be.

I was surprised and raised by eyebrows to see the boot up screen of Haiku but my heart sank like Mr Grant Butler when it stopped at the hard drive small icon and with it popped the kernel panic command window - I could go no further.

It would be nice if successful trials would be reported with the hardware listed, or, if the problem is not hardware related, the corresponding cure.

Quite obviously this is the most promising method of installation having its edge over the installation on VMs (the cut down in speed!) or BFS partition from BeOS or Zeta, as the BeOS stream OSes must be quite new to the future user base, which is now consists overwhelmingly of Windows users.

Thank you, miqlas, for your how-to :slight_smile:

I’m trying the procedure with a Datatraveler 2.0 Kingston pen drive, but I’ve got an error from flashnul, as it can’t write the image into the pen drive. It says “write error: access refused”. That’s strange because I actually can write “normal” data. Any guess?

There are two other options - bootable CD to manage partitions and install to a hard-drive or using an image file on a Windows/Linux disk, as R5 was able to do. The latter still seems the optimal approach to me, however it would still probably require some booting code on a floppy, CD or USB stick. There is a chance the boot code could be added into the Windows boot menu though - I am currently able to boot my Haiku and BeOS partitions from the XP boot selection screen.

Hi,

I’ve successfully booted Haiku on my brand new ASUS P5E3 mainboard with a no-name 1Gb USB stick.
Actually, upto now it’s the only way to boot any BeOS (derivate) on this system for me as the parallel ATA disk interface has trouble still with writ-support (reading seems to work, boot goes all icons, then a panic. AHCI driver could not write back block 101 (dev. timeout)).

Very cool to see Haiku run this way.

Anyhow, I want to test a GF7300 with my driver, and from the current looks of things I need to develop on Haiku booted from stick…

Thanks for the info about USB booting!!

Bye!

Rudolf.

Keep Up the Good Work Rudolf!
I’m glad I could help you :slight_smile:

For me the boot lights until the chip and then I get kernel debugger saying it can’t find the boot disk. Any ideas?

blue

[quote=bluestone]For me the boot lights until the chip and then I get kernel debugger saying it can’t find the boot disk. Any ideas?

blue[/quote]

You should open a ticket about your issue at http://dev.haiku-os.org

@Rudolf
I hope you report that bug so it can be fixed.
I searched for “AHCI driver could not write back block 101” and did not find any tickets. So, you could be the first to report it.

@Ward
You should start a new thread on your Haiku issue so this thread can stay on topic. Then I can offer you further help.

Boot Haiku, press [SPACEBAR] when booting. You’ll be able to select safe mode options. Choose console debugging and then report back.

Okay,

Looks like it’s checking only ATA devices and I didn’t see device “1” which, if it’s the same as the install would be the usb disk. There were many complaints about the drive response being too slow and at one point may have canceled out the use of the device. There’s a lot of info there, I’m interpreting as I can. I love the idea, this is really an exciting prospect.

Ward

@Rudolf

Haha nice!

I tried it, too. It even went to the Desktop - showing the Haiku Mouse Pointer (which, unfortunatelly, was not moveable). But at the same time the kernel panic window opened, saying “vm-page-fault: unhandled page fault […]”. Still, it was quite impressing. The total boot time was about 40 seks, so a bit faster than my WinXP .-)