How to install Haiku to USB Flash Drive from Windows

Forum thread started by miqlas on Wed, 2008-06-11 23:00

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!

0) Connect Your Flash Drive.

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

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

3) 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".

4) 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.

5) 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!

6) 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

Comments

Re: How to install Haiku to USB Flash Drive from Windows

Did You test in another USB port? I have 8 USB, but the first can't boot Haiku (maybe now can, but i never use this port more (it works in windows)).

Thanks!

Re: How to install Haiku to USB Flash Drive from Windows

I don't know why but flashnul have some error durning create usb key. This looks so: like create sdc1 instead of sdc on example. Where from such conclusions? I use dd from linuks, and mistake was put in way, I write sdc1 and I have "Failed to load OS" when I write sdc Haiku booting correctly from USB.
http://dev.haiku-os.org/ticket/3413

BTW. Often instead of to look for in settings USB, look to order boot HDD from inserted USB flash, he should appear on list and give him on first place.

Re: How to install Haiku to USB Flash Drive from Windows

I found this is the easiest way for me to install to a flash drive, and it keeps things up to date. Its also a little bit safer as you can't get to your Windows hd.

-Get VMWare Player, and blank VMWare disk images(try google)
-Use it to install some linux distro, I used debian.
(Here is a great resource on VMWare config files http://sanbarrow.com/vmx.html)
-Make sure you linux VM has USB support in it.

Once you have booted your linux VM
-Download Haiku from svn, there is a great post on building on Ubuntu.
(http://www.haiku-os.org/documents/dev/building_haiku_on_ubuntu_linux_ste... Thanks Ryan Leavengood)
-Edit the UserBuildConfig file in the build/jam folder to have the image be 'sda' in folder '/dev' (may be different depending on which name your usb stick has)
-Run jam as it is described in the Ubuntu step by step.

The USB stick now has a bootable image on it. I tried it on my Dell Latitude d630, it loads but the os crashes before the bootloader is done. My wife's dell Inspiron 700m boots just fine though.

I have also used this to build a 20g VMWare disk image.

Re: How to install Haiku to USB Flash Drive from Windows

For those Vista users, who not have opportunity to write Haiku RAW image to USB Flash with flashnul (because of "write error: access refused") or "Haiku On A Stick" utility, now may to try application called USB Image Tool. I've successfully load RAW image to my Transcend USB JetFlash 150. Haiku is booted up and run from USB 2.0 pretty fast and stable.

It is possible that this is help to someone else...

Re: How to install Haiku to USB Flash Drive from Windows

I've noticed that some people were running into booting issues... one thing that I wanted to point out that helps to keep in mind is that you should plug in the USB drive before you turn the system on... This how-to worked for me when I prepared a flash drive for Haiku to boot on my Aspire One. I tried plugging in the drive after the system turned on and went into the BIOS. I set it to boot from USB HHD. It didn't like this. When I rebooted and went into the BIOS again (leaving the thumbdrive in the USB port the entire time), I saw a new option under my boot menu for that -specific- thumbdrive. It mentioned it by vendor name.

Not all BIOSes are the same, obviously, but it may help to make sure you have the thumbdrive plugged in before you power on the system and then arrange the boot order... making sure that the BIOS is aware of the thumbdrive before setup opens.

To make matters more confusing, on my Aspire One, when I used a different thumbdrive to boot Haiku (one that was faster than the 512MB I first tried)... I had to repeat this entire process because the other thumbdrive had a different product name as recognized by the BIOS. That ended up becoming a new entry for me to have to raise to the #1 spot for Boot Order in BIOS.

Re: How to install Haiku to USB Flash Drive from Windows

Will this work on drives over 2GB? My computer has no problem booting from USB (I used to do this when I carried my desktop with me via good ole linux), but I only have 4GB sticks at the time, and I want to know if it will work.

Also, will it work off of CF cards?

Re: How to install Haiku to USB Flash Drive from Windows

Will this work on drives over 2GB? My computer has no problem booting from USB (I used to do this when I carried my desktop with me via good ole linux), but I only have 4GB sticks at the time, and I want to know if it will work.

Also, will it work off of CF cards?

Re: How to install Haiku to USB Flash Drive from Windows

THANKS VADIM!!

Your solution help me a lot!!!!!!

But..

In the boot, I was surprised by the follow message:
--
PANIC: could not mount boot device!

Welcome to Kernel Debugging Land...
Thread 12 "main2" running on CPU 0

kdebug>
-----

My motherboard is a M2N-MX SE

any suggestion?

Re: How to install Haiku to USB Flash Drive from Windows

michaelvoliveira wrote:

THANKS VADIM!!

Your solution help me a lot!!!!!!

But..

In the boot, I was surprised by the follow message:
--
PANIC: could not mount boot device!

Welcome to Kernel Debugging Land...
Thread 12 "main2" running on CPU 0

kdebug>
-----

My motherboard is a M2N-MX SE

any suggestion?

When in the Kernel Debugging Land, could you enter "sc"?

Also while haiku is just starting to boot, you can press the space bar where you can enable on screen logging, so you can see more info on what is happening.

Re: How to install Haiku to USB Flash Drive from Windows

bixzricard wrote:
michaelvoliveira wrote:

THANKS VADIM!!

Your solution help me a lot!!!!!!

But..

In the boot, I was surprised by the follow message:
--
PANIC: could not mount boot device!

Welcome to Kernel Debugging Land...
Thread 12 "main2" running on CPU 0

kdebug>
-----

My motherboard is a M2N-MX SE

any suggestion?

When in the Kernel Debugging Land, could you enter "sc"?

Also while haiku is just starting to boot, you can press the space bar where you can enable on screen logging, so you can see more info on what is happening.

Well, I hit space bar and select the haiku volume, choose Safe mode, but the panic continues.

I enter with sc command, then:

stack trace for thread 12 "main2"
kernel stack: 0x8018e000 to 0x80192000

frame caller : function + offset
0 80191978 (+48) 80061819 invoke_debugger_command() + 0x00e1
1 801919a8 (+48) 80061972 _ZL19invoke_pipe_segmentP21debugger_command_pipePC() + 0x0083
2 801919d8 (+32) 80061a3a invoke_debugger_command_pipe() + 0x008b
3 801919f8 (+128) 8006591b _ZN16ExpressionParser17_ParseCommandPipeERi() + 0x0aa3
4 80191a78 (+48) 800680bb _ZN16ExpressionParser15EvaluateCommandEPKCRi() + 0x06d5
5 80191aa8 (+192) 80068234 evaluate_debug_command() + 0x0084
6 80191b68 (+96) 800608b8 kernel_debugger() + 0x02be
7 80191bc8 (+160) 80060a4a panic() + 0x002a
8 80191c68 (+816) 800a1c85 vfs_mount_boot_file_system() + 0x02be
9 80191f98 (+64) 80043d2d _ZL5main2Pv() + 0x0087
10 80191fd8 (+32) 800568c4 _ZL28_create_kernel_thread_kentryv() + 0x0015
11 80191ff8 (+2145837064) 8005aef0 _ZL19thread_kthread_exitv() + 0x0000

-----

Some suggestion?

Re: How to install Haiku to USB Flash Drive from Windows

This is ticket 2620

You can see the stack trace(sc) is the same as yours.

You can see the underlying problem here in ticket 5.

Re: How to install Haiku to USB Flash Drive from Windows

;(

It's sad...

Four years already

Re: How to install Haiku to USB Flash Drive from Windows

Have you looked for any USB legacy settings in your BIOS?

I have the same problem for my haiku testing PC. But I can use haiku as I have set "USB1.0+2.0" mode to "USB1.0" mode in BIOS.

Re: How to install Haiku to USB Flash Drive from Windows

Yes. I do.

My USB stick is 1.0

I set enable USB 1.1 and USB Legacy
and unabled USB 2.0.

Don't have USB 1.0 Option only,

Re: How to install Haiku to USB Flash Drive from Windows

bixzricard wrote:

This is ticket 2620

You can see the stack trace(sc) is the same as yours.

You can see the underlying problem here in ticket 5.

Uh... I suspect you'll ALWAYS get that stack trace if it can't find a mountable device...

Thus, the cause cannot be traced to a single bug...

The root cause is actually going to be seen in the syslog/serial debug.

Re: How to install Haiku to USB Flash Drive from Windows

Today I followed the instruction and Haiku successfully booted from my Toshiba notebook (P205-S6337) with Core2Duo T5300, and Intel GMA950. I used 1GB CF card with a old sandisk multireader to write and boot Haiku image (r31262).

Haiku could detect correct screen resolution (1440x900) but I can feel some tiny blinking of the screen (may be driver problem). Entire system works very well, and it's amazingly fast. Although it did not have sound (Realtek HD audio), the system was very usable.

Re: How to install Haiku to USB Flash Drive from Windows

"Although it did not have sound (Realtek HD audio), the system was very usable."

It's funny, because the driver already in repo.

Re: How to install Haiku to USB Flash Drive from Windows

Sound was not working...Is a driver for realtek hd audio included in the image, or should I download the driver?

Re: How to install Haiku to USB Flash Drive from Windows

Yes, the HDA drive is now included (it didn't use to be, so if you haven't tested in the last month or two, you might try again)

I believe you can check if it's loaded with ls /dev/audio/hmulti

Check the media preferences to make sure the proper output is being used.

If it's still not working, you can try installing the OpenSound optional package, but make sure to remove the hda driver if you choose to do this as they will both load and potentially cause crashing or conflicts.

Re: How to install Haiku to USB Flash Drive from Windows

Thank you for your advice! I will try what you told.

Re: How to install Haiku to USB Flash Drive from Windows

I got sound. Actually, Haiku was already supporting the realtek HD audio.. It's now working fine.

Thanks, Michael and Urias!

Don't boot...

I wrote raw image as written in instruction to flash drive, but every time when I try to boot Haiku, I got blank screen and text "Failed to boot OS".

Re: Don't boot...

writing the raw image to the USB key is not enough (your PC don't know where to find the boot loader).

  1. Download the Haiku for vmware image.
  2. run it with vmware player (you may need to enable the USB support in the .VMX file)
  3. mount your usb key with "DriveSetup". it will appear as /Haiku1
  4. run : makebootable /haiku1
  5. reboot your PC on the USB key...

Re: How to install Haiku to USB Flash Drive from Windows

Could the author plse comment on this?

Re: How to install Haiku to USB Flash Drive from Windows

I have a question:
1) Can this method be used to install Haiku to a non-USB (ie., IDE) HDD partition?

Portable Hard Drives