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.
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.
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
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.
df -Th command and note down the USB mounted partition name.
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.