Mitigate lack of space from new initramfs

Bug #2060032 reported by Dave Jones
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flash-kernel (Ubuntu)
New
Undecided
Unassigned
ubuntu-raspi-settings (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Discovered on an image upgraded from jammy to noble:

jammy's boot partition is a mere 256MB. This was fine when the initrd was relatively minimal, as was the case with the split linux-modules-extra, which resulted in initrd's with a size around ~30MB. However, with noble, linux-modules-extra has been removed (with good justification; the split caused a raft of complaints about missing modules). The new initrd is >100MB and as a result, flash-kernel can fail mid-way through copying things to the boot partition, leading to an unbootable system (this is also something flash-kernel should guard against, so I'll target this bug to f-k too).

This won't affect new noble installs where the boot partition is an expanded 512MB, but there's no easy way to resize the boot partition on upgraded systems.

Investigating the content of the new initrd, at least 40MB of it is taken up with binary blobs for nvidia graphics cards which probably aren't that useful on a Pi (unless your name is Jeff Geerling). There's no mechanism for exclusion of modules, so we should add an initramfs-tools hook to ubuntu-raspi-settings to manually exclude these modules (possibly with a configuration switch just in case someone wants to include them again).

Dave Jones (waveform)
Changed in ubuntu-raspi-settings (Ubuntu):
status: New → Confirmed
tags: added: foundations-todo
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-raspi-settings - 24.04.2

---------------
ubuntu-raspi-settings (24.04.2) noble; urgency=medium

  * Removed etc/netplan/01-use-network-manager.yaml: An equivalent is
    now provided under /lib by ubuntu-desktop-settings (LP: #2042866)
  * usr/share/initramfs-tools/hooks/zz-exclude-nvidia: New hook to exclude
    nvidia modules from the raspi initramfs (LP: #2060032)
  * usr/bin/update-v3d-config: Add script and corresponding service to update
    the X11 configuration for Pi 5 displays (LP: #2044718)
  * etc/X11/xorg.conf.d/99-vc4-primary.conf: Renamed to 99-v3d.conf
  * d/ubuntu-raspi-settings-desktop.lintian-overrides: Remove unknown tags,
    add tags for update-v3d-config
  * d/ubuntu-raspi-settings.lintian-overrides: Add override for appstream
    metadata
  * ubuntu-raspi-settings: Removed lz4 dependency; we removed the need for
    this in 24.04.1 when removing the obsolete initramfs-tools hack
  * Remove meson build dependency; dh_install is sufficient

 -- Dave Jones <email address hidden> Wed, 03 Apr 2024 14:37:51 +0100

Changed in ubuntu-raspi-settings (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

The zz-exclude-nvidia should not be needed any more after having initramfs-tools 0.142ubuntu23 only install simple/tiny framebuffer drivers. See bug #1970069 and #1869655.

Revision history for this message
Dave Jones (waveform) wrote :

Hmm, I see that was released on 21st of March; I'm *fairly* sure the excess size of the initramfs was still occurring after that but I'll double check this evening.

Revision history for this message
Dave Jones (waveform) wrote :

No, I'm wrong -- looks like 0.142ubuntu23 fixed it. I'll pull this hack back out, thanks!

Revision history for this message
Dave Jones (waveform) wrote :

I'll leave the flash-kernel portion of this open though, as it should not be attempting to flash stuff when the destination is going to run out of space.

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.