Haiku on USB flash drive?

Is there a way to install haiku or beos on a usb flash drive. I would like to play around with it at work on my breaks - heh heh. The pc I use supports booting from a usb device, so I’m assuming the BIOS would boot the flash drive like a regular “IDE” drive. Any help?

I think it’s not quite that simple. (Please do correct me if I’m wrong about any of this.)

http://axeld.blogspot.com/2005/10/cd-boot.html

While a bootable CD is faked as a floppy, it does not give access to the whole CD. Haiku needed ATAPI support and ISO9660 file system support to actually boot.

USB drives faked as IDE drives are better, in that they are not limited to the tiny size of a floppy disk, but the problem is that Haiku, IIRC, does not use the BIOS post-boot. I believe Haiku must swap the fake IDE bootup device for the actual USB device early in the boot process, and that means Haiku has got to fully support USB Mass Storage devices. It doesn’t do that yet: http://dev.haiku-os.org/ticket/1106

Eventually it will be possible. It will look great booting off USB drives, but USB flash media has a limited lifespan. If you write to the same area, like journalling filesystems do, your disk will eventually fail. BFS on flash media for -everyday use- is not a very good idea.

Perhaps you can try Haiku builds in VMware Player in the meantime?

Maybe I can install it to my computer’s hard drive and then take that drive and fit it into an external usb hard drive controller. Think it’ll work?

I don’t think Haiku will be able to boot from any USB disk, flash or harddisk, unless this task gets done: http://dev.haiku-os.org/ticket/1106

When that’s done, additional work will probably be needed to have Haiku actually boot from a USB drive. But when it works it will be newsworthy. :slight_smile:

Flash devices now include internal logic to avoid using always the same sectors, which increases the MTBF. Still swapping on them should be avoided.

I had BeOS on Compact Flash a couple of years ago, which killed it eventually. It was fun though while it lasted.

Perhaps the filesystem journal could be moved from time to time to avoid using the same spot?

The problem of wearing out the flash drive could be circumvented by using a ram disk for your work, in concert with some sort of clever shutdown program.

I believe Earl Colby Pottinger wrote a basic ram disk for BeOS many years ago, and someone else updated it with lots of (mostly redundant) features.

This is a fairly interesting idea, since it leads to using your computer with no moving parts, similar to an Internet Appliance only more useful. Portability is a snack, the drive fits in your shirt pocket.

Now that 16Gb drives are available for less than $200.00 it’s certainly worth doing.

Rob

Are we getting any closer to this yet?

So any news on this or other ways of installing from an USB or SD-card?

Thinking of getting an Asus eeePC. Right now I don’t know where to by one but I have no hurry before I know I can install any flavor of BeOS on it :slight_smile:

http://www.eeeuser.com/
http://eeepc.asus.com/en/

From what I can tell.

The eeePC does not use pata or sata hard drives.

Instead, it uses SSD with SM223 controller.
“SM223 - Compact Flash card controller with UDMA support”

http://www.siliconmotion.com.tw/en/en2/products_FMCC.htm

I don’t believe the SM223 is supported. Would require a driver.

SSD = Solid State Drives

USB
USB 1.1 is working for Intel & VIA chipsets. eeePC uses Intel chipset so it’ll work for keyboard & mouse. ( Also, USB 2.0 should work with all motherboards ).

In BeOS, you had to install USB Storage Module to get USB memory cards to work. ( yT integrated this module into Zeta OS ). Best to download it and look over the Readme.html which gives information.
http://www.bebits.com/app/3889

Haiku already has the source code for USB Storage Module. But the module currently relies on BeOS R5 SCSI API to detect USB devices ( like memory cards, hard drives, etc. ).

http://dev.haiku-os.org/ticket/1106
USB Storage Module has to be updated to work with Haiku’s SCSI API. Once done, then USB memory cards will work ( recognized & mountable ).

As for booting off of USB memory cards. Not sure how that is handled. USB card emulated as IDE disk? The BIOS would initialize the USB card & then the OS takes over? Try with Linux first to see how it is done. Then I suggest trying with Zeta because it is further along ( Zeta works with USB memory sticks, drives, etc. ).

Links on USB booting:
http://www.weethet.nl/english/hardware_bootfromusbstick.php
http://www.bootdisk.com/pendrive.htm

Haiku probably will not work yet but Zeta might.

[quote=tonestone57]From what I can tell.

The eeePC does not use pata or sata hard drives.

Instead, it uses SSD with SM223 controller.
“SM223 - Compact Flash card controller with UDMA support”

http://www.siliconmotion.com.tw/en/en2/products_FMCC.htm

I don’t believe the SM223 is supported. Would require a driver.
[/quote]

This part is a flash memory controller, imagine you are building a Compact Flash card, you need some electronics to translate the ATA commands and read and write data to the flash memory chips. That’s what the controller does. So it will just appear as a hard disk on the eeePC’s ATA controller, you don’t need a special driver.

[quote=NoHaikuForMe]

This part is a flash memory controller… So it will just appear as a hard disk on the eeePC’s ATA controller, you don’t need a special driver.[/quote]

Ok, my mistake. Good to hear. So, the SSD should work with Haiku since the controller would be supported.

That means you’d only be left with finding a way to get Haiku on there.

Haiku will support the motherboard/cpu, video card ( Intel or VESA driver ) & hard drive on the eeePC. Sound & Network may not work.

[quote=tonestone57]From what I can tell.

The eeePC does not use pata or sata hard drives.

Instead, it uses SSD with SM223 controller.
“SM223 - Compact Flash card controller with UDMA support”

http://www.siliconmotion.com.tw/en/en2/products_FMCC.htm

I don’t believe the SM223 is supported. Would require a driver.

[/quote]
But have a look here :slight_smile:

http://www.flickr.com/photos/eeeuser/1780038738/in/set-72157602745995417/
http://www.flickr.com/photos/eeeuser/1779192769/in/set-72157602745995417/

In the bios it’s listed as an IDE. Don’t know if this is the only way of showing it in the BIOS and the OS sees it as another

Yes, NoHaikuForMe pointed this out in their post.

The SM223 controller operates as IDE ( takes ATA commands ). The SSD would work under IDE. So, IDE driver in Haiku would handle it.

I just wasn’t thinking & not having used any computer systems with internal compact flash controllers resulted in me giving wrong information.

Good screenshots.

At least you won’t have to worry about Haiku ( or BeOS ) supporting the eeePC SSD & SM223 controller.

If anyone still cares, I used Haiku for the first time today on a USB drive, it booted flawlessly after copying the image directly to the drive (from linux).

I’m using a lenovo T61p and an optima Attache 4GB (overkill) USB drive.

[quote=mvirts]If anyone still cares, I used Haiku for the first time today on a USB drive, it booted flawlessly after copying the image directly to the drive (from linux).

I’m using a lenovo T61p and an optima Attache 4GB (overkill) USB drive.[/quote]

There is an alternative to Linux through Windows, with ‘flashnul’, and is reasonably fast (within 20 min av.):

http://www.haiku-os.org/community/forum/how_to_install_haiku_to_usb_flash_drive_from_windows

And I believe people would be interested in the details of the Linux making. How long does it take for the whole process?

Hmmm All I did was copy the image from the website (the latest pre-alpha 400mb one).

I used
dd if=haiku.image of=/dev/sdb
to copy the image directly to the drive, not a partition. The copy operation took a few minutes, propbably around 7 (with USB 2).

To boot it I just used by bios boot device menu, and I just tried using GRUB unsuccessfully. It may work on different hardware since I was using a 4G drive and got errors about it being too large for the BIOS.

Another thing of interest is that virtualbox (haven’t tried any other vm’s) can boot from the actual USB drive, so that one could use a VM when developing and then just reboot to test it on actual hardware

(I don’t know if this is actually that useful but I think it’s cool)

It’s like you say pretty simple, just dd the raw image to a USB drive. For Mac OS X do the following:

[quote]
From http://www.nerdlogger.com/2009/05/writing-moblin-and-ubuntu-usb-images.html

  1. Download the desired .img file
  2. Open a Terminal (under Utilities)
  3. Run diskutil list to get the current list of devices
  4. Insert your flash media
  5. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  6. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
  7. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located.
  8. Run diskutil eject /dev/diskN and remove your flash media when the command completes[/quote]
    To be able to use your USB drive for something else use Disk Utility in the Utilities Folder. Select your drive in the sources list on the left and then select the delete tab.