upgrade of kernel fails with mkinitramfs: failed to determine device for /
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Ubuntu users who have installed on ZFS devices, and using MODULES=dep in initramfs.conf.
[Test case]
-- upgrade --
1) install 16.04 using ZFS as rootfs.
2) upgrade to 18.04
-- initramfs update --
1) install Ubuntu, using ZFS as a rootfs.
2) change 'MODULES=most' to 'MODULES=dep' in /etc/initramfs-
3) run "sudo update-initramfs -u"
Without the patch, you should see a warning from mkinitramfs:
mkinitramfs: failed to determine device for /
mkinitramfs: workaround is MODULES=most, check:
grep -r MODULES /etc/initramfs-
With initramfs-tools patched, you should not see the warning, and instead have additional kernel modules added to the initramfs that are required to support the block devices that host the ZFS pools.
[Regression Potential]
This change is limited to behavior for ZFS filesystems. Likely regressions might include loading a kernel module that conflicts with another that is required at boot but not blacklisted, causing unexpected behavior on the system, or failure to find the necessary kernel modules or ZFS pools, possibly leading to an initramfs that does not contain the necessary modules yet has not shown a warning on screen to indicate that might be the issue.
---
When upgrading packages with "apt upgrade" on Ubuntu 16.04.1 LTS with root on ZFS I get this error:
Setting up linux-image-
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Generating /boot/initrd.
run-parts: executing /etc/kernel/
kdump-tools: Generating /var/lib/
mkinitramfs: failed to determine device for /
mkinitramfs: workaround is MODULES=most, check:
grep -r MODULES /etc/initramfs-
Error please report bug on initramfs-tools
Include the output of 'mount' and 'cat /proc/mounts'
update-initramfs: failed for with 1.
run-parts: /etc/kernel/
Failed to process /etc/kernel/
dpkg: error processing package linux-image-
subprocess installed post-installation script returned error exit status 2
version of initramfs-tools is 0.122ubuntu8.8
Output of mount is:
sysfs on /sys type sysfs (rw,nosuid,
proc on /proc type proc (rw,nosuid,
udev on /dev type devtmpfs (rw,nosuid,
devpts on /dev/pts type devpts (rw,nosuid,
tmpfs on /run type tmpfs (rw,nosuid,
rpool/ROOT/ubuntu on / type zfs (rw,relatime,
securityfs on /sys/kernel/
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,
cgroup on /sys/fs/
pstore on /sys/fs/pstore type pstore (rw,nosuid,
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
systemd-1 on /proc/sys/
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/
rpool/home on /home type zfs (rw,nosuid,
rpool/home/fredrik on /home/fredrik type zfs (rw,nosuid,
rpool/home/root on /root type zfs (rw,nosuid,
rpool/srv on /srv type zfs (rw,noatime,
rpool/var/cache on /var/cache type zfs (rw,nosuid,
rpool/var/log on /var/log type zfs (rw,nosuid,
rpool/var/spool on /var/spool type zfs (rw,nosuid,
rpool/var/tmp on /var/tmp type zfs (rw,nosuid,
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,
binfmt_misc on /proc/sys/
tracefs on /sys/kernel/
cat /proc/mounts
sysfs /sys sysfs rw,nosuid,
proc /proc proc rw,nosuid,
udev /dev devtmpfs rw,nosuid,
devpts /dev/pts devpts rw,nosuid,
tmpfs /run tmpfs rw,nosuid,
rpool/ROOT/ubuntu / zfs rw,relatime,
securityfs /sys/kernel/
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,
cgroup /sys/fs/
pstore /sys/fs/pstore pstore rw,nosuid,
cgroup /sys/fs/
cgroup /sys/fs/
cgroup /sys/fs/
cgroup /sys/fs/
cgroup /sys/fs/
cgroup /sys/fs/
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,
cgroup /sys/fs/
cgroup /sys/fs/
cgroup /sys/fs/
mqueue /dev/mqueue mqueue rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
systemd-1 /proc/sys/
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
fusectl /sys/fs/
rpool/home /home zfs rw,nosuid,
rpool/home/fredrik /home/fredrik zfs rw,nosuid,
rpool/home/root /root zfs rw,nosuid,
rpool/srv /srv zfs rw,noatime,
rpool/var/cache /var/cache zfs rw,nosuid,
rpool/var/log /var/log zfs rw,nosuid,
rpool/var/spool /var/spool zfs rw,nosuid,
rpool/var/tmp /var/tmp zfs rw,nosuid,
tmpfs /run/user/1000 tmpfs rw,nosuid,
binfmt_misc /proc/sys/
tracefs /sys/kernel/
Changed in initramfs-tools (Ubuntu): | |
status: | Confirmed → Triaged |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.