Linux Create A Bootable USB Pen

How do I create a bootable USB pen drive to start my CentOS / Fedora Linux? How do I create a bootable USB flash pen for installation of Linux, and for creation of rescue and other special-purpose boot disks using command line options?

You need to format your USP pen device as Win FAT32. Once formatted type the following commands to make it bootable.

Our Device Names

  1. USB Pen Device Name : /dev/sdb1
  2. DVD Mount : /media/cdrom0
  3. USB Mount Point : /media/usb
  4. USB File System : Win FAT32
  5. ISO or DVD Image : Fedora / CentOS / RHEL
WARNING! These examples may crash your computer or result in data loss if not executed properly. You must understand device names, file systems and required to use fdisk partition table manipulator for Linux. This howto intended to simplify first-time installation of Linux, and for creation of rescue and other special-purpose boot disks.

To find information about your devices and current partitions run:
# dmesg | less
# dmesg | egrep -i 'cd|dvd'
# fdisk -l

Use the first command to identify the USB device name.


Type the following command to mount Fedora 12 iso image:
# mount Fedora-12-x86_64-netinst.iso -o loop /media/cdrom0/
# DVD=/media/cdrom0
# ls -l $DVD

Sample outputs:

total 6
dr-xr-xr-x 3 root root 2048 2009-11-09 05:37 EFI
drwxr-sr-x 3 root  499 2048 2009-11-09 05:37 images
drwxr-sr-x 2 root  499 2048 2009-11-09 05:36 isolinux

You need to use files stored in isolinux directory to create a bootable usb pen.

Format Usb

Create the fdisk partition:
# fdisk /dev/sdb
You need to create only 1 partition. Next format the partition:
# USB=/media/usb
# mkdosfs /dev/sdb1

Finally mount the partition:
# mkdir -p /media/usb
# mount /dev/sdb1 /media/usb
# USB=/media/usb

Copy Required Files

Type the following commands:
# cp -av $DVD/isolinux/* $USB
# cd $USB
# rm isolinux.bin TRANS.TBL
# mv isolinux.cfg syslinux.cfg

Also copy the installer’s initial RAM disk $DVD/images/pxeboot/initrd.img (for CentOS / RHEL Linux use $DVD/RedHat/images/pxeboot/initrd.img file) CD/DVD onto the usb drive:
# cp -v $DVD/images/pxeboot/initrd.img $USB

Unmount the USB drive

# umount /dev/sdb1

Make the USB Bootable

Type the following command to make the USB drive bootable
# syslinux /dev/sdb1
# mount /dev/sdb1 $USB

syslinux is a boot loader for the Linux operating system which operates off an MS-DOS/Windows FAT filesystem.

Install Grub

Type the following command to install GRUB on the USB device:
# grub-install --root-directory=$USB /dev/sdb
Create grub.conf:
# cd $USB
# mkdir -p boot/grub

Edit the grub.conf file

root (hd1,0)
title Fedora Linux 
kernel /vmlinuz
initrd /initrd.img

Finally, unmount the USB pen drive, enter:
# umount /dev/sdb1
Your USB pen is ready and should be bootable from the USB device. This can be used to install Fedora or CentOS or RHEL. You can also copy other required tools (such as sniffers or data recovery tools) on this pen. This is left as exercise for the reader.

Unetbootin Installer of Linux/BSD Distributions (GUI Tools)

If command line options are too complicated to follow. Try UNetbootin, which allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. To install to a partition or USB drive type the following command:
$ sudo apt-get install unetbootin
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lsb-desktop m4 aggregate lsb pax lsb-graphics lsb-core ncurses-term lsb-cxx
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
The following NEW packages will be installed:
  unetbootin unetbootin-translations
0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded.
Need to get 428kB of archives.
After this operation, 1,843kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 karmic/universe unetbootin 356-1 [223kB]
Get:2 karmic/universe unetbootin-translations 356-1 [205kB]
Fetched 428kB in 2s (156kB/s)                   
Selecting previously deselected package unetbootin.
(Reading database ... 254825 files and directories currently installed.)
Unpacking unetbootin (from .../unetbootin_356-1_amd64.deb) ...
Selecting previously deselected package unetbootin-translations.
Unpacking unetbootin-translations (from .../unetbootin-translations_356-1_all.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for man-db ...
Setting up unetbootin (356-1) ...
Setting up unetbootin-translations (356-1) ...

Type the following command to start unetbootin:
$ unetbootin

Fig.01: UNetbootin install Linux/BSD distributions to a partition or USB drive

Say Hello To “USB Startup Disk Creator”

You can also use “USB Startup Disk Creator” utility in Ubuntu that creates a persistent Ubuntu image on a USB disk. This is called a “Live USB”. You can use the Live USB to install Ubuntu on your computer or to run Ubuntu without affecting your system hardware. You need USB disk 1 GB (2GB is suggested) or larger in size and Ubuntu systems 8.10 or later. You also need Ubuntu ISO Image which can be downloaded from the official website. To start USB Startup Disk Creator visit
System > Administration > USB Startup Disk Creator

Fig.02: Ubuntu - USB Startup Disk Creator

  • Click the Other… button and specify the Ubuntu image you downloaded in the previous step.
  • Under USB Disk to use your USB disk is highlighted.
  • To make the Live USB a writeable disk, indicate how much memory to use for extra storage. If you don’t want the Live USB to be modifiable, select the second option, Discarded on Shutdown.
  • Finally click Make Startup Disk to make a Live USB.

Finally, you can always use LiveCDs to recover or fix Linux system issues.


  • See man pages – fdisk, mkfs, syslinux, and usb-creator-gtk (Ubuntu specific tool)

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 20 comments so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
20 comments… add one
  • Johan Mar 12, 2010 @ 8:20

    The “USB Startup Disk Creator” utility in Ubuntu could also create an OpenSuse startup usb pen for me from the OpenSuse iso and the great thing is, you don’t have to format the pen for a new setup.

  • andy Mar 12, 2010 @ 8:27


    Could you give the link or make an article how to make bootable usb on linux (ubuntu) for XP or vista.

  • Dariusz Mar 12, 2010 @ 14:26

    why use windowz if there is a Linux?

  • Telvin Apr 5, 2010 @ 17:39

    hey dude who is using windows now . common wake up this is 2010 . u can get anything and more in Linux .so throw away windows and have the fun with Linux

    • amarjeet Aug 12, 2011 @ 13:08

      hey dude u r right yar .. i feel very good after using the linux

  • ADAM Jul 17, 2010 @ 16:23

    any idea on getting this working with lilo rather than grub?

  • Sushant Chawla Sep 27, 2010 @ 7:01


    The tutorial seems to have the right steps but it is not compatible with CentOS if you have configured your USB drive on Redhat & vice versa.

    I tried to install CentOS with my USB stick on which I followed the above steps for creating it as USB bootable drive. I created it on RHEL 5.3 but when I started installation for CentOS it said install media not matching with the boot media.

  • sundar_ima Apr 30, 2011 @ 10:12

    link to automated MultiBootUSB script to install multiple linux distros at a time is given below.
    and the forum link is here

  • Paul W May 3, 2011 @ 3:36

    I’ve tried to load an ISO image of Ubuntu 10.10 using usb-creator.exe and clicking on “other”. When I choose the ISO image it doesn’t come up in the box on top. Nothing happens and the “create Startup Disk” button is still greyed out. What could be wrong here?

  • barrenaedu Jun 23, 2011 @ 3:08

    Instead using “#dmesg” I would rather use “#sudo fdisk -l”. It’s safer and avoid confusions.

  • raman jangir Aug 29, 2011 @ 4:54


    Could you give the link or make an article how to make bootable usb on linux (ubuntu) for XP or vista..

  • Paul Aug 30, 2011 @ 9:17

    Two questions:
    1) What does the option called “indicate how much memory to use for extra storage” do, exactly? If I leave it at zero (the way it comes preset), is that the same as checking “discard on shutdown”?

    2) Are there any advantages to Startup Disk Creator vs. UNetBootin, or vice versa?

  • Rahul Agnihotri Dec 24, 2011 @ 17:33

    My two cents –
    I was using the above steps to create a F15 x86_64 bootable pen drive for doing a from the corresponding dvd .iso. The objective is to use it for installation since the CD / DVD drive on the target machine is not working.

    However, after doing each step as directed, found that the space used on the pen drive was only around 100 megs.Since the .iso is around 3.5 gigs, was suspecting that the substantial set of files have not been transferred so ran the Unetbootin and could immediately see what was missing – the package files!

    Not sure if I missed something here but might be worth considering an update to the article to cover this aspect :)

  • Lake Aug 26, 2012 @ 4:02

    I didn’t get too far into this tutorial because there are a lot of missing steps. For example, what commands do I execute in fdisk? fdisking the USB drive doesn’t do anything but ask for more commands. I assumed I had to delete the old partition and create a new one, so I did that. Then I tried mkdosfs but it wouldn’t do it because the drive was mounted. So I had to unmount the drive. Then the computer didn’t know what to do with /media/usb in the next step, so I finally just gave up. Thanks for the guide, but I think there are a lot of holes that need to be filled in. Also, it would be nice if it was a little more general, since this seemed to be based on the assumption that there are certain files in the ISO image.

  • Marcin Sep 7, 2012 @ 21:35

    Brilliant Tutorial – worked flawlessly.
    If I would like to use URL installation, what syntax is to append Kickstart file to the installation?
    Lets assume my install dir is:
    How would syntax looked liked if I had ks.cfg file located on:

    Thanks a lot in advance

  • saurabh singh Mar 8, 2013 @ 7:43

    getting the following message wile grub installation:-
    #grub-install –recheck –root-directory=/mnt /dev/sdd
    Probing devices to guess BIOS drives. This may take a long time.
    The file /mnt/boot/grub/stage1 not read correctly.

    Any Clue what it can be.

  • Robert England Apr 15, 2013 @ 15:32


    how do I make a bootable windows usb stick? I installed ubuntu to test it but after a week I found a lot of problems:

    – no properly printer drivers
    – on skype I sound like shit (no noise cancelation)
    – not really a gaming OS.
    – my cpu fan is constantly running, it is very loud.

    .. now I want to coe back to windows but don’t know how, I don’t have a empty dvd right now..

  • sachin kate Sep 16, 2013 @ 2:34

    i am using ubantu 12.04 so give me about it;

  • ibcbet Jan 22, 2015 @ 9:40

    Hurrah! In the end I got a website from where I know how to genuinely obtain helpful facts regarding my study and knowledge.

  • rest Dec 30, 2015 @ 5:31

    Don’t waste your time with the command line instructions, they are not working (at least for CentOS), and yes, I read carefully, and repeated the instructions twice.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @