29 December 2010

If You Need an Installation USB or CD/DVD - RHCE

If you don't have the first installation CD/DVD, you can start a network installation from a specialized boot USB key or CD. While one may be provided for you for the RHCE or RHCT exams, you'll need to know how to create one so you can practice for the exam.

It's easy to create an installation USB key or CD from one of the files on the /images directory on the first installation CD:

  • diskboot.img For a boot USB key
  • boot.iso For a boot CD

The boot.iso file is small enough to fit on a credit card-sized CD. It contains all the information in the diskboot.img file. Alternatively, if your systems have USB ports and can boot from that media, you
can create the installation media from the diskboot.img file.

For the purpose of this section, assume you've inserted the first installation CD/DVD into its drive, and it's automatically mounted in the /media/disk directory. (In practice, the /media subdirectory is named after the label on the CD/DVD; you may end up with a directory such as /media/RHEL-5 i386 Disc 1.) If automounting does not work, you may need to mount the CD/DVD yourself.


Creating a Boot USB Key

 

You can also create images on a USB key with the dd command from any running Unix or Linux computer. Find a USB key, save anything important that you've stored onto it, and insert it into your system. Run the fdisk -l command to find the device associated with the USB key. Assuming it's /dev/sdc, run the following commands:
# dd if=/media/disk/images/diskboot.img of=/dev/sdc
Be careful-if /dev/sdc/ is a hard drive with data, these commands will overwrite all data on that drive.
 
Alternatively, you can just run the cat command to read the disk image of your choice directly to a floppy drive or USB device. For example, the following command reads the laptop driver disk directly to the USB key:
# cat /media/disk/images/diskboot.img  > /dev/sdc
You can also create a boot CD from the boot.iso file in the images/ subdirectory. Assuming you don't have two CD/DVD drives, you'll first have to copy the boot.iso file to a directory such as /tmp. You can then burn the boot CD using the following command:
# cdrecord dev=/dev/hdc -v -eject /tmp/boot.iso
Naturally, this command may vary; for example, a system with a SATA-based drive may require that you substitute the appropriate device name, such as dev=/dev/scd0.


On the Job 
Know how to create the right boot disk for your system. If you have a problem, the installation boot CD or USB key can also serve as a rescue disk. (I do not have a system that supports booting from a SD card, so I have not considered that option.) At the boot prompt, the linux rescue command will eventually bring you to a rescue mode that can help you mount your partitions or recover specific files or directories.



See Also:


RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)





biOos

No comments: