When the openmoko device is in mass storage mode, a host computer should be able to boot on it, presenting a grub menu offering to boot into several images / partitions (payloads) on the transflash: memtest, UBCD (the ultimate boot cd), a lightweight security oriented livecd distro, you name it...

It's sometimes called Live USB: from Wikipedia LiveUSB definition, A live USB is a USB flash drive containing a full operating system which can be booted from. Live USBs are closely related to Live CDs, and are sometimes used interchangeably. Like Live CDs, Live USBs can be used for system administration, data recovery, or the testing of operating system distributions without committing to a permanent installation on the local hard drive. Many of the smaller Linux distributions can also be used from a USB flash drive.

Usually, all you need for this with an USB storage device (flash USB stick or external drive) is a partition, flagged "bootable" (see fdisk), containing a boot loader (say grub). But the problem is that specifications vary between motherboards, so there are variants and mandatory requirements to define (here would be a good idea), so that one can optimize/maximize the compatibility.

USB Booting

Older computer BIOS usually do not support direct booting from a USB device. Around 2001, PC motherboard manufacturers started to add USB boot support.

There are two common BIOS methods for direct USB booting:

One method is called the "USBHDD" method and it is used to support the booting of standard USB mass storage devices that are configured like a normal PC hard drive.

The other method is called the "USBZIP" method and it supports booting from a USB storage device that behaves like the original IOMEGA ZIP drive with USB support.

Most computers (just about all Dells, for example) made today have a BIOS that supports the USBHDD method so I expect that this will eventually become the standard way to boot a USB device. However, many motherboards will support BOTH methods, and many older motherboards have USBZIP support.

Some newer BIOSs which support USB 2.0 will not boot from an older pen drive. Using a USB 2.0 compliant one usually solves this problem. Also, some older BIOSs which only support USB 1.1 will not boot from newer drives which support USB 2.0!

Some USB keys don't boot. If this is the case, it may be possible to fix them by installing a new master boot record. (Most keys boot OK by default; some cannot be fixed even by doing this. However, it helps in some cases). Run the command:

lilo -M /dev/sda

USB Booting in Neo1973's kernel

Although there is very little information about it, the g_storage kernel module is responsible for the Neo's mass storage mode. So the boot-or-not criteria might rely on this very module.

TODO

Testing/further research has to be conducted to determine:

if a bootable-flagged partition / grub doesn't mess openmoko up

if the phone can still act as a phone, or if the booted os can use the gprs functions

if the phone can recharge on mass storage mode (from the usb cable)

if a dedicated partition for each payload is needed (see memtest example...)

if multi-boot is possible: grub?

Linux distro Howto: liveCD iso to liveUSB conversion

In short:

Mount USB drive, with e.g. mount /dev/sda1 /flash - can be either FAT16 or FAT32!

The limitation of this method is that the booted OS is static (not-self modifiable). There's the option to install linux using the partition, but it's not really mobility-oriented (liveCDs are optimized for maximum autoconfiguration).

Alternative methods

The ideal way of doing it would be to have a bootloader on the usb flash, which would offer booting directly from an iso (stored on the very same device). This way, just download the new iso, and it's updated !

Hints to explore:

IsoemuBy using it, we can boot our system from a local iso file, if this iso file is bootable (well, i'd like to see that :p)

virtualization-oriented distro... ex Xenoppix Cons: would work best only on modern VT-capable computers. What about a very minimal distribution (say DSL without X) kqemu-enblaed, booting into an ncurses iso-loader? The delicate part would be on the networking side.

Zero-Install "packages" systems

For limited storage devices (such as a transflash device), zero-install systems can be very interesting: you can download and run software, without installing it.

One may choose/begin a zero-install-enabled distro for minimal footprint.

Using Qemu to boot Linux from a flash drive within Windows

The following tutorial explains how to use Qemu to boot Linux from a portable USB flash device while still working within Windows. This Enables the user to have both systems running at the same time eliminating the need to restart the PC and set your BIOS options to boot Linux.

When the openmoko device is in mass storage mode, a host computer should be able to boot on it, presenting a grub menu offering to boot into several images / partitions (payloads) on the transflash: memtest, UBCD (the ultimate boot cd), a lightweight security oriented livecd distro, you name it...

It's sometimes called Live USB: from Wikipedia LiveUSB definition, A live USB is a USB flash drive containing a full operating system which can be booted from. Live USBs are closely related to Live CDs, and are sometimes used interchangeably. Like Live CDs, Live USBs can be used for system administration, data recovery, or the testing of operating system distributions without committing to a permanent installation on the local hard drive. Many of the smaller Linux distributions can also be used from a USB flash drive.

Usually, all you need for this with an USB storage device (flash USB stick or external drive) is a partition, flagged "bootable" (see fdisk), containing a boot loader (say grub). But the problem is that specifications vary between motherboards, so there are variants and mandatory requirements to define (here would be a good idea), so that one can optimize/maximize the compatibility.

USB Booting

Older computer BIOS usually do not support direct booting from a USB device. Around 2001, PC motherboard manufacturers started to add USB boot support.

There are two common BIOS methods for direct USB booting:

One method is called the "USBHDD" method and it is used to support the booting of standard USB mass storage devices that are configured like a normal PC hard drive.

The other method is called the "USBZIP" method and it supports booting from a USB storage device that behaves like the original IOMEGA ZIP drive with USB support.

Most computers (just about all Dells, for example) made today have a BIOS that supports the USBHDD method so I expect that this will eventually become the standard way to boot a USB device. However, many motherboards will support BOTH methods, and many older motherboards have USBZIP support.

Some newer BIOSs which support USB 2.0 will not boot from an older pen drive. Using a USB 2.0 compliant one usually solves this problem. Also, some older BIOSs which only support USB 1.1 will not boot from newer drives which support USB 2.0!

Some USB keys don't boot. If this is the case, it may be possible to fix them by installing a new master boot record. (Most keys boot OK by default; some cannot be fixed even by doing this. However, it helps in some cases). Run the command:

lilo -M /dev/sda

USB Booting in Neo1973's kernel

Although there is very little information about it, the g_storage kernel module is responsible for the Neo's mass storage mode. So the boot-or-not criteria might rely on this very module.

TODO

Testing/further research has to be conducted to determine:

if a bootable-flagged partition / grub doesn't mess openmoko up

if the phone can still act as a phone, or if the booted os can use the gprs functions

if the phone can recharge on mass storage mode (from the usb cable)

if a dedicated partition for each payload is needed (see memtest example...)

if multi-boot is possible: grub?

Linux distro Howto: liveCD iso to liveUSB conversion

In short:

Mount USB drive, with e.g. mount /dev/sda1 /flash - can be either FAT16 or FAT32!

The limitation of this method is that the booted OS is static (not-self modifiable). There's the option to install linux using the partition, but it's not really mobility-oriented (liveCDs are optimized for maximum autoconfiguration).

Alternative methods

The ideal way of doing it would be to have a bootloader on the usb flash, which would offer booting directly from an iso (stored on the very same device). This way, just download the new iso, and it's updated !

Hints to explore:

IsoemuBy using it, we can boot our system from a local iso file, if this iso file is bootable (well, i'd like to see that :p)

virtualization-oriented distro... ex Xenoppix Cons: would work best only on modern VT-capable computers. What about a very minimal distribution (say DSL without X) kqemu-enblaed, booting into an ncurses iso-loader? The delicate part would be on the networking side.

Zero-Install "packages" systems

For limited storage devices (such as a transflash device), zero-install systems can be very interesting: you can download and run software, without installing it.

One may choose/begin a zero-install-enabled distro for minimal footprint.

Using Qemu to boot Linux from a flash drive within Windows

The following tutorial explains how to use Qemu to boot Linux from a portable USB flash device while still working within Windows. This Enables the user to have both systems running at the same time eliminating the need to restart the PC and set your BIOS options to boot Linux.