Modifying a zipl environment block with zipl-editenv

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest KVM guest

Use the zipl-editenv command to modify the installed zipl environment block.

About this task

Assume you have the same zipl environment file as before, with the ROOT and PANIC_TIMEOUT keywords defined:
#cat /etc/ziplenv
ROOT=/dev/dasda1
PANIC_TIMEOUT=panic=9
For details about the file syntax, see zipl environment file syntax.

Further, assume that you ran zipl, and the zipl environment block is created. Now you would like to use another root partition and another value for the panic time-out.

Procedure

  1. Optional: Display the current zipl environment block by using the zipl-editenv command:
    # zipl-editenv --list
    ROOT=/dev/dasda1
    PANIC_TIMEOUT=panic=9

    If no option -t is specified, zipl-editenv assumes that the environment was installed in the /boot directory. To specify a different directory, use the -t option.

  2. Use the zipl-editenv command to change the values for ROOT and PANIC_TIMEOUT.
    For example, to set the root partition to /dev/dasdc2 and the panic time-out to 8, issue the following commands:
    # zipl-editenv -s ROOT=/dev/dasdc2
    # zipl-editenv -s PANIC_TIMEOUT=panic=8
    
    To check that everything is correct, display the modified zipl environment block:
    # zipl-editenv --list
    ROOT=/dev/dasdc2
    PANIC_TIMEOUT=panic=8
  3. Reboot the system, log in, and display the current command line:
    # cat /proc/cmdline
    root=/dev/dasdc2 panic=8 ...
    The root partition and panic time-out were set to the new values.
    The process for modifying the environment block with zipl-editenv is illustrated in Figure 1
    Figure 1. Changing values for keywords that replace specifications in the kernel command line.
    The figure illustrates the flow of steps 1-6.

Results

You can repeatedly modify the zipl environment block to IPL the Linux instance with different kernel command lines without rerunning zipl.

What to do next

You can define keyword-value pairs for common parameters for the kernel-command line across multiple boot menu entries, see Specifying common variables across multiple boot menu entries.

You can also equip the zipl environment file with keyword-value pairs for future use, see Specifying variables for future use.