Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

2.4. Can You Install Using the CD-ROM or DVD?

There are several methods that can be used to install Red Hat Enterprise Linux.
Installing from a CD-ROM or DVD requires that you have purchased a Red Hat Enterprise Linux product, you have a Red Hat Enterprise Linux 5.11 CD-ROM or DVD, and you have a DVD/CD-ROM drive on a system that supports booting from it.
If you do not already have a Red Hat Enterprise Linux 5.11 CD set or DVD, you can download one as an ISO image file from the Red Hat Customer Portal. Visit https://access.redhat.com/home and enter your Login and Password. Click on the Downloads link to obtain a list of all currently supported Red Hat Enterprise Linux products. If you do not already have a Login and Password for the Red Hat Customer Portal, visit https://access.redhat.com/downloads/ to purchase a subscription or obtain a free evaluation subscription. When you have obtained the image file, you can burn it to disk with the following procedure:
The exact series of steps that produces a CD from an image file varies greatly from computer to computer, depending on the operating system and disc burning software installed. Use this procedure as a general guide. You might be able to omit certain steps on your computer, or might have to perform some of the steps in a different order from the order described here.
Make sure that your disc burning software is capable of burning discs from image files. Although this is true of most disc burning software, exceptions exist.
In particular, note that the CD burning feature built into Windows XP and Windows Vista cannot burn CDs from images and that earlier Windows operating systems did not have any CD burning capability installed by default. Therefore, if your computer has a Windows operating system installed on it, you need a separate piece of software for this task. Examples of popular CD burning software for Windows that you might already have on your computer include Nero Burning ROM and Roxio Creator. If you use a Windows operating system on your computer and do not have disc burning software installed (or you are not sure that the software can burn discs from image files) InfraRecorder is a suitable alternative available from http://www.infrarecorder.org/, and is free and open-source.
The Disk Utility software installed by default with Mac OS X on Apple computers has the capability to burn CDs from images built into it already. Most widely-used CD burning software for Linux, such as Brasero and K3b, also includes this capability.
  1. Insert a blank, writeable CD into your computer's CD or DVD burner. On some computers, a window opens and displays various options when you insert the disc. If you see a window like this, look for an option to launch your chosen disc burning program. If you do not see an option like this, close the window and launch the program manually.
  2. Launch your disc burning program. On some computers, you can do this by right-clicking (or control-clicking) on the image file and selecting a menu option with a label like Copy image to CD, or Copy CD or DVD image. Other computers might provide you with a menu option to launch your chosen disc burning program, either directly or with an option like Open With. If none of these options are available on your computer, launch the program from an icon on your desktop, in a menu of applications such as the Start menu on Windows operating systems, or in the Mac Applications folder.
  3. In your disc burning program, select the option to burn a CD from an image file. For example, in Nero Burning ROM, this option is called Burn Image and is located on the File menu.
    Note that you can skip this step when using certain CD burning software; for example, Disk Utility on Mac OS X does not require it.
  4. Browse to the disc image file that you downloaded previously and select it for burning.
  5. Click the button that starts the burning process.
Your BIOS may need to be changed to allow booting from your DVD/CD-ROM drive. For more information about changing your BIOS, refer to Section 4.4.1, “Booting the Installation Program on x86, AMD64, and Intel® 64 Systems”.

2.4.1. Alternative Boot Methods

Boot DVD/CD-ROM
If you can boot using the DVD/CD-ROM drive, you can create your own CD-ROM to boot the installation program. This may be useful, for example, if you are performing an installation over a network or from a hard drive. Refer to Section 2.4.2, “Making an Installation Boot CD-ROM” for further instructions.
USB pen drive
If you cannot boot from the DVD/CD-ROM drive, but you can boot using a USB device, such as a USB pen drive, the following alternative boot method is available.
Your system firmware must support booting from a USB device in order for this boot method to work. Refer to the hardware vendor's documentation for details on specifying the device from which the system boots.

Important

When configuring partitions and file systems during installation, ensure you verify the USB device's size, name, and type. The order in which names are assigned to USB-attached storage devices can vary because certain devices may take longer to initialize than others. Consequently, a device may receive a different name than you expect, such as sdc instead of sda.
  1. Make a copy of the Red Hat Enterprise Linux 5 installation files available. Either:
    • Insert the Red Hat Enterprise Linux 5 installation DVD or CD-ROM#1.
    • Mount an image of the Red Hat Enterprise Linux 5 installation DVD or CD-ROM#1.
    • Ensure that the installation files are available on a network location accessible by your system, for example, on an NFS share that it can access.
  2. Attach a USB flash drive to your system. The following steps presume a system that runs Red Hat Enterprise Linux 5.
  3. Run dmesg to identify the device name for the drive. If you run dmesg shortly after you attach the drive, the device name appears in the most recent lines of output. For example, the following dmesg output shows a flash drive that receives the device name /dev/sdb:
    Initializing USB Mass Storage driver...
    scsi2 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 5
    usb-storage: waiting for device to settle before scanning
    usbcore: registered new driver usb-storage
    USB Mass Storage support registered.
      Vendor: USB 2.0   Model: Flash Disk        Rev: 5.00
      Type:   Direct-Access                      ANSI SCSI revision: 02
    SCSI device sdb: 2043904 512-byte hdwr sectors (1046 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 0b 00 00 08
    sdb: assuming drive cache: write through
    SCSI device sdb: 2043904 512-byte hdwr sectors (1046 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 0b 00 00 08
    sdb: assuming drive cache: write through
    sdb: sdb1
    sd 2:0:0:0: Attached scsi removable disk sdb
    sd 2:0:0:0: Attached scsi generic sg1 type 0
    usb-storage: device scan complete
  4. Unmount any partitions on the flash drive that are currently mounted. It is likely that your system automatically mounted any available partitions when you attached the flash drive.
    1. Use the mount command to find any mounted partitions on the flash drive. For example, the following output shows a single partition on /dev/sdb is mounted, the partition named /dev/sdb1:
      $ mount
      /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
      proc on /proc type proc (rw)
      sysfs on /sys type sysfs (rw)
      devpts on /dev/pts type devpts (rw,gid=5,mode=620)
      tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
      /dev/sda1 on /boot type ext3 (rw)
      none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
      sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
      /dev/sdb1 on /media/BOOTUSB type vfat (rw,nosuid,nodev,uid=500,utf8,shortname=mixed,flush)
    2. Unmount partitions with the umount command. For example, to unmount /dev/sdb1, run:
      umount /dev/sdb1
      Run umount for each partition on the flash drive that is mounted.
  5. Use fdisk to partition the flash drive to contain a single partition only, with the following parameters:
    1. numbered 1.
    2. partition type is set to b (W95 FAT32).
    3. flagged as bootable.
  6. Run mkdosfs to format the partition created in the previous step as FAT. For example:
    mkdosfs /dev/sdb1
  7. Mount the partition. For example:
    mount /dev/sdb1 /mnt
  8. Copy the contents of the isolinux/ directory of the installation DVD or CD-ROM#1 onto the flash drive.
  9. Rename the configuration file from isolinux.cfg to syslinux.cfg. For example, if the flash drive is mounted on /mnt, run:
    cd /mnt/; mv isolinux.cfg syslinux.cfg
    1. If necessary, edit syslinux.cfg for your particular environment. For example, to configure the installation to use a kickstart file shared over NFS, specify:
      linux ks=nfs:://ks.cfg
  10. Copy the images/pxeboot/initrd.img file from the installation DVD or CD-ROM#1 onto the flash drive.
  11. Unmount the flash drive. For example:
    umount /dev/sdb1
  12. Make the USB flash drive bootable. For example:
    syslinux /dev/sdb1
  13. Mount the flash drive again. For example:
    mount /dev/sdb1 /mnt
  14. Install the GRUB boot loader on the USB flash drive. For example:
    grub-install --root-directory=/mnt /dev/sdb
  15. Verify that the USB flash drive has a /boot/grub directory. If it does not, create the directory manually; for example:
    mkdir -p /mnt/boot/grub
  16. Create the boot/grub/grub.conf file on the flash drive as follows:
    default=0
    timeout=5
    root (hd1,0)
    title Red Hat Enterprise Linux installer
    kernel /vmlinuz
    initrd /initrd.img
  17. Unmount the flash drive. For example:
    umount /dev/sdb1
  18. Detach the USB flash drive.
  19. Attach the USB disk to the system on which you wish to install Red Hat Enterprise Linux.
  20. Boot the target system from the USB flash drive.

2.4.2. Making an Installation Boot CD-ROM

isolinux (not available for Itanium systems) is used for booting the Red Hat Enterprise Linux installation CD. To create your own CD-ROM to boot the installation program, use the following instructions:
Copy the isolinux/ directory from the Red Hat Enterprise Linux DVD or CD #1 into a temporary directory (referred to here as <path-to-workspace>) using the following command:
cp -r <path-to-cd>/isolinux/ <path-to-workspace>
Change directories to the <path-to-workspace> directory you have created:
cd <path-to-workspace>
Make sure the files you have copied have appropriate permissions:
chmod u+w isolinux/*
Finally, issue the following command to create the ISO image file:
mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot \  
-boot-load-size 4 -boot-info-table -R -J -v -T isolinux/

Note

The above command was split into two lines for printing purposes only. When you execute this command, be sure to type it as a single command, all on the same line.
Burn the resulting ISO image (named file.iso and located in <path-to-workspace>) to a CD-ROM as you normally would.