This page explains how to create and use Fedora USB media. A Live USB system stored on flash memory, sometimes called a stick, lets you boot any USB-bootable computer into a Fedora operating system environment without writing to that computer's hard disk. The Live USB stick can feature an area to store changes to the system, called a persistent overlay. It can also have a separate area to store user account information and data such as documents and downloaded files, with optional encryption for security and peace of mind. Finally, with a non-destructive installation, pre-existing files and excess storage space on the stick are accessible from the system. Essentially, you can carry your computer with you in your pocket, booting it on nearly any system you find yourself using.

With current Fedora releases you can also write the non-live Fedora installation images (the DVD and network installation images) to a USB stick, which many users find more convenient and faster than writing to an actual optical disc.

Quick start The process for most people is simple. Almost all USB sticks are provided by hardware manufacturers ready to use with this process. If you have any documents on your USB stick, it's not a bad idea to back them up before you start.

Creating Live CD ISO image A Live USB system is created from the same ISO image file that is used to create Live CD/DVD media. You can download ISO images for the official Fedora release from the Fedora download site. Consult How to create and use a Live CD for more information on creating your own customized ISO image file.

System Requirements

A working computer running GNU/Linux, Windows or MacOS.

A USB flash drive, also known as USB stick, thumb drive, pen drive, or jump drive, with 1 GB or more of storage space.

Ability to boot from USB media

Not all computers can boot from USB media, due to different BIOS settings and system capabilities. If your computer cannot do so, this procedure will not be useful. If you are not sure and don't mind downloading and installing an image on your USB drive (possibly wiping its data), the only risk is wasting some time.

If your USB stick is not in working order, this procedure may fail. Watch for error messages during the process.

GNU/Linux instructions

Identifying your USB disk

The first step is to identify the name of the USB drive partition.

Insert the USB stick into a USB port.

Open a terminal and run dmesg.

You will see something like

[32656.573467] sd 8:0:0:0: [sdX] Attached SCSI removable disk

where sdX will be sdb, sdc, sdd, etc. Take note of this label as it is the name of the disk you will use. We'll call it sdX from now on.

Checking USB disk size

As noted before, the disk must have at least 1 GB of storage space. You can check this by running the df -h command. Look for a line like the following:

/dev/sdX1 3.9G 4.0K 3.9G 1% /media/usbdisk

and make sure the first column reads more than 1.0G.

You can also use a file manager like nautilus, by right clicking and selecting Properties:

Writing the image

Graphical method: using liveusb-creator (Windows/Fedora only)

Fedora USB sticks can be created using the liveusb-creator utility. Note that this utility is only capable of writing Live images.

You can use Add/Remove Programs and search for liveusb-creator, or use the command line:

su -c 'yum install liveusb-creator'

To start, run liveusb-creator on the command line or search liveusb-creator on the GNOME activities overview.

To use the tool, simply select a Fedora release to download from the drop-down box at top-right (or select an ISO you have already downloaded using the Browse button at top-left), select the USB stick to which you wish to write the image from the Target Device drop-down box, and hit the Create Live USB button.

Another graphical method: using Unetbootin

About Unetbootin Following each release, Fedora support volunteers receive reports of problems with installation images created by Unetbootin. Using the most recent version of Unetbootin available has been known to improve results. While your results may vary, it is usually the case that the liveusb-creator, livecd-iso-to-disk and dd methods give better results than unetbootin. If you encounter problems with Unetbootin, please contact the Unetbootin developers, not the Fedora developers.

Unetbootin is a graphical bootable USB image creator. Using it will allow you to preserve any data you have in the USB drive.

Note that the process will take some time and you will not see any information while it is running.

Command line method: Using the livecd-iso-to-disk tool (Fedora only)

The livecd-iso-to-disk is the most capable and often most reliable method of writing a Fedora ISO image to a USB stick, but can only reliably be used from within Fedora. It does not work in Windows and is not supported (and will usually fail) in non-Fedora distributions. Please use the liveusb-creator tool, dd (or an equivalent tool), or a third-party tool such as unetbootin on other operating systems. It is also not a good idea to try and write a new Fedora release using the version of livecd-iso-to-disk in a much older Fedora release: it is best to only use a release a maximum of two versions older than the release you are trying to write.

Make sure the livecd-tools RPM is installed with the command rpm -q livecd-tools.
You will see the name of the RPM and a version number if it is installed, or no output if it is not installed.

If "livecd-tools" is not installed, install it using this command, or PackageKit: su -c 'yum install livecd-tools'

Detailed usage information is available in the first pages of the livecd-iso-to-disk script, which you can also see by running su -c 'livecd-iso-to-disk --help'. Basic examples follow.

To make an existing USB stick bootable as a Fedora image without deleting any of the data on it, make sure that the USB drive is not mounted before executing the following, and give the root password when prompted: su -c "livecd-iso-to-disk Fedora-17-x86_64-Live-Desktop.iso /dev/sdX"

See Data persistence below for how to create Live USB devices with more than temporary storage of user files and settings.

In case it is not possible to boot from a disk created with the method shown above, before re-partitioning and re-formatting, often resetting the master boot record will enable booting:
su -c "livecd-iso-to-disk --reset-mbr Fedora-17-x86_64-Live-Desktop.iso /dev/sdX"

CAUTION The following method will erase all data on the USB drive! Please read the instructions below carefully.

If necessary, you can have livecd-iso-to-disk re-partition and re-format the target stick: su -c "livecd-iso-to-disk --format --msdos --reset-mbr Fedora-17-x86_64-Live-Desktop.iso /dev/sdX"

UEFI boot of USB sticks

Whether a Fedora image written to a USB stick will be bootable natively via UEFI is a somewhat complex question which depends on the Fedora release, the type of image (live or non-live), and the method used to write it. The --efi parameter to the livecd-iso-to-disk tool attempts to make a stick written with that tool natively UEFI bootable.

As of Fedora 17, all images written using the dd method should be UEFI-bootable, and all images written with livecd-iso-to-disk --format --reset-mbr --efi should also be UEFI-bootable. Use of --efi without --format and --reset-mbr can be considered a 'best effort', and may not produce a UEFI-bootable stick.

Creating a USB stick from a running live environment

If you are already running a live CD, DVD, or USB and want to convert that into a bootable USB stick, run the following command: su -c "livecd-iso-to-disk /run/initramfs/livedev /dev/sdX"

(For versions before Fedora 17, use /dev/live instead of /run/initramfs/livedev.)

Data persistence

Data persistence means that your files and settings will remain even after you reboot your live system. You can perform updates just like a regular installation to your hard disk, except that kernel updates require manual intervention and overlay space may be insufficient. The primary use of this feature is booting a USB stick with your live image as well as the persistent changes. Note that you will need to have space on your target USB stick for the live image plus your overlay plus any other data you want on the stick.

Use the Graphical Method described above to do this easily. There is a graphical slider in the interface you can use to assign space on the target stick for persistent storage.

If using the livecd-iso-to-disk tool, add the --overlay-size-mb parameter to add a persistent data storage area to the target stick. For example: su -c "livecd-iso-to-disk --overlay-size-mb 512 Fedora-16-x86_64-Live-Desktop.iso /dev/USBPARTITIONNAME"

where 512 is the desired size (in megabytes) of the overlay. The livecd-iso-to-disk tool will not accept an overlay size value greater than 2047 for VFAT, but for ext[234] filesystems it is only limited by the available space.

Limited Lifetime of Persistent Overlay One very important note about using the "primary" persistent overlay for system changes is that due to the way it's currently implemented (as a Device-mapper copy-on-write snapshot), every single change to it (writes AND deletes) subtracts from its free space, so it will eventually be "used up" and your USB stick will no longer boot (see this dm-devel discussion and this page for emergency recovery). Because of these limitations, it is advisable to use the system-level persistence sparingly, for configuration changes and important security updates only. Or, if you have sufficient disk space available, changes to the LiveOS root filesystem snapshot can be merged into a new copy of the root filesystem. See this page section for instructions.

For normal, write-many storage (vs the write-once overlay), use the --home-size-mb option to create a home directory filesystem for personal files. The home.img can be re-used and loop mounted outside of the Live USB environment.

The persistent overlay status may be queried by issuing this command on the live system: dmsetup status live-rw

The returned value may look like this:

live-rw: 0 8388608 snapshot 42296/204800 176

where the fraction after 'snapshot' for the logical volume is that of 512-byte sectors consumed in the overlay.

Windows instructions

Using liveusb-creator

Fedora USB sticks can be created using the liveusb-creator utility. Note that this utility is only capable of writing Live images.

To use the tool, simply select a Fedora release to download from the drop-down box at top-right (or select an ISO you have already downloaded using the Browse button at top-left), select the USB stick to which you wish to write the image from the Target Device drop-down box, and hit the Create Live USB button.

Booting the image

Set USB as first boot device. Your BIOS may be different.

Power off the computer.

Plug the USB drive into a USB port.

Remove all other portable media, such as CD, DVD, or floppy disks.

Power on the computer.

If the computer is configured to automatically boot off of the USB drive, you will see a screen that says "Automatic boot in 10 seconds..." with a countdown.

If the computer starts to boot off the hard drive, you'll need to manually configure it to boot off the USB drive.

Wait for a safe point to reboot safely.

As the machine starts to reboot, watch carefully for instructions on which key to press (usually a function key or Escape) to enter the boot device selection menu, or "BIOS setup". Press and hold that key. If you miss the window of opportunity (often only a few seconds) then reboot and try again.

Use the BIOS setup menu to put your USB drive first in the boot sequence. It might be listed as a hard drive rather than a removable drive. Each hardware manufacturer has a slightly different method for doing so. Use caution! Your computer could become unbootable or lose functionality if you change any other settings. Though these settings can be reverted, you'll need to remember what you changed in order to do so.

Save the changes, exit, and the computer should boot the Live USB drive.

Issues using other Linux distributions

Ubuntu and derivative Linux distributions have a usb-creator program similar to Live USB Creator. This does not work with Fedora ISO images, it silently rejects them. usb-creator requires the ISO to have a Debian layout, with a /.disk/info file and a casper directory. Do not attempt to use this utility to write a Fedora ISO image.

The livecd-iso-to-disk script is not meant to be run from a non-Fedora system. Even if it happens to run and write a stick apparently successfully from some other distribution, the stick may well fail to boot. Use of livecd-iso-to-disk on any distribution other than Fedora is unsupported and not expected to work: please use an alternative method, such as dd described above.

Testing Live Image on USB

You can test your Live Image on USB using QEMU as shown in the screenshot below.

For example, you could type the following commands:

su -c 'umount /dev/sdX1'
qemu -hda /dev/sdX -m 1024 -vga std

Mounting a Live USB filesystem

You can use the liveimage-mount script in the livecd-tools package to mount an attached Live USB device or other LiveOS image, such as an ISO or Live CD. This is convenient when you want to copy in or out some file from the LiveOS filesystem on a Live USB, or just examine the files in a Live.iso or Live CD.

Kernel updates

If you have sufficient overlay space to accommodate a kernel update on a Live USB installation, the kernel and initramfs will be installed to the /boot directory. To put these into service they must be moved to the /syslinux directory of the installation partition. This is accessible from the running Live USB filesystem at either the /mnt/live or /run/initramfs/live mount point. The new initramfs (such as initramfs-3.3.2-6.fc16.x86_64.img) and kernel (such as vmlinuz-3.3.2-6.fc16.x86_64) should be moved to replace the /mnt/live/syslinux/initrd0.img and /mnt/live/syslinux/vmlinuz0 files, respectively.

Note: Beginning with Fedora 17 and updated Fedora 16, dracut no longer includes the dmsquash-live module by default. So one should include it in /etc/dracut.conf with, for example,

# echo 'add_dracutmodules+=" dmsquash-live "' >> /etc/dracut.conf

The following commands will move the new kernel and initramfs files and create symbolic links to them, in case one later wants to perform a full install of the image to a hard disk.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks or registered trademarks of
Red Hat, Inc. or its subsidiaries in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community
maintained site. Red Hat is not responsible for content.