Bug#856589: initramfs-tools: mkinitramfs fails to run on systems with tmpfs on /
Package: initramfs-tools
Version: 0.120+deb8u2
Severity: normal
Hi,
I am trying to configure kdump-tools on a Debian jessie live system
(which runs entirely on tmpfs mount points using a custom made initrd).
kdump-tools uses initramfs-tools to generate an initramfs for the crash
kernel. On package installation, it runs:
root@host:~$ /etc/kernel/postinst.d/kdump-tools $(uname -r)
kdump-tools: Generating /var/lib/kdump/initrd.img-4.4.36-2
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'
update-initramfs: failed for with 1.
Since kdump-tools specifies a config directory, the suggested grep
command is incorrect (patch to fix that is attached).
root@host:~$ grep -r MODULES /var/lib/kdump/initramfs-tools/
/var/lib/kdump/initramfs-tools/initramfs.conf:# MODULES: [ most | netboot | dep | list ]
/var/lib/kdump/initramfs-tools/initramfs.conf:MODULES=dep
The recommended workaround (set MODULES=most) does not work either:
root@host:~$ sudo sed -i "s/MODULES=dep/MODULES=most/" /var/lib/kdump/initramfs-tools/initramfs.conf
root@host:~$ grep -r MODULES /var/lib/kdump/initramfs-tools/
/var/lib/kdump/initramfs-tools/initramfs.conf:# MODULES: [ most | netboot | dep | list ]
/var/lib/kdump/initramfs-tools/initramfs.conf:MODULES=most
root@host:~$ sudo /etc/kernel/postinst.d/kdump-tools $(uname -r)
kdump-tools: Generating /var/lib/kdump/initrd.img-4.4.36-2
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'
update-initramfs: failed for with 1.
Here is the requeted output of mount (/proc/mounts says the same):
root@host:~$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=755840k,nr_inodes=188960,mode=755)
tmpfs on / type tmpfs (rw,relatime,size=2097152k)
tmpfs on /var type tmpfs (rw,nodev,relatime,size=1048576k)
tmpfs on /var/log type tmpfs (rw,nosuid,nodev,noexec,relatime,size=204800k)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=524288k)
tmpfs on /home type tmpfs (rw,nosuid,nodev,relatime,size=102400k)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,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)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
Workaround: Comment all calls in dep_add_modules() in hook-functions.
--
Benjamin Drung
System Developer
Debian & Ubuntu Developer
ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin
Email: benjamin.drung@profitbricks.com
URL: http://www.profitbricks.com
Sitz der Gesellschaft: Berlin.
Registergericht: Amtsgericht Charlottenburg, HRB 125506B.
Geschäftsführer: Andreas Gauger, Achim Weiss.
>From f1db2c0c7687c13db182965c1da0ede97b570857 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <benjamin.drung@profitbricks.com>
Date: Thu, 2 Mar 2017 18:01:33 +0100
Subject: [PATCH] Fix config directory in error message
/etc/kernel/postinst.d/kdump-tools calls mkinitramfs with -d
/var/lib/kdump/initramfs-tools. This call might fail, but the
recommended grep command points to the wrong directory:
$ sudo /etc/kernel/postinst.d/kdump-tools $(uname -r)
kdump-tools: Generating /var/lib/kdump/initrd.img-4.4.36-2
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'
update-initramfs: failed for with 1.
---
hook-functions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hook-functions b/hook-functions
index 53753ba..fa6862f 100644
--- a/hook-functions
+++ b/hook-functions
@@ -328,7 +328,7 @@ dep_add_modules_mount()
|| ! [ -b "$dev_node" ]; then
echo "mkinitramfs: failed to determine device for $dir" >&2
echo "mkinitramfs: workaround is MODULES=most, check:" >&2
- echo "grep -r MODULES /etc/initramfs-tools/" >&2
+ echo "grep -r MODULES ${CONFDIR-/etc/initramfs-tools/}" >&2
echo "" >&2
echo "Error please report bug on initramfs-tools" >&2
echo "Include the output of 'mount' and 'cat /proc/mounts'" >&2
--
2.9.3
Reply to: