Previous Topic: Create and Register a Boot Image using CLINext Topic: (Optional) Update Existing WinPE-based Linux OS Images


(Optional) Add Additional Drivers to the Boot Image

Add drivers to the boot image when the Linux boot image does not contain the drivers that are required for the target hardware. A Linux-based machine is required for the same. CentOS 6.3x64 is the preferred OS.

Follow these steps:

  1. Navigate to the customized Linux boot image files available on a boot image DVD. Copy the initrd.img (RAMDISK image) and unpack it by using the following commands:
    # mkdir initrd
    
    # cd initrd
    
    # gzip -dc ../initrd.img | cpio -idv
    
  2. Copy .ko files to the appropriate directory under /lib/modules/2.6.../kernel/drivers/

    When additional drivers (for example: myscsidriver.ko) are added for SCSI disk, copy the myscsidriver.ko files to the appropriate /lib/modules/ 2.6.32-279.el6.x86_64/kernel/drivers/scsi directory of the initrd image.

    # cp myscsidriver.ko  /lib/modules/2.6.../kernel/drivers/scsi/
    
  3. Create a backup of the existing initrd.img.
    #mv  ../initrd.img  ../initrd.bak
    
  4. Create new initrd.img by repacking files and directories into the initrd.img it by using the following commands:
    # find.| cpio -H newc -o > ../initrd.cpio
    
    #gzip ../initrd.cpio
    
    #mv../initrd.cpio.gz ../initrd.img
    

Note: When you create initrd.img, use a separate directory to create initrd.cpio and initrd.img. If you use the same directory that contains all the unpacked files, cpio attempts to create initrd.cpio recursively (packing again and again), and may fail due to lack of sufficient space on the hard disk.