Allow building images with kernels without initrd

Bug #1720217 reported by Balint Reczey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
live-build (Debian)
Fix Released
Unknown
live-build (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Steve Langasek

Bug Description

[SRU Justification]
initramfsless boot is an important enhancement to decrease boot times and increase density for cloud images. Unfortunately, live-build assumes that an initramfs is used, and image builds fail if it is not present. Fix this so that these improvements can be applied to the LTS, which represents the vast majority of cloud instances.

[Test case]
1. Build livecd-rootfs from lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed
2. Install this version of livecd-rootfs with the xenial-updates live-build.
3. Create a build directory with 'mkdir build-dir; cd build-dir'
4. Attempt an image build with the command (as root): 'cp -a /usr/share/livecd-rootfs/live-build/{auto,ubuntu-cpc}/ .; env PROJECT=ubuntu-cpc SUBPROJECT=minimized ARCH=amd64 SUITE=xenial lb config && env PROJECT=ubuntu-cpc SUBPROJECT=minimized ARCH=amd64 lb build'
4. Confirm that this fails to produce output, with the error 'cp: cannot stat 'chroot/boot/initrd.img-*': No such file or directory'
5. Clean up the build tree with 'rm -r --one-file-system .build/ *'
6. Install live-build from xenial-proposed.
7. Attempt a second image build with the same command from step 4.
8. Confirm that this produces output files in the current directory.

[Regression potential]
If another bug is introduced elsewhere that causes an initramfs to fail to be generated in the expected location as part of an image that does require one, the resulting image build will fail or will fail to boot due to the ignored error.

[Original description]
Lb may fail when creating an image with a kernel not requiring, hence initramfs-tools not building initrd.
...
P: Begin installing local package lists...
[2017-09-28 15:55:06] lb_binary_linux-image
P: Begin install linux-image...
cp: cannot stat 'chroot/boot/initrd.img-*': No such file or directory
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists...
Building dependency tree...
...

Revision history for this message
Balint Reczey (rbalint) wrote :
Balint Reczey (rbalint)
Changed in live-build (Ubuntu):
status: New → Confirmed
Balint Reczey (rbalint)
description: updated
Steve Langasek (vorlon)
Changed in live-build (Ubuntu):
status: Confirmed → In Progress
Changed in live-build (Ubuntu Xenial):
assignee: nobody → Balint Reczey (rbalint)
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package live-build - 3.0~a57-1ubuntu31

---------------
live-build (3.0~a57-1ubuntu31) artful; urgency=medium

  * Don't fail when initramfs is not used (LP: #1720217)

 -- Balint Reczey <email address hidden> Thu, 28 Sep 2017 18:01:04 +0000

Changed in live-build (Ubuntu):
status: In Progress → Fix Released
Steve Langasek (vorlon)
description: updated
Steve Langasek (vorlon)
description: updated
Steve Langasek (vorlon)
description: updated
Steve Langasek (vorlon)
Changed in live-build (Ubuntu Xenial):
assignee: Balint Reczey (rbalint) → Steve Langasek (vorlon)
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Balint, or anyone else affected,

Accepted live-build into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/live-build/3.0~a57-1ubuntu25.5 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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 live-build (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in live-build (Debian):
status: Unknown → New
Steve Langasek (vorlon)
description: updated
Steve Langasek (vorlon)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

As part of verifying this SRU I had to change the test case to point to current lp:~ubuntu-core-dev/livecd-rootfs/livecd-rootfs-xenial, not because of any bug in the live-build SRU, but because the previously referenced branch would not reliably trigger the original bug against xenial (due to undefined ordering of initramfs-tools configuration).

These livecd-rootfs branches also had already added a versioned dependency on the xenial-proposed version of live-build, so the test case cannot be completed as written. Modifying the livecd-rootfs package to drop this versioned dependency is required; otherwise livecd-rootfs is unpacked but not configured, which prevents other packages to be successfully installed as part of the build by livecd-rootfs itself using apt.

Once livecd-rootfs is correctly installed with the relaxed dependency, the original failure is reproducible as expected; and upgrading to the xenial-proposed version of live-build resolves it.

tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for live-build 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 live-build - 3.0~a57-1ubuntu25.5

---------------
live-build (3.0~a57-1ubuntu25.5) xenial; urgency=medium

  [ Balint Reczey ]
  * Don't fail when initramfs is not used (LP: #1720217)

 -- Steve Langasek <email address hidden> Mon, 02 Oct 2017 16:57:51 -0700

Changed in live-build (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in live-build (Debian):
status: New → Fix Committed
Changed in live-build (Debian):
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.