swapfile has holes on preinstalled desktop

Bug #1961047 reported by Dave Jones
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

The swapfile generated on the current Ubuntu on Raspberry Pi dailies for jammy includes holes which prevents the swapfile from activating on boot. After digging through livecd-rootfs and ubuntu-image I *think* this might be a problem introduced by the latter. However, this seems to come up periodically so rather than repeatedly trying to squash the problem let's just avoid it entirely by having the swapfile allocated on first boot. Using fallocate for this (instead of dd'ing /dev/zero) works happily and is extremely quick.

I've proposed the following merge against ubuntu/master which implements this change (and cleans up some cruft in the fstab handling; that's in a separate commit though -- happy to remove it if wanted):

https://code.launchpad.net/~waveform/livecd-rootfs/+git/livecd-rootfs/+merge/415625

The change has been tested on the armhf and arm64 preinstalled jammy dailies and works happily. My one concern was that the file-system expansion must happen prior to the swapfile allocation, but given systemd is handling the expansion, and the allocation has "After=local-fs.target" specified, this appears to be sufficient for everything to run in the correct order.

Related branches

Dave Jones (waveform)
Changed in livecd-rootfs (Ubuntu Jammy):
milestone: none → ubuntu-22.04
tags: added: raspi-image
summary: - swapfile has holes
+ swapfile has holes on preinstalled desktop
Changed in livecd-rootfs (Ubuntu Jammy):
status: New → Confirmed
Dave Jones (waveform)
tags: added: rls-jj-incoming
tags: added: fr-2065
tags: removed: rls-jj-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.757

---------------
livecd-rootfs (2.757) jammy; urgency=medium

  [ Dave Jones ]
  * Fix holes in swapfiles on pre-installed desktop images. Instead of
    pre-allocating the swapfile in the image, allocate it on first boot and
    use a systemd .swap unit to activate it (LP: #1961047)

  [ Łukasz 'sil2100' Zemczak ]
  * Use the 'classic' branch of the pi gadget for both classic and desktop
    pi images by specifying the gadget make target during the gadget priming
    phase.

 -- Łukasz 'sil2100' Zemczak <email address hidden> Tue, 22 Feb 2022 11:33:28 +0100

Changed in livecd-rootfs (Ubuntu Jammy):
status: Confirmed → 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.