To repair a computer with booting issues, technicians often use lightweight operating systems on bootable media and a command line interface. The development of the first Live CDs with graphical user interface made it feasible for non-technicians to repair malfunctioning computers. Most Live CDs are Linux based, and in addition to repairing computers, these would occasionally be used in their own right as operating systems. Personal computers introduced USB booting in the early 2000s, with the Macintosh computers introducing the functionality in 1999 beginning with the Power Mac G4 with AGP graphics and the slot-loading iMac G3 models. Intel-based Macs carried this functionality over with booting macOS from USB. Specialized USB-based booting was proposed by IBM in 2004 with Reincarnating PCs with Portable SoulPads and Boot GNU/Linux from a FireWire device.
Benefits and limitations
Live USBs share many of the benefits and limitations of live CDs, and also incorporate their own.
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 their 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, 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 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 older computers that lack USB 2.0 or newer can be very slow.
Limitations
LiveUSB OSes like Ubuntu Linux apply all filesystem writes to a casper filesystem overlay that, once full or out of flash drive space, becomes unusable and the OS ceases to boot.
USB controllers on add-in cards are almost never capable of being booted from, so systems that do not have native USB controllers in their chipset 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.
Some Intel-based Macintosh computers have limitations when booting from USB devices – while the Extensible Firmware Interfacefirmware can recognize and boot from USB drives, it can do this in only EFI mode. When the firmware switches to "legacy" BIOS mode, it no longer recognizes USB drives. Non-Macintosh systems, notably Windows and Linux, may not be typically booted in EFI mode and thus USB booting may be limited to supported hardware and software combinations that can easily be booted via EFI. However, programs like Mac Linux USB Loader can alleviate the difficulties of 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. A write-lockedSD card 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.
Setup
exist to create live USBs; examples include Rufus, Fedora Live USB Creator, UNetbootin, , , and , which works with a variety of distributions. A few Linux distributions 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 persistentfile system can be used to store changes. A base install ranges between as little as 16 MiB to a large DVD-sized install. To set up a live USB system for commodity PC hardware, the following steps must be taken:
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
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 or flash media to preserve any added configurations and security updates. This can be easier than recreating the USB system but may be moot since many live USB tools are simple to use.
Full installation
An alternative to a live solution is a traditional operating system installation with the elimination of swap partitions. This installation has the advantage of being efficient for the software, as a live installation would still contain software removed from the persistent file due to the operating system’s installer still being included with the media. However, a full installation is not without disadvantages; due to the additional write cycles that occur on a full installation, the life of the flash drive may be slightly reduced. To mitigate this, some live systems are designed to store changes in RAM until the user powers down the system, which then writes such changes. Another factor is if the speed of the storage device is poor; performance can be comparable to legacy computers even on machines with modern parts if the flash drive transfers such speeds. One way to solve this is to use a USB hard drive, as they generally give better performance than flash drives regardless of the connector.
Microsoft Windows
Although many live USBs rely on booting an open-source operating system such as Linux, it is possible to create live USBs for Microsoft Windows by using Diskpart or WinToUSB.