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.
-
A running file server with access to the LPAR.
-
Generate the
.ins
andinitrd.img.addrsize
files:-
Retrieve the size of the
kernel
andinitrd
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)
-
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 ))
-
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)
-
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
-
Merge the address and size binaries by running the following command:
$ cat temp_address.bin temp_size.bin > "$INITRD_IMG_NAME.addrsize"
-
Clean up temporary files by running the following command:
$ rm -rf temp_address.bin temp_size.bin
-
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
NoteThe file is based on the paths of the
kernel.img
,initrd.img
,initrd.img.addrsize
, andcmdline
files and the memory locations where the data is to be copied.
-
-
Transfer the
initrd
,kernel
,generic.ins
, andinitrd.img.addrsize
parameter files to the file server. For more information, see Booting Linux in LPAR mode (IBM documentation). -
Start the machine.
-
Repeat the procedure for all other machines in the cluster.