How to create CentOS bootable USB?

In this post, we will see how to create a bootable USB flash drive of CentOS server operating system. Using this bootable CentOS USB, you can install CentOS on your servers or even computers to test or learn CentOS.

We will see methods of creating CentOS bootable USB on Linux as well as Windows systems. On Linux, we do not need any external tool to make it bootable, while on Windows we will use few tools to create CentOS bootable Pen Drive.

On Linux or on Windows, first step will be to download latest version ISO file of CentOS server operating system. Navigate to CentOS website. Navigate to download page and click on ISO file link.

centos-iso

Choose the recommended download mirror near your geographical location to experience faster download.

centos-mirrors

Save the file to your computer. Default downloading location is user’s download folder. However, you can save it anywhere you want.

centos iso file

Now, let us check out the process of creating CentOS USB on Linux and Windows using following methods:

A. Linux methods of creating CentOS USB

A.1 Command line method

Insert a USB drive and ensure you do not have any useful data on it as it will be wiped off. Run the following command to check the path to USB drive

$ df -h

Generally, the USB drive inserted into the system will be displayed at last of the list. However, you should match the size and label of your disk to ensure that you are overwriting the correct drive.

df flash drive

Now, use ‘dd’ command to write the ISO file to USB using following command syntax:

$ sudo dd bs=4M if=[source path to ISO file] of=[destination path to USB] status=progress oflag=sync

e.g. sudo dd bs=4M if=/home/techsolveprac/Downloads/Centos-8.3.2011-x86_64-boot.iso of=/dev/sdb status=progress oflag=sync

Please note that you should ignore the last numerical digit in USB path (for e.g. usb path displayed is /dev/sdb1 but you should use /dev/sdb only). In most cases it will /dev/sdb, but you should carefully check as in some cases it can be /dev/sdc or any other alphabet at last. Use the displayed alphabet.

sudo dd command

Wait for the ISO file flashing to USB drive. Once finished, eject the USB and re-insert. The USB label will be changed to CentOS-version and its size will be approximately equal to the size of ISO file. For e.g. CentOS-8-3-2011-x86_64-dvd. You can check out the above process recorded as a video to create CentOS bootable USB using terminal in Linux.

B. Windows methods of creating CentOS USB

On windows you can any use of the tool given below as per choice:

B.1 Balena Etcher

Download, install and run Balena Etcher tool. Then follow three simple steps to flash CentOS ISO to flash drive as given below:

Step 1: Select CentOS ISO file from download location.

Step 2: Insert USB Flash Drive.

Step 3: Click on Flash.

balena centos

Once the flashing is complete, Balena Etcher will validate the USB. Once the validation is complete you can close Balena Etcher software. If you want to see the process in detail as a recorded video, check out how to create CentOS bootable pen drive on Windows using Balena Etcher Software.

B.2 Rufus

Download the executable file and run Rufus tool. Click on ‘Select’ button to select the ISO file from download location. Keep the default settings (you can identify CentOS usb by volume label after flashing is complete) and click on “Start” to flash the ISO file to Pen Drive.

centos rufus

Wait for the process to finish.

B.3 Fedora Media Writer

Download and install fedora media writer. Open fedora media writer once installation is complete. Click on “Custom image” button and select CentOS ISO file from download location.

Next, insert a flash drive. The flash drive will be selected in Fedora Media Writer. Click on “Write to disk” button to flash CentOS iso file to USB.

Wait for the flashing to complete.

Note: In some of the above cases, it is possible that the Flash Drive may reduce to a smaller size and become unusable for normal use. Don’t worry your flash drive is not damaged it happens just because the ISO file is written in dd mode. If this happens with your flash drive, check out how to repair USB drives damaged by Flashing tools.

Be the first to comment

Leave a Reply (if you any question or feedback for us)