Copy Centos 7 ISO images to usb flash drive
Some systems no longer come with CD/DVD roms, to install Centos 7 on these systems we must transfer the downloaded ISO image to a usb flash (thumb) drive.
- Download Cento 7 from your favorite mirror
- Create a bootable Centos 7 image on the USB flash drive. If you are windows centric user, follow the reference link below that uses Win32DiskImager utility. Since I’m using a Zorin (Ubuntu variant) based laptop I’ll just use the dd command.
- Insert the flash drive into your linux computer.
To determine where the flash drive is mounted issue the following command:
Your output should look similar to this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 298.1G 0 disk ├─sda1 8:1 0 294.3G 0 part / ├─sda2 8:2 0 1K 0 part └─sda5 8:5 0 3.8G 0 part [SWAP] sdb 8:16 1 15G 0 disk └─sdb1 8:17 1 15G 0 part /media/johndoe/BEA0-A4EA
- As you can see from the printout my 16GB flash drive is device sdb and its mounted on /media/johndoe/BEA0-A4EA. Armed with this information, we’ll need to first unmount (not remove from the computer) the flash drive before we use the dd command to transfer the image. To unmount the flash drive issue the following
- Once the drive has been unmounted I use the dd command to write the iso image to the flash drive. The syntax for dd is
dd bs=4M if=CentOS-7-x86_64-DVD-1511.iso of=/dev/sdXwhere X is the device number of the usb flash drive. Get this right or you could overwrite something you might need later. Using the information from the lsblk command I know my flash drive is /dev/sdb so the proper dd command to write the iso image to my flash drive is:
sudo dd bs=4M if=CentOS-7-x86_64-DVD-1511.iso of=/dev/sdbDepending on how fast the flash drive is it may take several minutes to write the iso image to the flash drive. On my laptop this was the output from dd.
1032+1 records in 1032+1 records out 4329570304 bytes (4.3 GB) copied, 521.836 s, 8.3 MB/s
- Remove and reinsert the flash drive into your computer. Your computer should properly mount this flash drive.
- Viewing the contents of the flash drive should be successful.
- Done with the copy, now move the Centos 7 bootable flash drive to the target computer.