update-initramfs should include firmware from /lib/firmware/updates

Bug #1571506 reported by Qiang Yu
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Wishlist
William Wilson
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
William Wilson
Groovy
Fix Released
Undecided
William Wilson
Hirsute
Fix Released
Wishlist
William Wilson

Bug Description

[Impact]

 * Firmware files under /lib/firmware/updates would not be
   processed when running update-initramfs

 * The kernel org specifies that this is a location where
   firmware can be stored, so we should search there

[Test Case]

 * Stage some firmware under /lib/firmware/updates

 * Run update-initramfs and ensure that the firmware in
   /lib/firmware/updates is found and included in the initramfs

[Where problems could occur]

 * Since dpkg places no files in /lib/firmware/updates, we
   could end up picking up firmware changes that we did not intend

[Other info]

 * This change already exists in groovy and beyond. It was pulled in
   when initramfs-tools version 0.137 was merged from Debian

according to the kernel doc
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/firmware_class/README

Linux kernel will search firmware from
"/lib/firmware/updates/" UTS_RELEASE,
"/lib/firmware/updates",
"/lib/firmware/" UTS_RELEASE,
"/lib/firmware"

But the add module function in initramfs-tools won't search the "/lib/firmware/updates".

This problem applies to all Ubuntu releases.

Attach patch to fix this.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: initramfs-tools 0.103ubuntu4.2
ProcVersionSignature: Ubuntu 4.2.0-30.36~14.04.1-generic 4.2.8-ckt3
Uname: Linux 4.2.0-30-generic i686
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: i386
CurrentDesktop: Unity
Date: Mon Apr 18 14:24:29 2016
InstallationDate: Installed on 2014-04-23 (725 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Qiang Yu (qiang-yu) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

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

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

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

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
LIHONG YANG (lyang8) wrote :

We still experienced the same issue with 20.04 Beta Release.

Can we request the attached "fix.patch" to be pulled to address this issue?

Revision history for this message
LIHONG YANG (lyang8) wrote :

Hello,
Any update on this request?
Thanks,
Lihong

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the report and the patch, I've subscribed ubuntu-sponsors now. Could you maybe explain the practical impact/what problems it creates?

tags: added: rls-ff-incoming
Revision history for this message
Qiang Yu (qiang-yu) wrote :

This is for the convenience of user who uses custom firmware and company who deploy updated firmware. Without the /lib/firmware/updates directory, if user want to use custom firmware, he has to replace the /lib/firmware files or create a directory for each kernel version.

Mathew Hodson (mhodson)
Changed in initramfs-tools (Ubuntu):
importance: Undecided → Wishlist
summary: - update-initramfs won't include firmware in /lib/firmware/updates
+ update-initramfs should include firmware from /lib/firmware/updates
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@Qiang Yu

In Ubuntu, none of the linux-firmware packages ship anything in /updates directly. /lib should only contain files managed by dpkg / installed from the Ubuntu Archive. We ship all up to date firmware for all devices.

I do not think it is reasonable to start supporting /updates directory, and thus suggesting that users drop-in firmware files there, which are not managed by dpkg.

Ubuntu, releases firmware updates for AMD hardware, if we are missing any firmware updates for AMD, you can contact <email address hidden>

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Apparently lots of things still ship stuff in /updates/

And because kernel says so, distributions are forced to follow.

Changed in initramfs-tools (Ubuntu):
status: Won't Fix → Triaged
tags: added: fr-1103
tags: removed: rls-ff-incoming
Dave Jones (waveform)
Changed in initramfs-tools (Ubuntu Hirsute):
assignee: nobody → Dave Jones (waveform)
Changed in initramfs-tools (Ubuntu Focal):
assignee: nobody → William Wilson (jawn-smith)
Changed in initramfs-tools (Ubuntu Groovy):
assignee: nobody → William Wilson (jawn-smith)
Changed in initramfs-tools (Ubuntu Hirsute):
assignee: Dave Jones (waveform) → William Wilson (jawn-smith)
Changed in initramfs-tools (Ubuntu Groovy):
status: New → Fix Released
Changed in initramfs-tools (Ubuntu Hirsute):
status: Triaged → Fix Released
Changed in initramfs-tools (Ubuntu Focal):
status: New → In Progress
Revision history for this message
William Wilson (jawn-smith) wrote :

This fix already exists in groovy and hirsute. It was applied when pulling in version 0.137 from upstream. The attached patch is to SRU the fix into focal.

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

I've sponsored this.

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

> I've sponsored this.

without a SRU template? ;-)

Revision history for this message
William Wilson (jawn-smith) wrote :

> without a SRU template? ;-)

Thanks for the reminder!

description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Qiang, or anyone else affected,

Accepted initramfs-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.136ubuntu6.4 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in initramfs-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
William Wilson (jawn-smith) wrote :

The SRU verification passed for focal. The attached screenshot shows firmware staged in /lib/firmware/updates that is not included in the initramfs with version 0.136ubuntu6.3 of initramfs-tools, and then correctly included in the initramfs with version 0.136ubuntu6.4 of initramfs-tools.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.136ubuntu6.4

---------------
initramfs-tools (0.136ubuntu6.4) focal; urgency=medium

  * hook-functions: Search for firmware under /lib/firmware/updates
    (LP: #1571506)

 -- William 'jawn-smith' Wilson <email address hidden> Wed, 03 Mar 2021 16:34:04 -0600

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

Dan Streetman (ddstreet)
Changed in initramfs-tools (Ubuntu Bionic):
status: New → In Progress
Revision history for this message
Dan Streetman (ddstreet) wrote :

uploaded to bionic

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Qiang, or anyone else affected,

Accepted initramfs-tools into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.130ubuntu3.12 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, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in initramfs-tools (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-done
Revision history for this message
Dan Streetman (ddstreet) wrote :
Download full text (8.6 KiB)

ubuntu@lp1571506-b:~$ dpkg -l|grep initramfs-tools
ii initramfs-tools 0.130ubuntu3.11 all generic modular initramfs generator (automation)
ii initramfs-tools-bin 0.130ubuntu3.11 amd64 binaries used by initramfs-tools
ii initramfs-tools-core 0.130ubuntu3.11 all generic modular initramfs generator (core tools)
ubuntu@lp1571506-b:~$ sudo lsinitramfs /boot/initrd.img-4.15.0-142-generic | grep firmware
lib/udev/rules.d/50-firmware.rules
lib/firmware
lib/firmware/netronome
lib/firmware/netronome/nic_AMDA0081-0001_1x40.nffw
lib/firmware/netronome/nic_AMDA0097-0001_2x40.nffw
lib/firmware/netronome/nic_AMDA0099-0001_2x25.nffw
lib/firmware/netronome/nic_AMDA0097-0001_8x10.nffw
lib/firmware/netronome/nic_AMDA0099-0001_2x10.nffw
lib/firmware/netronome/nic_AMDA0081-0001_4x10.nffw
lib/firmware/netronome/nic_AMDA0097-0001_4x10_1x40.nffw
lib/firmware/netronome/nic
lib/firmware/netronome/nic/nic_AMDA0081-0001_1x40.nffw
lib/firmware/netronome/nic/nic_AMDA0097-0001_2x40.nffw
lib/firmware/netronome/nic/nic_AMDA0099-0001_2x25.nffw
lib/firmware/netronome/nic/nic_AMDA0097-0001_8x10.nffw
lib/firmware/netronome/nic/nic_AMDA0099-0001_2x10.nffw
lib/firmware/netronome/nic/nic_AMDA0081-0001_4x10.nffw
lib/firmware/netronome/nic/nic_AMDA0097-0001_4x10_1x40.nffw
lib/firmware/netronome/nic/nic_AMDA0096-0001_2x10.nffw
lib/firmware/netronome/nic_AMDA0096-0001_2x10.nffw
lib/firmware/ql2100_fw.bin
lib/firmware/ql2400_fw.bin
lib/firmware/bnx2x
lib/firmware/bnx2x/bnx2x-e1-7.13.1.0.fw
lib/firmware/bnx2x/bnx2x-e2-7.13.1.0.fw
lib/firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw
lib/firmware/mellanox
lib/firmware/mellanox/mlxsw_spectrum-13.1530.152.mfa2
lib/firmware/tigon
lib/firmware/tigon/tg3_tso.bin
lib/firmware/tigon/tg3_tso5.bin
lib/firmware/tigon/tg3.bin
lib/firmware/ql2322_fw.bin
lib/firmware/qlogic
lib/firmware/qlogic/1280.bin
lib/firmware/qlogic/12160.bin
lib/firmware/qlogic/1040.bin
lib/firmware/ql2300_fw.bin
lib/firmware/ql2500_fw.bin
lib/firmware/ql2200_fw.bin
lib/modules/4.15.0-142-generic/kernel/drivers/firmware
lib/modules/4.15.0-142-generic/kernel/drivers/firmware/iscsi_ibft.ko
ubuntu@lp1571506-b:~$ sudo mkdir /lib/firmware/updates
ubuntu@lp1571506-b:~$ sudo mv /lib/firmware/bnx2x /lib/firmware/updates/
ubuntu@lp1571506-b:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.15.0-142-generic
ubuntu@lp1571506-b:~$ sudo lsinitramfs /boot/initrd.img-4.15.0-142-generic | grep firmware
lib/udev/rules.d/50-firmware.rules
lib/firmware
lib/firmware/netronome
lib/firmware/netronome/nic_AMDA0081-0001_1x40.nffw
lib/firmware/netronome/nic_AMDA0097-0001_2x40.nffw
lib/firmware/netronome/nic_AMDA0099-0001_2x25.nffw
lib/firmware/netronome/nic_AMDA0097-0001_8x10.nffw
lib/firmware/netronome/nic_AMDA0099-0001_2x10.nffw
lib/firmware/netronome/nic_AMDA0081-0001_4x10.nffw
lib/firmware/netronome/nic_AMDA0097-0001_4x10_1x40.nffw
lib/firmware/netronome/nic
lib/firmware/netronome/nic/nic_AMDA0081-0001_1x40.nffw
lib/firmware/netronome/nic/nic_AMDA0097-0001_2x40.nffw
lib/firmware/netronome/nic/nic_AMDA0099-0001_2x25.nffw
lib/firmware/n...

Read more...

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.130ubuntu3.12

---------------
initramfs-tools (0.130ubuntu3.12) bionic; urgency=medium

  * scripts/local-premount/resume:
    - Use readlink -f to correctly handle non-symlink $resume
      (LP: #1876570)
  * hooks/fsck:
    - don't check PASSNO, always include fsck
      (LP: #1917780)
  * hook-functions:
    - include firmware from /lib/firmware/updates
      (LP: #1571506)

 -- Dan Streetman <email address hidden> Thu, 18 Mar 2021 14:48:17 -0400

Changed in initramfs-tools (Ubuntu Bionic):
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.