We have already seen how to install different Linux OS through CD-ROM's. Below are the Linux os installations already covered so far.
From today onwards we will see some other types of Linux installations like Linux OS installation through network, Linux OS installation through kickstart and installing through USB pen drive. First in the series is installing Linux OS from a USB pen drive or key.
There are some non reliable methods available on Internet which show you complex procedures and not reliable. I do not say they are bad but they are difficult to implement and remember. And that procedures are not same for different Linux distributions. There is a really easy tool in Ubuntu Linux which makes your work simpler and creates Ubuntu Linux bootable USB pen drive. Have a look at our video on how to do it in Ubuntu with that tool.
What is the easiest way to convert a USB device to a bootable device?
The simplest way is to convert an ISO image to hybrid ISO by using syslinux tools and write this ISO file onto USB device. Almost all Linux flavors works with this procedure.
What is syslinux?
SYSLINUX is a boot loader for the Linux operating system which runs on an MS-DOS/Windows FAT filesystem. It is intended to simplify first-time installation of Linux, and for creation of rescue and other special purpose boot disks.
In simple words, these guys know how to boot Linux CD-ROM when we want to install Linux. Syslinux provide all the tools required to create a bootable device such as isohybrid, isolinux etc.
Steps to configure USB stick as bootable device
Step1: Install syslinux package on your machine, if it is not present.
On Redhat/CentOS/Fedora based machines
yum install syslinux
On Ubuntu/Debian based machines:
apt-get install syslinux
Step2: Get your ISO file from Internet or create one from a Linux CD. We can create one by using below dd command
dd if=/dev/dvd of=/path/to/your/iso/xyz.iso
dd if=/dev/dvd of=/opt/TestingISO/CentOS-6.2-i386-bin-DVD1.iso
dd is an excellent disk management tool with which can do many things, in that one is to create ISO images from CD/DVD. "if=/dev/dvd" is my input file from where I am going to take data and write to output file "of=/opt/TestingISO/CentOS-6.2-i386-bin-DVD1.iso".
Step3: Now convert your normal iso file to a hybrid ISO.
isohybrid: Warning: more than 1024 cylinders: 3640
isohybrid: Not all BIOSes will be able to boot this device
if you try above command with Linux ISO images like Redhat/Fedora/Centos which are more than 1GB size you may see warning like above one. You can ignore these types of warnings.
Note1: Make sure that you did not mount your USB key
Note2: Make sure that you take back up of your data in your USB Key
Note3: It do not matters if the USB pen drive is formated or a brand new one
Note4: Make sure that you are root user before doing below step
Note5: Make sure that you selected right USB device.
Note6: If you see below command, We given of=/dev/sdb it is because dd command expects device not a partition.
Step4: Now create a bootable USB stick by using following command
dd if=/path/to/iso of=/dev/sdx
dd if=CentOS-6.2-i386-bin-DVD1.iso of=/dev/sdb
7454720+0 records in
7454720+0 records out
3816816640 bytes (3.8 GB) copied, 2168.5 s, 1.8 MB/s
Once created we can insert this pendrive into other machine where you want to install Linux OS.
Step5: Change BIOS settings to accept USB drive as bootable device as shown in below image. Select USB device to boot and from there you can start installing any kind of Linux OS as most of the Linux distributions support syslinux.
Still have queries?
We did a video tutorial for you on how to create USB bootable disk for Fedora Linux OS.
In our coming posts we will see how to install Linux OS from different Network resources like http, ftp, nfs, pxe boot and Kickstart.
Latest posts by Surendra Anne (see all)
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018