Computer Science    
   
Table of contents
(Prev) Live Communications Server 2005LiveCode (Next)

Live USB

A live USB of Ubuntu, running Firefox, OpenOffice.org and the Nautilus file manager.

A live USB is a USB flash drive or a USB external hard disk drive containing a full operating system that can be booted. Live USBs are closely related to live CDs, but sometimes have the ability to persistently save settings and permanently install software packages back onto the USB device. Like live CDs, live USBs can be used in embedded systems for system administration, data recovery, or the testing of operating system distributions without committing to a permanent installation on the local hard disk drive. Many operating systems including Mac OS 9, Mac OS X, Microsoft Windows XP Embedded and many of the Linux distributions and BSD distributions can also be used from a USB flash drive. Windows 8 is also capable of running from a USB drive, with Windows To Go.

Contents

History

Since 1999, Apple Macintosh computers (beginning with the Power Mac G4 with AGP graphics and the slot-loading iMac G3 models)[1] have been able to boot from USB. Intel-based Macs support booting Mac OS X from USB.

Specialized USB-based booting was proposed by IBM in 2004, in the papers "Reincarnating PCs with Portable SoulPads" (PDF & Summary) and Boot Linux from a FireWire device.[2]

Benefits and limitations

Live USBs share many of the benefits and limitations of live CDs.

Benefits

  • In contrast to live CDs, the data contained on the booting device can be changed and additional data stored on the same device. A user can carry his or her preferred operating system, applications, configuration, and personal files with them, making it easy to share a single system between multiple users.
  • Live USBs provide the additional benefit of enhanced privacy because users can easily carry the USB device with them or store it in a secure location (e.g. a safe), reducing the opportunities for others to access their data. On the other hand, a USB device is easily lost or stolen, so data encryption and backup is even more important than with a typical desktop system.
  • The absence of moving parts in USB flash devices allows true random access avoiding the rotational latency and seek time (see mechanical latency) of hard drives or optical media, meaning small programs will start faster from a USB flash drive than from a local hard disk or live CD. However, as USB devices typically achieve lower data transfer rates than internal hard drives, booting from a computer lacking USB 2.0 support can be very slow.

Limitations

  • USB controllers on add-in cards (e.g., ISA, PCI, and PCI-E) are almost never capable of being booted from, so systems that do not have native USB controllers in their chipset (e.g., such as older ones before USB) likely will be unable to boot from USB even when USB is enabled via such an add-in card.
  • Some computers, particularly older ones, may not have a BIOS that supports USB booting. Many which do support USB booting may still be unable to boot the device in question. In these cases a computer can often be "redirected" to boot from a USB device through use of an initial bootable CD or floppy disk.[3][4][5]
  • Intel-based Macintosh computers have limitations when booting from USB devices – while the Extensible Firmware Interface (EFI) firmware can recognize and boot from USB drives, it can only do this in EFI mode. When the firmware switches to "legacy" BIOS mode, it no longer recognizes USB drives. Non-OS X systems may not be typically booted in EFI mode, notably Windows and Linux, and thus USB booting may be limited to supported hardware and software combinations, which can easily be booted via EFI,[6] however, a program called Mac Linux USB Loader can allievate the task of booting a Linux-live USB on a Mac. This limitation could be fixed by either changing the Apple firmware to include a USB driver in BIOS mode, or changing the operating systems to remove the dependency on the BIOS.
  • Due to the additional write cycles that occur on a full-blown installation, the life of the flash drive may be slightly reduced. This doesn't apply to systems particularly designed for live systems which keep all changes in RAM until the user logs off.[7] A write-locked SD card (known as a Live SD the solid-state counterpart to a Live CD) in a USB flash card reader adapter is an effective way to avoid any duty cycles on the flash medium from writes and circumvent this problem. The SD card as a WORM device has an essentially unlimited life. An OS such as Linux can then run from the live USB/SD card and use conventional media for writing, such as magnetic disks, to preserve system changes; see Persistence (computer science).

Principle of installation

Various applications exist to create live USBs; examples include the WiNToBootic (Windows focused) or Fedora Live USB Creator and UNetbootin and MultiSystem LiveUSB MultiBoot, which works with a variety of distributions. A few Linux distribution and live CDs have ready-made scripts which perform the steps below automatically. In addition, on Knoppix and Ubuntu extra applications can be installed, and a persistent file system can be used to store changes.

To set up a live USB system for commodity PC hardware, the following steps need to be done:

  • A USB flash drive needs to be connected to the system, and be detected by it
  • One or more partitions may need to be created on the USB flash drive
  • The "bootable" flag must be set on the primary partition on the USB flash drive
  • An MBR must be written to the primary partition of the USB flash drive
  • The partition must be formatted (most often in FAT32 format, but other file systems can be used too)
  • A bootloader must be installed to the partition (most often using syslinux when installing a Linux system)
  • A bootloader configuration file (if used) must be written
  • The necessary files of the operating system and default applications must be copied to the USB flash drive
  • Language and keyboard files (if used) must be written to the USB flash drive

(Actual use of a CD or DVD will allow the user to choose if the medium can later be written to. Write Once Read Many discs allow certainty that the live system will be clean the next time it is re-booted.)

Knoppix live CDs have a utility that, on boot, allows users to declare their intent to write the operating system's file structures either temporarily, to a RAM disk, or permanently, on disk and flash media to preserve any added configurations and security updates. This can be easier than re-creating the USB system but may be moot since many current (circa 2010) live USB tools are simple to use.

Full install

The second type of live USB is closely related to a traditional operating system hard drive install with minor modifications like the elimination of swap partitions and files.

AdvantagesDisadvantages
  • Updating applications or the whole thing is as easy as the parent distribution used to create it.
  • Full system encryption possible.
  • Easier to customize with the user's preferred Window Manager and applications.
  • Base install usually starts at approximately 200MB (although some can be as little as 40MB) and grows as the user adds applications.
  • Due to the additional write cycles that occur on a full-blown installation, the life of the flash drive may be slightly reduced. This doesn't apply to systems particularly designed for live systems which keep all changes in RAM until the user logs off.

Examples of Live-USB Operating Systems

Bootable Windows To Go USB flash drive
  • BeleniX: Customized OpenSolaris installs including live CD and live USB.[8]
  • Debian officially supports a Debian live project providing live images for its stable releases, with a choice of several desktop environments
  • DidJiX: the free and open source digital DJ software Mixxx powered by the simple and lightweight Linux distribution ArchLinux on a usb live system!
  • Fedora (with Fedora Live USB creator)
  • Gentoo Gentoo USB Live.
  • Haiku: the Installer tool installs the operating system onto a hard disk or a USB Live indifferently.
  • Knoppix, one of the first live Linux distributions
  • Mac OS X (Intel):The Intel versions of Mac OS X can be booted off any USB file system including (but not limited to) USB flash drives.
  • OpenBSD[9]
  • OpenSolaris: The Distribution Constructor project has tools allowing users to build an install image.
  • OS-9 RTOS: The standard OS-9 Configuration Wizard for X86 creates bootable USB sticks. OS-9 5.0 for X86 will support the creation of bootable CDs.
  • OSx86: some "hacked" Mac OS X images can be written to a USB flash drive and turn it into a bootable Mac OS X system.
  • Pardus: by usb creator tools
  • Puredyne: live CD/DVD/USB distribution for media artists and designers.
  • PCLinuxOS: Version 2009.1 comes with a live USB creator tool, version 2008 "MiniMe" can be installed manually.[10]
  • Puppy Linux Designed for easy install on USB.[11]
  • Sugar: Sugar on a Stick is a LiveUSB for children and learning.
  • Super OS: usb-creator and cd2usb included on the DVD.
  • Ubuntu (can be installed directly to a flash drive or USB external hard drive manually by using tools like usb-creator, UNetbootin or cd2usb)
  • Windows To Go: Windows 8 feature that will allow the entire system to run from a USB drive, including programs, settings and documents
  • Windows Preinstallation Environment: Freely available version of a live Windows installation, command-line only.

Comparison

DistributionAlternatives to live Cd creationFile savingApplication savingBoot methods
Fedora 9Netinstaller (downloads iso & makes Usb), UNetbootinin foldernone 
GobolinuxZip + sh&bat scriptsN/AN/A2ram (gobolinux toram)
siduxUSB installer GUIin folder, on USB stickautonormal
SlaxZip + sh&bat scripts, UNetbootinN/AN/A 
SliTaznone & from internal drive($tazusb)in hacker folderthrough script (Tazusb)2ram - lowram
(K,L,X)UbuntuUNetbootinautoauto 
Wolvixnone (Control Panel)auto after making permanent space (Control panel)autoAllUsb - 2Ram

Syslinux is a program that makes a USB storage device bootable (they are often used after extracting files to the formatted media).

See also

References

(Prev) Live Communications Server 2005LiveCode (Next)