USB > BootUsb

This page is about boot Linux via USB pendrives in any computer with or without USB-BIOS capability (in this last case, using a ?BootFloppy). You can install Linux in your USB pendrive or buy it preinstalled.

BIOS and USB standard mass storage interface

There are two common BIOS methods for direct USB booting:

Most computers (e.g. just about all Dells) made today have a BIOS that supports the USBHDD method so it's expected that this will eventually become the standard way of booting a USB device. However, many motherboards will support BOTH methods, and many older motherboards have USBZIP support.

You need a USB device with a standard mass storage interface and with at least 128 MB storage capacity (the distros generally use between 50 and 64 MB) to work with Linux.

See StandardPendrive.


The following instructions refer to /dev/sda. However, if you have serial-ATA harddisks, then the pendrive will probably be /dev/sdc. Do NOT accidentally write to the wrong drive, or you will destroy your main operating system or data!

USB pendrive location and mount

Most USB pendrives are located at device node ?/dev/sda after they are plugged into the USB port.

However, you can verify this location by typing this command inside a terminal window:

dmesg | grep scsi -A 3

and it should tell you the device name for your USB (SCSI emulated) devices, along with the vendor name.

See: dmesg.

If you cannot find it, you have to load the USBStorage ?module. In a terminal, type:

modprobe usb-storage

and ?mount the usb filesystems

mount -t usb-devfs none /proc/bus/usb

Partitioning the USB key

Partition the USB pendrive with ?fdisk or ?cfdisk (the USB key must not be mounted!).

Using fdisk: Press P to see the list of all ?partitions. Use D repeatedly to delete all partitions. Create a new partition pressing N, P, 1 and accept all defaults concerning the size (minimum partition size necessary will be around 60 MB). Set the bootable flag with A, press T, 6 to create a FAT16 partition and press W to store and exit from fdisk.

The resulting partition table will look something like this:

 Device       Boot      Start         End      Blocks        Id     System
/dev/sda1   *           1              3730     1014544    6      FAT16

Now enter mkdosfs /dev/sda1 at the prompt to create a FAT16 filesystem, because otherwise the installation steps described under 'Unburned using DSL' later on won't work.

Master Boot Record

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

Installation methods

There are two installation methods:

Unburned using DamnSmallLinux

To install DamnSmallLinux download the ISO image and as root user go the directory with the dsl-*.iso file and type the following:

  mkdir dsl_temp
  mkdir dsl_usb
  mount -o loop dsl-*.iso dsl_temp
  cp -a dsl_temp/* dsl_usb
  cd dsl_usb
  mv boot/isolinux/* ./
  rm -Rf boot
  mv isolinux.bin syslinux.bin
  mv isolinux.cfg syslinux.cfg
  cd ..
  mkdir usb_pen
  mount -t vfat /dev/sda1 usb_pen
  cp -a dsl_usb/* usb_pen
  umount usb_pen
  umount dsl_temp
  syslinux /dev/sda1

See also BootUsb2, IsoBuster, ?Isolinux, Grub .

USB Debian distros

More information

See also: