Thursday, February 12, 2015

[Quick Tips]: How to create USB Bootable CentOS/Fedora/Redhat

How to create USB Bootable CentOS/ Fedora/ Redhat


We will discuss on the tutorial “How to create USB Bootable CentOS/Fedora/Redhat?” First of all, you need to format your USB pen device as Win FAT32. After formatting your device type the following commands to make it bootable.
Our Device Names USB Pen Device Name : /dev/sdb1
DVD Mount : /media/cdrom0
USB Mount Point : /media/usb
USB File System : Win FAT32
ISO or DVD Image : Fedora / CentOS / RHEL
Note: The above examples may crash your computer or it may result in loss of data if not executed properly. Device names, file systems etc must be understood to you. This howto intended to simplify first-time installation of Linux, and for creation of salvage and other special-purpose boot disks.
If you want to get information about your devices and current partitions, please run:
CentOS-USB-Bootable1
To identify the USB device name, please use the first command.
Mount CD/DVD ISO or DVD ITSELF
Now type the following command to mount Fedora 12 iso image:
CentOS-USB-Bootable2
You will be required to use files stored in isolinux directory to create a bootable usb pen.
Now format USB.
Continue with the creation of the fdisk partition:
CentOS-USB-Bootable3
You will be required to create only 1 partition. Now continue with formatting the partition:
CentOS-USB-Bootable4
Finally mount the partition:
CentOS-USB-Bootable5
Now copy all the required Files and type the following given commands:
CentOS-USB-Bootable6
Also copy the installer’s initial RAM disk $DVD/images/pxeboot/initrd.img (for CentOS / RHEL Linux use $DVD/RedHat/images/pxeboot/initrd.img file) CD/DVD onto the USB drive to continue:
CentOS-USB-Bootable7
Now Unmount the USB drive.
CentOS-USB-Bootable8
Now make the USB Bootable using the below given commands:
CentOS-USB-Bootable9
Here, syslinux is a boot loader for the Linux which operates off an MS-DOS/Windows FAT filesystem.
Now Install Grub using the following commands:
CentOS-USB-Bootable10
Now continue with the creation of grub.conf:
CentOS-USB-Bootable11
Finally, unmount the USB pen drive using:
CentOS-USB-Bootable12
Now your USB pen is ready and should be bootable from the USB device. This can be used for Fedora or CentOS or RHEL. You can also copy other required tools (such as sniffers or data recovery tools) on this pen.

No comments: