Package: kdump-tools
Version: 1:1.6.1-1
Followup-For: Bug #856594

Dear Maintainer,

Our use-case is exactly as the original report:
 * We debootstrap into temporary folder
 * Than we configure apt inside this folder and use "apt-get install....."
 * The post-install of "kdump-tools" fails

The fix that was pointed by comment#15 only solve part of the issue:
 * It uses the "linux-version list" command to see if a specific kernel
   version is installed.
 * But the issue only happen when we install both kernel and kdump-tools
   As a test, I removed the kernel from the chroot and was able to
   install kdump-tools without issues (even with kdump-tools 1:1.6.1-1)

Moreover, in my variant of the issue:
 * Trying to run /etc/kernel/postinst.d/kdump-tools <version>
   fails with the following error:
       # /etc/kernel/postinst.d/kdump-tools 4.9.0-8-amd64
       kdump-tools: Generating /var/lib/kdump/initrd.img-4.9.0-8-amd64
       mkinitramfs: MODULES dep requires mounted sysfs on /sys
       update-initramfs: failed for  with 1.
 * I.e:
   - /sys is not mounted inside the chroot
   - This is correct, as I do not want package installation inside
     the chroot to touch my host /sys

IMO,
 * The post-install script should skip initramfs generation if inside a chroot
 * The "udevd" package has a nice "chrooted()" shell test inside their postinst
   (based on comparing inode numbers of our "/" with pid-1 "/")
 * Alternatively, it should check if /sys is mounted

-- System Information:
Debian Release: 9.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/48 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C 
(charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages kdump-tools depends on:
ii  bsdmainutils           9.0.12+nmu1
ii  debconf [debconf-2.0]  1.5.61
ii  init-system-helpers    1.48
ii  kexec-tools            1:2.0.14-1
ii  lsb-base               9.20161125
ii  makedumpfile           1:1.6.1-1

kdump-tools recommends no packages.

kdump-tools suggests no packages.

-- debconf information:
* kdump-tools/use_kdump: true

Reply via email to