How to set default kernel on s390x systems?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux
  • s390x architecture

Issue

  • How to set default kernel on s390x systems?
  • How to change booing kernel on s390x system?

Resolution

  • To configure z/IPL to boot the new kernel by default, edit /etc/zipl.conf and change the value of the default variable to the name of the section that contains the new kernel. The first line of each section contains the name in brackets:

  • Below is the default configuration of /etc/zipl.conf file:

cat /etc/zipl.conf
[defaultboot]
defaultauto
prompt=1
timeout=5
target=/boot
secure=auto
  • To change the booting kernel from kernel-4.18.0-553.89.1.el8_10.s390x to kernel-4.18.0-553.el8_10.s390x in the /etc/zipl.conf,
    change the default parameter as follows:
# cat /etc/zipl.conf
[defaultboot]
defaultauto
prompt=1
timeout=5
target=/boot
secure=auto
default= new

[old]
     image=/boot/vmlinuz-4.18.0-553.el8_10.s390x
     ramdisk=/boot/initramfs-4.18.0-553.el8_10.s390x.img
     parameters="root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap"

[new]
     image=/boot/vmlinuz-4.18.0-553.89.1.el8_10.s390x
     ramdisk=/boot/initramfs-4.18.0-553.89.1.el8_10.s390x.img
     parameters="root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap"
  • Important Note: Above is just an example. Values need to be checked and updated on required systems manually. For value of parameters section, output of #cat /proc/cmdline can be used.

  • After modifying the configuration file, run /sbin/zipl as root to apply the changes and reboot the system to check the outcome.

# zipl -V
Looking for components in '/lib/s390-tools'
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/e0fd5bf9dbc34849a6521b98d2011864-4.18.0-553.89.1.el8_10.s390x.conf'
Using BLS config file '/boot/loader/entries/e0fd5bf9dbc34849a6521b98d2011864-4.18.0-553.el8_10.s390x.conf'
Using BLS config file '/boot/loader/entries/e0fd5bf9dbc34849a6521b98d2011864-0-rescue.conf'
Secure boot support: no
Target device information
  Device..........................: fc:00
  Partition.......................: fc:01
  Device name.....................: vda
  Device driver name..............: virtblk
  Type............................: disk partition
  Disk layout.....................: SCSI disk layout
  Geometry - start................: 2048
  File system block size..........: 4096
  Physical block size.............: 512
  Device size in physical blocks..: 2097152
Building bootmap in '/boot'
Building menu 'zipl-automatic-menu'
Adding #1: IPL section 'old'
  initial ramdisk...: /boot/initramfs-4.18.0-553.el8_10.s390x.img
  kernel image......: /boot/vmlinuz-4.18.0-553.el8_10.s390x
  kernel parmline...: 'root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap'
  component address:
    heap area.......: 0x00002000-0x00005fff
    stack area......: 0x0000f000-0x0000ffff
    internal loader.: 0x0000a000-0x0000dfff
    parameters......: 0x00009000-0x000091ff
    kernel image....: 0x00010000-0x0076afff
    parmline........: 0x0076c000-0x0076c1ff
    initial ramdisk.: 0x00780000-0x0227fdff
    environment blk.: 0x0077c000-0x0077cfff
Adding #2: IPL section 'new' (default)
  initial ramdisk...: /boot/initramfs-4.18.0-553.89.1.el8_10.s390x.img
  kernel image......: /boot/vmlinuz-4.18.0-553.89.1.el8_10.s390x
  kernel parmline...: 'root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap'
  component address:
    heap area.......: 0x00002000-0x00005fff
    stack area......: 0x0000f000-0x0000ffff
    internal loader.: 0x0000a000-0x0000dfff
    parameters......: 0x00009000-0x000091ff
    kernel image....: 0x00010000-0x0076dfff
    parmline........: 0x0076f000-0x0076f1ff
    initial ramdisk.: 0x00780000-0x02211fff
    environment blk.: 0x0077f000-0x0077ffff
Adding #3: IPL section 'Red Hat Enterprise Linux (4.18.0-553.89.1.el8_10.s390x) 8.10 (Ootpa)'
  initial ramdisk...: /boot/initramfs-4.18.0-553.89.1.el8_10.s390x.img
  kernel image......: /boot/vmlinuz-4.18.0-553.89.1.el8_10.s390x
  kernel parmline...: 'root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap'
  component address:
    heap area.......: 0x00002000-0x00005fff
    stack area......: 0x0000f000-0x0000ffff
    internal loader.: 0x0000a000-0x0000dfff
    parameters......: 0x00009000-0x000091ff
    kernel image....: 0x00010000-0x0076dfff
    parmline........: 0x0076f000-0x0076f1ff
    initial ramdisk.: 0x00780000-0x02211fff
    environment blk.: 0x0077f000-0x0077ffff
Adding #4: IPL section 'Red Hat Enterprise Linux (4.18.0-553.el8_10.s390x) 8.10 (Ootpa)'
  initial ramdisk...: /boot/initramfs-4.18.0-553.el8_10.s390x.img
  kernel image......: /boot/vmlinuz-4.18.0-553.el8_10.s390x
  kernel parmline...: 'root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap'
  component address:
    heap area.......: 0x00002000-0x00005fff
    stack area......: 0x0000f000-0x0000ffff
    internal loader.: 0x0000a000-0x0000dfff
    parameters......: 0x00009000-0x000091ff
    kernel image....: 0x00010000-0x0076afff
    parmline........: 0x0076c000-0x0076c1ff
    initial ramdisk.: 0x00780000-0x0227fdff
    environment blk.: 0x0077c000-0x0077cfff
Adding #5: IPL section 'Red Hat Enterprise Linux (0-rescue-e0fd5bf9dbc34849a6521b98d2011864) 8.10 (Ootpa)'
  initial ramdisk...: /boot/initramfs-0-rescue-e0fd5bf9dbc34849a6521b98d2011864.img
  kernel image......: /boot/vmlinuz-0-rescue-e0fd5bf9dbc34849a6521b98d2011864
  kernel parmline...: 'root=/dev/mapper/rhel_s390x--kvm--069-root crashkernel=auto rd.lvm.lv=rhel_s390x-kvm-069/root rd.lvm.lv=rhel_s390x-kvm-069/swap'
  component address:
    heap area.......: 0x00002000-0x00005fff
    stack area......: 0x0000f000-0x0000ffff
    internal loader.: 0x0000a000-0x0000dfff
    parameters......: 0x00009000-0x000091ff
    kernel image....: 0x00010000-0x0076afff
    parmline........: 0x0076c000-0x0076c1ff
    initial ramdisk.: 0x00780000-0x0327b3ff
    environment blk.: 0x0077c000-0x0077cfff
zIPL environment block content:
Preparing boot device for LD-IPL: vda (0000).
Detected SCSI PCBIOS disk layout.
Writing SCSI master boot record.
Syncing disks...
Done.
SBR
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.