• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

Create bootable usb key for CentOS 7 installation

March 27, 2016 by Sharad Chhetri

In this tutorial we will learn, how to create bootable usb key for CenOS 7 installation. Currently many laptops/systems are available in market which are without CD/DVD drive.In a short words, technology is changing very fast.

First download the CentOS 7 iso file from CentOS official website. And save it in your system.

To make bootable USB key or USB pen drive for CentOS 7 installation has a few steps to follow. It includes the following steps –

1. First format the USB key.
2. Create bootable USB key for CentOS 7 installation by dd command.

Readers! we strongly recommend to read the instruction carefully.

1. First format the USB key

Take the backup from your pen drive whatever you have saved in because we are going to format the USB key now.

Insert the USB key to your system on USB port.

Run the command, it will show mounted partition including the USB key which is mounted with system.

sudo df -Th

The mounted partition for USB key will show in /media/ . Let’s have an example from our laptop.

USB key CentOS 7 Installation

In above screenshot you can see, USB key got partition name as /dev/sdc and it is mounted on directory path /media/sharad/0E2D-6CD1 . In your system this will be different hence work accordingly. [Do’nt do copy paste of all steps, please do understand. If you do’nt understand and randomly hit the command, I am sure you will lost your data from some partition. So be careful]

Format the usb key by selecting its partition. We are formatting the USB key and making vfat file system.

Syntax:

sudo umount /media//
sudo mkfs.vfat 

Now as per my USB key mounted information I will run the below command. So as per your USB key mounted partition information you have to replace /dev/sdc from below command.

sudo umount /media/sharad/0E2D-6CD1
sudo mkfs.vfat /dev/sdc

Example:

sharad@linuxworld:~$ sudo mkfs.vfat /dev/sdc
mkfs.fat 3.0.26 (2014-03-07)
mkfs.vfat: /dev/sdc contains a mounted filesystem.
sharad@linuxworld:~$

Now USB key is formatted with VFAT filesystem. Unplug the USB key from system and plug it again. In next step we will make the USB key bootable for CentOS 7.

Create bootable USB key for CentOS 7 installation by dd command

Now we are only one step ahead. We will use dd command to create bootable USB key for CentOS 7 installation.
Re-run the df -Th command and note down the USB mounted partition name.

Syntax:

sudo dd if=/path/CentOS.iso_file_path/ of=/dev/

NOTE: In above command syntax, the USB partition must not have number(partition number) like /dev/sdb1, /dev/sdb2, /dev/sdc2 etc. Plus it should be cleaned format with vfat.

Example from our system :

sudo dd if=/partition9/centos-7-dvd.iso of=/dev/sdc

It will take some time to make USB key bootable hence strictly advice you to wait till process get completed.

Once the dd command is completed, unplug the USB key. Now the USB key is bootable and ready for CentOS 7 installation.

You can now install CentOS 7 on your system by using this bootable USB key.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How to fix read only USB pen drive in Ubuntu
  2. GUI : Format USB drive on Ubuntu
  3. Set GRUB password after installation of CentOS/Red Hat
  4. Create and Remove AWS EC2 key pair by using command line
  5. Installation of OpenERP 7.0 in Ubuntu
  6. Add swap file in linux without reboot after OS installation
  7. Quick installation of Google Chrome in Linux Mint 15 Olivia
  8. Easy and quick installation of VirtualBox 4.2.10 in Linux Mint Olivia
  9. How to test rpm package before installation
  10. Prevent starting service after package installation on Ubuntu / Debian

Filed Under: Linux Tagged With: centos 7

Reader Interactions

Comments

  1. Waqas says

    March 10, 2017 at 10:18 am

    Hey Buddy,
    I followed exactly the same steps, but can’t get my USB to boot the system. I got no error while following the procedures, everything went smooth. On my target machine I set BIOS to boot from USB. (I validated it with one working bootable USB).
    What could be wrong ?

    • Sharad Chhetri says

      March 10, 2017 at 2:31 pm

      Hey Waqas!

      Do a try with Diskpart. But on USB hardware failure, these steps won’t work.

      Regards
      Sharad

      • Waqas says

        March 10, 2017 at 4:02 pm

        Hi Sharad,

        Thanks for reply mate.

        I understand that diskpart will create or delete partitions but how should I use it in this process ?

        • Sharad Chhetri says

          March 10, 2017 at 6:02 pm

          here, dosfsck command is the main player which help you to repair the filesystem. My bad! check with Gparted , it is GUI and do not lead to mistake. If this also do not help, may be hardware issue happened .

          All the best.

          Regards
          Sharad

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

Install and optimize the png file by using optipng

rsync all files,hidden files,symlinks,hardlinks to remotes Linux Server

Nagios HTTP WARNING: HTTP/1.1 403 Forbidden

Run the script using nohup without hitting enter key two times

How to reset forgot root password in CentOS 6.x and Redhat 6.x

Convert hyphen to underscore in between all filenames shell script

configure: error: C++ compiler cannot create executables

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy