Creating a Gentoo Linux image file

You can create a Gentoo Linux image file for booting target Linux machines during the provisioning process.

BMC recommends that you execute the image creation script on a Red Hat system. Place the resulting image on the TFTP server.

To create a Gentoo Linux image file

  1. Obtain a copy of the Gentoo minimal ISO image file. You can get this file from the Gentoo website (http://www.gentoo.org.) Place the file in a temporary location on the system you plan to use to create the image.
    In this procedure, this ISO image file is referred to as gentooMinimalIsofile and the file is located in the following temporary directory:
    /tmp/bmc_bl
  2. On the system running the mkgen2img.sh script, ensure that the lzma-libs package is installed, as newer Gentoo ISOs use this compression type for the kernel images.
  3. Locate the BMC Server Automation file:
    <current_version>provision-files.zip
    This file is included when you download BMC Server Automation from the BMC Electronic Product Distribution (EPD) website.
    Place the file in a temporary location on the system that you plan to use to create the image. For example: /tmp/bmc_bl
  4. Unzip provision-files.zip.
    This file unzips to create a directory structure that includes the following subdirectories:
    /provisioning/linux
    /provisioning/linux/squashfs-utils
    After you unzip, make sure that all of the scripts and squashfs-utils files in these newly created directories have executable permissions.
  5. Add these locations to the PATH environment variable. For example, if you unzipped provision-files.zip to /tmp/bmc_bl, you would add the following locations to the PATH environment variable:
    /tmp/bmc_bl/provisioning/linux
    /tmp/bmc_bl/provisioning/linux/squashfs-utils
  6. Open a command window and change directories to the /provisioning/linux subdirectory that you created in the previous step.
  7. Run the ls command to verify that the mkgen2img script is in this directory. This is the script that creates the image file.
  8. (Optional) To inject drivers into the Gentoo image, follow these steps:
    1. Create a new subdirectory under /provisioning/linux and name it driver.
    2. Copy the following required files into the driver subdirectory:
      modules.dep
      ixgbe.alias
      igb.alias
      files
      These files are provided by the driver vendor and typically are included in the driver download.
    3. Change directory to driver and create two subdirectories named x86 and x64.
    4. Copy the driver files (.ko files) that you want to inject in the image into the x86 and x64 subdirectories.
      Ensure that the x86 directory contains only x86 drivers, and that the x64 directory contains only x64 drivers.
      For example, the directory structure should be similar to the following:

      /tmp/bmc_bl/provisioning/linux
        driver
          files
          igb.alias
          ixgbe.alias
          modules.dep
          x64
            <xxx>.ko
            <xxx>.ko
          x86
            <xxx>.ko
            <xxx>.ko
        mkgen2img.sh
  9. Run the mkgen2img.sh script.
    Use the command syntaxes shown below to create x86 and AMD64 Gentoo image files. Do not execute these commands from NSH; use the native sh, bash, or ksh.

    To create an x86 Gentoo image...

    General syntax

    mkgen2img.sh <location> <gentooMinimalIsofile> <outDirectory>

    location

    The full path to the location of the bmi executable.
    For example: /tmp/bmc_bl/provisioning/linux/x86/bmi32

    gentooMinimalIsofile

    The full path to the minimal ISO file you downloaded from the Gentoo site.
    For example: /tmp/bmc_bl/install-x86-minimal-20100907.iso

    Note

    Gentoo updates its minimal ISO files frequently. For best results, always use the most current minimal ISO file.

    outDirectory

    The location for the generated image file. Typically, this value is: /tftproot/x86pc/pxelinux/gentoo32

    Note

    The BLAdmin role must have Read and Write access to the TFTP root directory and its contents, including boot image folders and all image files in the folders.

    Example:

    /bin/sh mkgen2img.sh /tmp/bmc_bl/provisioning/linux/x86/bmi32 /tmp/bmc_bl/install-x86-minimal-20100907.iso /tftproot/x86pc/pxelinux
    (Type this command all on one line.)
    This command creates the files gentoo and gentoord.gz, which collectively make up the Gentoo image file entity.

    To create an AMD64 Gentoo image...

    General syntax

    mkgen2img.sh <location> <gentooMinimalIsofile> <outDirectory>

    <location>

    The full path to the location of the bmi executable. For example: /tmp/bmc_bl/provisioning/linux/amd64/bmi64

    gentooMinimalIsofile

    The full path to the minimal ISO file you downloaded from the Gentoo site. For example: /tmp/bmc_bl/install-amd64-minimal-20100907.iso

    Note

    Gentoo updates its minimal ISO files frequently. For best results, always use the most current minimal ISO file.

    outDirectory

    The location for the generated image file. Typically, this value is: /tftproot/x86pc/pxelinux/gentoo64

    Note

    The BLAdmin role must have Read and Write access to the TFTP root directory and its contents, including boot image folders and all image files in the folders.

    Example:

    /bin/sh mkgen2img.sh /tmp/bmc_bl/provisioning/linux/amd64/bmi64 /tmp/bmc_bl/install-amd64-minimal-20100907.iso /tftproot/x86pc/pxelinux
    (Type this command all on one line.)
    This command creates the files gentoo and gentoord.gz, which collectively make up the Gentoo image file entity.

  10. Check the log file to verify results.
    If you included drivers in the image, messages confirm driver injection. For example:

    Bladelogic : gentoo image : Injecting x86 additional drivers
    Bladelogic : gentoo image : Configuring autoload for device drivers
    
Was this page helpful? Yes No Submitting... Thank you

Comments