cryptsetup-initramfs disappeared during upgrade from 23.10 to 24.04 leading to failing boot

Bug #2067622 reported by Beda Kosata
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Status tracked in Oracular
Noble
Fix Committed
Undecided
Unassigned
Oracular
Fix Released
Undecided
Nick Rosbrook

Bug Description

[Impact]

If an upgrade removes cryptsetup-initramfs, the system can then fail to boot.

[Test Plan]

We don't currently have a reproducer for this scenario, so we need to test that cryptsetup-initramfs is listed in the removal_denylist.cfg during upgrades to Noble.

1. Start an upgrade

$ do-release-upgrade

2. In another terminal, after the tarball has been downloaded and unpacked, find the temp directory

$ tmpdir="$(find /tmp -name ubuntu-release-upgrader-* -type d)"

3. Check that cryptsetup-initramfs is in the removal deny list:

grep "cryptsetup-initramfs" "$tmpdir/removal_denylist.cfg"

It should be listed there.

[Where problems could occur]

If there was a typo in the patch, the entry would not correctly match the cryptsetup-initramfs package name, and would therefore not prevent removal during upgrades.

[Original Description]

I have a system with a full-disk encryption installed with 23.10. After doing an upgrade to 24.04 from command line using `do-release-upgrade` (everything went without a problem), I rebooted and got a initramfs prompt complaining about root filesystem not being available.

I was able to boot using the kernel from the previous version (6.5.0) and after inspecting the system, I found that the `cryptsetup-initramfs` package was not installed. After installing it, it produced a new and slightly larger initramfs. With it, I was able to boot with the 6.8.0 kernel.

From the upgrade logs, I can see the following:

```
Investigating (0) cryptsetup-initramfs:amd64 < 2:2.7.0-1ubuntu4 @ii gK Ib >
Broken cryptsetup-initramfs:amd64 Depends on cryptsetup:amd64 < 2:2.7.0-1ubuntu4 @ii pgP > (>= 2:2.7.0-1ubuntu4)
  Considering cryptsetup:amd64 10000 as a solution to cryptsetup-initramfs:amd64 0
  Removing cryptsetup-initramfs:amd64 rather than change cryptsetup:amd64
```

Which I think is the culprit of the problem.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: ubuntu-release-upgrader-core 1:24.04.18
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
NonfreeKernelModules: zfs nvidia_modeset nvidia
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CrashDB: ubuntu
CurrentDesktop: MATE
Date: Thu May 30 16:37:39 2024
InstallationDate: Installed on 2024-02-25 (95 days ago)
InstallationMedia: Ubuntu-MATE 23.10 "Mantic Minotaur" - Release amd64 (20231010)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to noble on 2024-05-30 (0 days ago)
VarLogDistupgradeXorgFixuplog:
 INFO:root:/usr/bin/do-release-upgrade running
 INFO:root:No xorg.conf, exiting

Revision history for this message
Beda Kosata (beda-kosata) wrote :
Nick Rosbrook (enr0n)
tags: added: rls-nn-incoming
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Nick Rosbrook (enr0n)
tags: added: foundations-todo
removed: rls-nn-incoming
Nick Rosbrook (enr0n)
description: updated
Nick Rosbrook (enr0n)
Changed in ubuntu-release-upgrader (Ubuntu Oracular):
status: New → Fix Committed
Changed in ubuntu-release-upgrader (Ubuntu Noble):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:24.10.6

---------------
ubuntu-release-upgrader (1:24.10.6) oracular; urgency=medium

  * DistUpgrade: show a message about denied package removals
    (LP: #2073278)
  * data: add cryptsetup-initramfs to removal_denylist.cfg
    (LP: #2067622)
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Nick Rosbrook <email address hidden> Tue, 06 Aug 2024 16:48:41 -0400

Changed in ubuntu-release-upgrader (Ubuntu Oracular):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Proposed package upload rejected

An upload of ubuntu-release-upgrader to noble-proposed has been rejected from the upload queue for the following reason: "Changing the "The package %s is marked for removal..." string to an f"" string unnecessarily breaks translations, and it looks like the Amharic translation got broken (it retains the old translation, containing a '%s' - I'm not *sure* what python will do when it hits that, but it's not going to be what we want). Otherwise looks fine to me.".

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Beda, or anyone else affected,

Accepted ubuntu-release-upgrader into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:24.04.21 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-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. 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 ubuntu-release-upgrader (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Nick Rosbrook (enr0n) wrote :

I have verified the fix using ubuntu-release-upgrader from noble-propesed:

root@jammy:~# do-release-upgrade --proposed
Checking for a new Ubuntu release

= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =

The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.

To see what's new in this release, visit:
  https://wiki.ubuntu.com/NobleNumbat/ReleaseNotes

Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.

We hope you enjoy Ubuntu.

== Feedback and Helping ==

If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at

  http://www.ubuntu.com/community/participate/

Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever. If you feel
that you have found a bug please read:

  http://help.ubuntu.com/community/ReportingBugs

Then report bugs using apport in Ubuntu. For example:

  ubuntu-bug linux

will open a bug report in Launchpad regarding the linux package.

If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:

  http://help.ubuntu.com/community/InternetRelayChat
  http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
  http://www.ubuntuforums.org/

== More Information ==

You can find out more about Ubuntu on our website, IRC channel and wiki.
If you're new to Ubuntu, please visit:

  http://www.ubuntu.com/

To sign up for future Ubuntu announcements, please subscribe to Ubuntu's
very low volume announcement list at:

  http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce

Continue [yN]

Then, in another terminal:

root@jammy:~# tmpdir="$(find /tmp -name ubuntu-release-upgrader-* -type d)"
root@jammy:~# grep "cryptsetup-initramfs" "$tmpdir/removal_denylist.cfg"
# removing cryptsetup-initramfs can lead to boot failures (LP: #2067622)
^cryptsetup-initramfs$

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
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.