Skip to content

Latest commit

 

History

History
124 lines (107 loc) · 3.4 KB

adding-ibm-z-lpar-agent-day-2.adoc

File metadata and controls

124 lines (107 loc) · 3.4 KB

Adding {ibm-z-title} agents in a Logical Partition (LPAR) to an existing cluster

In {product-title} {product-version}, the .ins and initrd.img.addrsize files are not automatically generated as part of the boot-artifacts for an existing cluster. You must manually generate these files for {ibm-z-name} clusters running in an LPAR.

The .ins file is a special file that includes installation data and is present on the FTP server. You can access this file from the hardware management console (HMC) system. This file contains details such as mapping of the location of installation data on the disk or FTP server and the memory locations where the data is to be copied.

Prerequisites
  • A running file server with access to the LPAR.

Procedure
  1. Generate the .ins and initrd.img.addrsize files:

    1. Retrieve the size of the kernel and initrd by running the following commands:

      $ KERNEL_IMG_PATH='./kernel.img'
      $ INITRD_IMG_PATH='./initrd.img'
      $ CMDLINE_PATH='./generic.prm'
      $ kernel_size=$(stat -c%s $KERNEL_IMG_PATH)
      $ initrd_size=$(stat -c%s $INITRD_IMG_PATH)
    2. Round up the kernel size to the next Mebibytes (MiB) boundary by running the following command:

      $ BYTE_PER_MIB=$(( 1024 * 1024 )) offset=$(( (kernel_size + BYTE_PER_MIB - 1) / BYTE_PER_MIB * BYTE_PER_MIB ))
    3. Create the kernel binary patch file that contains the initrd address and size by running the following commands:

      $ INITRD_IMG_NAME=$(echo $INITRD_IMG_PATH | rev | cut -d '/' -f 1 | rev)
      $ KERNEL_OFFSET=0x00000000
      $ KERNEL_CMDLINE_OFFSET=0x00010480
      $ INITRD_ADDR_SIZE_OFFSET=0x00010408
      $ OFFSET_HEX=(printf '0x%08x\n' offset)
    4. Convert the address and size to binary format by running the following command:

      $ printf "$(printf '%016x\n' $initrd_size)" | xxd -r -p > temp_size.bin
    5. Merge the address and size binaries by running the following command:

      $ cat temp_address.bin temp_size.bin > "$INITRD_IMG_NAME.addrsize"
    6. Clean up temporary files by running the following command:

      $ rm -rf temp_address.bin temp_size.bin
    7. Create the .ins file by running the following command:

      $ cat > generic.ins <<EOF
      $KERNEL_IMG_PATH $KERNEL_OFFSET
      $INITRD_IMG_PATH $OFFSET_HEX
      $INITRD_IMG_NAME.addrsize $INITRD_ADDR_SIZE_OFFSET
      $CMDLINE_PATH $KERNEL_CMDLINE_OFFSET
      EOF
      Note

      The file is based on the paths of the kernel.img, initrd.img, initrd.img.addrsize, and cmdline files and the memory locations where the data is to be copied.

  2. Transfer the initrd, kernel, generic.ins, and initrd.img.addrsize parameter files to the file server. For more information, see Booting Linux in LPAR mode (IBM documentation).

  3. Start the machine.

  4. Repeat the procedure for all other machines in the cluster.