initrd lacks modules to mount boot image from http boot

Bug #1981385 reported by Michael Hudson-Doyle
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Medium
Unassigned
Jammy
Fix Released
Medium
Unassigned

Bug Description

[ Impact ]

 * If you use UEFI http boot to boot an image (rather than an EFI
   executable) and get all the way to a normal userspace, you can
   access the boot image as /dev/pmem0. But this is not accessible in
   the initrd; presumably some modules are missing.
 * This is desirable because then you can just feed an installer ISO to
   a machine via http boot and the installer just works as normal
 * Add support for physical pmem devices, and simulation thereof with
   the memmap kernel command line parameter
 * The initrd is larger

[ Test Plan ]

 * unpack an initrd on a Jammy system with the generic kernel
   metapackage with unmkinitramfs
 * observe that the directories kernel/drivers/{nvdimm,dax,acpi/nfit}
   are not present
 * install the updated initramfs-tools packages from proposed
 * again unpack an initrd on a Jammy system with the generic kernel
   metapackage with unmkinitramfs
 * observe that the directories kernel/drivers/{nvdimm,dax,acpi/nfit}
   are present now
 * reboot to confirm that the system still boots
 * modify /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to contain a
   memmap entry - memmap=1G!4G seems to work on many systems over 4G of
   RAM, or do `dmesg | grep BIOS-e820` to observe the memory regions
   and select a usable one.
 * update-grub and reboot again
 * a /dev/pmem device should now be present on the system

[ Where problems could occur ]

 * The growth of the files in /boot will accelerate issues for users
   who have a dedicated boot partition that is not large enough

[ Other Info ]

 * Details on the memmap kernel command line parameter:
   https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
 * PMEM simulation with memmap:
   https://docs.pmem.io/persistent-memory/getting-started-guide/creating-development-environments/linux-environments/linux-memmap

[ Original Bug Description ]

If you use UEFI http boot to boot an image (rather than an EFI executable) and get all the way to a normal userspace, you can access the boot image as /dev/pmem0. But this is not accessible in the initrd; presumably some modules are missing. Dimitri added some modules that are clearly going to be necessary (kernel/drivers/nvdimm) in 0.140ubuntu14 and I added kernel/drivers/dax too in local experiments but this appears not to be enough to get it to appear.

This is desirable because then you can just feed an installer ISO to a machine via http boot and the installer just works as normal (the speed and, uh, quality, of the implementation of HTTP in a given machine's firmware may mean this isn't always the best option but it would be nice if it worked in case someone's machine actually does this well).

Revision history for this message
Keng-Yu Lin (lexical) wrote :

You may need "nfit" module in the initrd too.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Ah yes that was it, thanks so much!

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

This bug was fixed in the package initramfs-tools - 0.140ubuntu15

---------------
initramfs-tools (0.140ubuntu15) kinetic; urgency=medium

  * Include dax and nfit modules, also needed for pmem devices. (LP: #1981385)

 -- Michael Hudson-Doyle <email address hidden> Fri, 08 Jul 2022 15:03:33 +1200

Changed in initramfs-tools (Ubuntu):
status: New → Fix Released
Revision history for this message
Keng-Yu Lin (lexical) wrote :

@Michael, can you help backport this patch to Jammy too?

tags: added: foundations-triage-discuss
tags: added: foundations-todo
removed: foundations-triage-discuss
Changed in initramfs-tools (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → Medium
Dan Bungert (dbungert)
Changed in initramfs-tools (Ubuntu Jammy):
assignee: nobody → Dan Bungert (dbungert)
Dan Bungert (dbungert)
description: updated
Dan Bungert (dbungert)
Changed in initramfs-tools (Ubuntu Jammy):
status: Triaged → In Progress
assignee: Dan Bungert (dbungert) → nobody
Revision history for this message
Dan Bungert (dbungert) wrote :

Uploaded to Jammy, pending normal SRU processing.

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

Hello Michael, or anyone else affected,

Accepted initramfs-tools into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.140ubuntu13.1 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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Dan Bungert (dbungert) wrote :

I have self-verified the change and it passes my listed test plan.

Dan Bungert (dbungert)
tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.140ubuntu13.1

---------------
initramfs-tools (0.140ubuntu13.1) jammy; urgency=medium

  * Backport pmem support from kinetic by adding the nvdimm, dax, and nfit
    modules (LP: #1981385)

 -- Dan Bungert <email address hidden> Thu, 27 Oct 2022 11:44:07 -0600

Changed in initramfs-tools (Ubuntu Jammy):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
tags: removed: foundations-todo
Revision history for this message
Benjamin Drung (bdrung) wrote :

Re-open due to regression in noble.

Changed in initramfs-tools (Ubuntu):
importance: Undecided → Medium
status: Fix Released → Fix Committed
Revision history for this message
Benjamin Drung (bdrung) wrote :

BTW, could you come up with a test case that we could include in the initramfs-tools to avoid such kind of regressions in the future?

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

This bug was fixed in the package initramfs-tools - 0.142ubuntu23

---------------
initramfs-tools (0.142ubuntu23) noble; urgency=medium

  [ Daniel van Vugt ]
  * hooks/framebuffer: Only add simple/tiny framebuffer drivers. This is to
    limit the size of initrd when FRAMEBUFFER=y is soon enabled for desktop
    installations (LP: #1970069, #1869655).

  [ Benjamin Drung ]
  * autopkgtest: Increase QEMU timeouts on arm64/armhf
  * hooks/framebuffer:
    - Move adding framebuffer drivers into auto_add_modules
    - Drop looking in $MODULESDIR/initrd/ for kernel modules
    - Support MODULES=dep in framebuffer hook

initramfs-tools (0.142ubuntu22) noble; urgency=medium

  * autopkgtest: update systemd-udevd path from /lib to /usr/lib

initramfs-tools (0.142ubuntu21) noble; urgency=medium

  [ Benjamin Drung ]
  * configure_networking:
    - Increase minimum timeout to 30 seconds
    - Fix configuring BOOTIF when using iSCSI (LP: #2056187)
    - Set interface MTU if provided by the DHCP server (LP: #2056194)
    - log sleep durations before retries
  * Copy /etc/passwd into the initramfs to allow dhcpcd running as dhcpcd user
  * Replace obsolete pkg-config build-dependency by pkgconf

  [ Dan Bungert ]
  * Restore nvdimm and dax pmem-related modules (LP: #1981385)

 -- Benjamin Drung <email address hidden> Thu, 21 Mar 2024 10:57:54 +0100

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