update-initramfs fails for MODULES=dep when root is on LVM wich uses nvme device

Bug #1718055 reported by Dan Streetman
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Medium
Dan Streetman
Trusty
Fix Released
Medium
Dan Streetman

Bug Description

[impact]

On a trusty system, if using MODULES=dep with lvm-on-nvme then update-initramfs fails to rebuild the initramfs. This prevents using MODULES=dep for building an initramfs on trusty, with a rootfs that uses lvm on nvme.

[test case]

install a system where the rootfs uses a LVM logical volume that is located on a physical volume on a NVMe drive. Edit the /etc/initramfs-tools/initramfs.conf file and change the MODULES line to MODULES=dep and save the file. Then run sudo update-initramfs -u which will fail with:

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-129-generic
mkinitramfs: for root /dev/dm-0 missing nvme /sys/block/ entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-3.13.0-129-generic with 1.

[regression potential]

This changes initramfs creation for rootfs that are on nvme or lvm, so has the potential to break it for any system with its rootfs on either or both of those. It is likely to only break initramfs creation, not system booting.

About the autopkgtest failure, explanation can be found here:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1718055/comments/9

[other info]

related to bug 1532146

Revision history for this message
Dan Streetman (ddstreet) wrote :

this applies only to trusty; initramfs-tools in later releases is fixed already.

Changed in initramfs-tools (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Dan Streetman (ddstreet)
Revision history for this message
Dan Streetman (ddstreet) wrote :

Note this is fixed in upstream debian by commit:

commit 3cb744c9cf39f0dc178370ef6235a1b30f8c7d06
Author: Ben Hutchings <email address hidden>
Date: Tue Dec 8 02:53:23 2015 +0000

    hook-functions: Rewrite block device sysfs lookup to be generic

That commit is a larger change that reworks the entire way initramfs parses /dev/* names into underlying sys block device names, and is more change that is required to get trusty initramfs-tools working for this bug.

Revision history for this message
Dan Streetman (ddstreet) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp1718055-trusty.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to the SRU queue for review by the SRU team.

Changed in initramfs-tools (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Dan Streetman (ddstreet)
Changed in initramfs-tools (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted initramfs-tools into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.103ubuntu4.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in initramfs-tools (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-trusty
Revision history for this message
Dan Streetman (ddstreet) wrote :

$ dpkg -l | grep initramfs-tools
ii initramfs-tools 0.103ubuntu4.7 all tools for generating an initramfs
ii initramfs-tools-bin 0.103ubuntu4.7 amd64 binaries used by initramfs-tools

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-129-generic
mkinitramfs: for root /dev/dm-0 missing nvme /sys/block/ entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-3.13.0-129-generic with 1.

after update to proposed:

$ dpkg -l | grep initramfs-tools
ii initramfs-tools 0.103ubuntu4.8 all tools for generating an initramfs
ii initramfs-tools-bin 0.103ubuntu4.8 amd64 binaries used by initramfs-tools

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-129-generic

initramfs successfully built.

tags: added: verification-done verification-done-trusty
removed: verification-needed verification-needed-trusty
Revision history for this message
Dan Streetman (ddstreet) wrote :

the linux-lts-xenial autopkgtest failures are due to that pkg's test expecting the running kernel == test kernel, which is wrong as trusty is running stock 3.13 linux in the test, and the linux-lts autopkgtest doesn't upgrade to linux-lts-* kernel. so unrelated to this change.

e.g.
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-trusty/trusty/amd64/l/linux-lts-xenial/20170929_000420_777ca@/log.gz

...
Source Package Version: 4.4.0-97.120~14.04.1
Running Kernel Version: 3.13.0-133.182
ERROR: running version does not match source package
...

Revision history for this message
Dan Streetman (ddstreet) wrote :

the linux autopkgtest failure is due to the kernel team change to only build a single kernel 'flavour' to reduce test rebuild time, but the autopkgtest still expects the (no longer built) -lpae flavor on armhf. The kernel team has a bug open for it and is fixing it in the next build.

Eric Desrochers (slashd)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for initramfs-tools has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package initramfs-tools - 0.103ubuntu4.8

---------------
initramfs-tools (0.103ubuntu4.8) trusty; urgency=medium

  * hook-functions: handle lvm-on-nvme case.
    (LP: #1718055)

 -- Dan Streetman <email address hidden> Tue, 19 Sep 2017 11:03:43 -0400

Changed in initramfs-tools (Ubuntu Trusty):
status: Fix Committed → Fix Released
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.