Install of kdump-tools fails

Bug #1687791 reported by Jens Elkner
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
New
Undecided
Unassigned
Bionic
New
Undecided
Unassigned
makedumpfile (Ubuntu)
Confirmed
Undecided
Unassigned
Bionic
New
Undecided
Unassigned

Bug Description

When installing Ubuntu xenial via netimage, installation fails because of an error, when configuring the kdump-tools. /var/log/syslog says:

...

May 2 22:15:17 in-target: Setting up grub2 (2.02~beta2-36ubuntu3.9) ...^M
May 2 22:15:17 in-target: Setting up lxc-common (2.0.7-0ubuntu1~16.04.2) ...^M
May 2 22:15:17 in-target: Running in chroot, ignoring request.^M
May 2 22:15:17 in-target: invoke-rc.d: policy-rc.d denied execution of reload.^M
May 2 22:15:17 in-target: Setting up grub-gfxpayload-lists (0.7) ...^M
May 2 22:15:17 in-target: Processing triggers for libc-bin (2.23-0ubuntu7) ...^M
May 2 22:15:17 in-target: Processing triggers for systemd (229-4ubuntu17) ...^M
May 2 22:15:17 in-target: Processing triggers for ureadahead (0.100.0-19) ...^M
May 2 22:15:17 in-target: Processing triggers for dbus (1.10.6-1ubuntu3.3) ...^M
May 2 22:15:17 in-target: Errors were encountered while processing:^M
May 2 22:15:17 in-target: kdump-tools^M
May 2 22:15:17 in-target: linux-crashdump^M
May 2 22:15:18 in-target: E: Sub-process /usr/bin/dpkg returned an error code (1)
May 2 22:15:18 in-target: Setting up kdump-tools (1:1.5.9-5ubuntu0.4) ...
May 2 22:15:18 in-target: dpkg: error processing package kdump-tools (--configure):
May 2 22:15:18 in-target: subprocess installed post-installation script returned error exit status 1
May 2 22:15:18 in-target: dpkg: dependency problems prevent configuration of linux-crashdump:
May 2 22:15:18 in-target: linux-crashdump depends on kdump-tools; however:
May 2 22:15:18 in-target: Package kdump-tools is not configured yet.
May 2 22:15:18 in-target:
May 2 22:15:18 in-target: dpkg: error processing package linux-crashdump (--configure):
May 2 22:15:18 in-target: dependency problems - leaving unconfigured
May 2 22:15:18 in-target: Errors were encountered while processing:
May 2 22:15:18 in-target: kdump-tools
May 2 22:15:18 in-target: linux-crashdump
May 2 22:15:18 main-menu[616]: WARNING **: Configuring 'pkgsel' failed with error code 100
May 2 22:15:18 main-menu[616]: WARNING **: Menu item 'pkgsel' failed.

After this the 'Select and install software' dialog pops up and says, that 'Installation step failed'. If one presses '<Continue>', one gets bombed back into the 'Ubuntu installer main menu'.
Now you get into a loop, when choosing the 'Select and install software' item from the menu.

Installer image is 'Linux foo 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 GNU/Linux'.

The only workaround found so far is:
    cp -p /target/var/lib/dpkg/info/kdump-tools.postinst \
        /target/var/lib/dpkg/info/kdump-tools.postinst.suck
    printf '#!/bin/sh\nexit 0\n' \
        >/target/var/lib/dpkg/info/kdump-tools.postinst

Revision history for this message
Phillip Susi (psusi) wrote :

Could you put a "set -x" at the start of the postinst file to see where it is failing?

affects: grub2 (Ubuntu) → makedumpfile (Ubuntu)
Revision history for this message
Jens Elkner (jelmd) wrote :
Download full text (6.7 KiB)

~ # sed -i.orig -e '/^set/ a\set -x' /target/var/lib/dpkg/info/kdump-tools.postinst
~ # tail -f /var/log/syslog
May 5 12:11:29 in-target: linux-crashdump depends on kdump-tools; however:
May 5 12:11:29 in-target: Package kdump-tools is not configured yet.
May 5 12:11:29 in-target:
May 5 12:11:29 in-target: dpkg: error processing package linux-crashdump (--configure):
May 5 12:11:29 in-target: dependency problems - leaving unconfigured
May 5 12:11:29 in-target: Errors were encountered while processing:
May 5 12:11:29 in-target: kdump-tools
May 5 12:11:29 in-target: linux-crashdump
May 5 12:11:29 main-menu[422]: WARNING **: Configuring 'pkgsel' failed with error code 100
May 5 12:11:29 main-menu[422]: WARNING **: Menu item 'pkgsel' failed.

May 5 12:13:15 main-menu[422]: INFO: Modifying debconf priority limit from 'critical' to 'high'
May 5 12:13:15 debconf: Setting debconf/priority to high
May 5 12:13:15 main-menu[422]: INFO: Falling back to the package description for brltty-udeb
May 5 12:13:20 main-menu[422]: INFO: Falling back to the package description for brltty-udeb
May 5 12:13:20 main-menu[422]: INFO: Menu item 'pkgsel' selected
May 5 12:13:21 in-target: Reading package lists...
May 5 12:13:21 in-target:
May 5 12:13:21 in-target: Building dependency tree...
May 5 12:13:21 in-target:
May 5 12:13:21 in-target: Reading state information...
May 5 12:13:21 in-target:
May 5 12:13:21 in-target: tasksel is already the newest version (3.34ubuntu3).
May 5 12:13:21 in-target: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
May 5 12:13:21 in-target: 2 not fully installed or removed.
May 5 12:13:21 in-target: After this operation, 0 B of additional disk space will be used.
May 5 12:13:21 in-target: Setting up kdump-tools (1:1.5.9-5ubuntu0.4) ...^M
May 5 12:13:21 in-target: + uname -r^M
May 5 12:13:21 in-target: + /etc/kernel/postinst.d/kdump-tools 4.4.0-62-generic^M
May 5 12:13:21 in-target: dpkg: error processing package kdump-tools (--configure):^M
May 5 12:13:21 in-target: subprocess installed post-installation script returned error exit status 1^M
May 5 12:13:21 in-target: No apport report written because the error message indicates its a followup error from a previous failure.
May 5 12:13:21 in-target: dpkg: dependency problems prevent configuration of linux-crashdump:^M
May 5 12:13:21 in-target: linux-crashdump depends on kdump-tools; however:^M
May 5 12:13:21 in-target: Package kdump-tools is not configured yet.^M
May 5 12:13:21 in-target: ^M
May 5 12:13:21 in-target: dpkg: error processing package linux-crashdump (--configure):^M
May 5 12:13:21 in-target: dependency problems - leaving unconfigured^M
May 5 12:13:21 in-target: Errors were encountered while processing:^M
May 5 12:13:21 in-target: kdump-tools^M
May 5 12:13:21 in-target: linux-crashdump^M
May 5 12:13:22 in-target: E: Sub-process /usr/bin/dpkg returned an error code (1)
May 5 12:13:22 in-target: Setting up kdump-tools (1:1.5.9-5ubuntu0.4) ...
May 5 12:13:22 in-target: + uname -r
May 5 12:13:22 in-target: + /etc/kernel/postinst.d/kdump-tools 4.4.0-62-generic
May 5 12:13:22 in-target: dpkg: error processi...

Read more...

Revision history for this message
Louis Bouchard (louis) wrote :

Hello,

I am surprised by a few things : first of all, linux-crashdump, hence kdump-tools, is not installed by default on a server install. So you must have added that step somehow.

I have just installed Xenial using the mini.iso network install and kdump-tool is not installed after completion. I installed it without any issue, rebooted and the functionality works as expected.

Now your output shows that it is the kernel's post-install trigger that fails, so this is where you should but the -x (add it to the sh -e shebang at the top of the script). Then you can run the following & paste the output here :

/etc/kernel/postinst.d/kdump-tools $(uname -r)

FYI, this script is responsible for building the smaller initrd used by kdump when rebooting after a crash.

...Louis

Revision history for this message
Jens Elkner (jelmd) wrote :

Seems, that this package gets included via preseed:

tasksel tasksel/first multiselect minimal
d-i pkgsel/include string grub2 linux-crashdump openssh-server tcsh ksh gawk vim sysstat lxc debootstrap libcap-ng-utils acpid at bc ethtool libxslt1.1 lxc-templates patch uidmap xz-utils acl iptables ulogd2 ntp nfs-common autofs ldap-utils gdisk zfsutils-linux zfs-initramfs dmidecode

Anyway, IMHO it doesn't matter what kind of install - it should not fail to install.

BTW: The image used is http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/current/images/netboot/netboot.tar.gz

I've already added the 'set -x' as shown above. The 1st line of the output shows, how it has been done (because there is no vi[m] available in the install environment), and the remaining lines show the output after resuming the install (I guess, the installer redirects everything to /var/log/syslog, otherwise I wonder, where else the output gets captured.). Anyway, I can see two lines prefixed with a '+', so I guess, that 'set -x' does what it should, but there is simply not more than this.

IIUC, it does not hurt, if it fails - can be done later/on demand as well. So why not append a '|| true' or remove it completely from postinstall ?

Revision history for this message
Phillip Susi (psusi) wrote :

It looks like the failure is actually in /etc/kernel/postinst.d/kdump-tools. Can you add a set -x there and try again?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in makedumpfile (Ubuntu):
status: New → Confirmed
Revision history for this message
bendikro (bendikro) wrote :
Download full text (7.3 KiB)

The problem is this command in /etc/kernel/postinst.d/kdump-tools exiting with 1:

$ mkinitramfs -d /var/lib/kdump/initramfs-tools -o /var/lib/kdump/initrd.img-4.4.0-81-generic.new 4.4.0-81-generic
mkinitramfs: failed to determine device for /
mkinitramfs: workaround is MODULES=most, check:
grep -r MODULES /etc/initramfs-tools/

Error please report bug on initramfs-tools
Include the output of 'mount' and 'cat /proc/mounts'
$
$
$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=31981968k,nr_inodes=7995492,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=6401460k,mode=755)
rpool/ROOT/ubuntu on / type zfs (rw,relatime,xattr,noacl)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (rw,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids,release_agent=/run/cgmanager/agents/cgm-release-agent.pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,clone_children)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,release_agent=/run/cgmanager/agents/cgm-release-agent.perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,release_agent=/run/cgmanager/agents/cgm-release-agent.hugetlb)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
rpool/home on /home type zfs (rw,nosuid,noatime,xattr,posixacl)
rpool/home/root on /root type zfs (rw,nosuid,noatime,xattr,posixacl)
rpool/...

Read more...

Revision history for this message
bendikro (bendikro) wrote :
Revision history for this message
bendikro (bendikro) wrote :

Still an issue on Bionic

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

Confirmed issue on Bionic. Also confirmed the suggested patch in 1661629 #3 fixed the install for me.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

Adding initramfs-tools and nominating for bionic.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.