Ack to the report.
While I had some systems (lpar) which worked I was trivially able to confirm 
that it doesn't work on KVM guests based on cloud images.

I see this on install of kdump-tools (default answers to debconf)
Setting up kdump-tools (1:1.6.4-2) ...
Using config file '/etc/zipl.conf'
Building bootmap in '/boot'
Adding IPL section 'ubuntu' (default)
Preparing boot device: vda (0000).
Done.

Creating config file /etc/default/kdump-tools with new version

But that leaves /etc/zipl.conf unmodified.
Frank already copied the snippet in the report.
This line isn't working:

$ sed -i "/parameters/{s|\"$| crashkernel=${DEF_PRESET}\"|}"
/etc/zipl.conf

At least in my guest and my LPARs the following seemed better, so for
your consideration:

$ sed -i "s/^parameters\s*=/& crashkernel=${DEF_PRESET} /"
/etc/zipl.conf

Note: at this point it already checked there is no crashkernel statement
yet, so we can unconditionally insert it here.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to makedumpfile in Ubuntu.
https://bugs.launchpad.net/bugs/1790788

Title:
  Customize 'crashkernel' parameter is not properly working

Status in makedumpfile package in Ubuntu:
  New

Bug description:
  Trying to use crashdump especially in a KVM machine.
  Installation looks fine and the reboot is triggered.
  But it does not work because the kernel does not have a 'crashkernel=' 
parameter.
  Nothing in /proc/cmdline:
  $ cat /proc/cmdline 
  root=LABEL=cloudimg-rootfs

  Issue seems to be in adding the crashkernel line in this snippet:
  # Customize crashkernel= value according to architecture
  ARCH="$(arch)"
  DEF_PRESET="384M-:128M"
  case "$ARCH" in
     s390x)
        HAS_CRASHKERNEL="$(grep crashkernel /etc/zipl.conf)" || true
        if test -z "$HAS_CRASHKERNEL"; then
           sed -i "/parameters/{s|\"$| crashkernel=${DEF_PRESET}\"|}" 
/etc/zipl.conf
           zipl
        fi
           CIO_IGNORE="$(cio_ignore -u -k)"
           sed -i "s/\#KDUMP_CMDLINE_APPEND/KDUMP_CMDLINE_APPEND/" $INITCONFFILE
           sed -i "/KDUMP_CMDLINE_APPEND/{s|\"$| ${CIO_IGNORE}\"|}" 
$INITCONFFILE
      ;;
  esac

  (especially 1st sed stmt)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/makedumpfile/+bug/1790788/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to