lvm2 version 2.03.11-2ubuntu1 breaks initramfs

Bug #1915579 reported by Danial Behzadi
98
This bug affects 21 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Fix Released
Critical
Lukas Märdian

Bug Description

I upgraded lvm2 from 2.03.07-1ubuntu4 to 2.03.11-2ubuntu1 and my initramfs broke. I had to manually rollback to the old version to be able to boot. The error was something like:

Gave up waiting for root device. Common problems:
  - Boot args (cat /proc/cmdline)
    - Check rootdelay= (did the system wait long enough?)
    - Check root= (did the system wait for the right device?)
  - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/vgubuntu-root does not exist. Dropping to a shell!

And there was no neither my lvm lvs, nor lvm binary on initramfs.

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: lvm2 2.03.07-1ubuntu4
ProcVersionSignature: Ubuntu 5.10.0-14.15-generic 5.10.11
Uname: Linux 5.10.0-14-generic x86_64
ApportVersion: 2.20.11-0ubuntu57
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Feb 13 02:42:08 2021
InstallationDate: Installed on 2019-11-01 (469 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: lvm2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Danial Behzadi (dani.behzi) wrote :
Revision history for this message
Bruno Redondi (brunor73) wrote :

The new version of lvm sets wrong file permissions to /usr/share/initramfs-tools/hooks/lvm2
This file should have 755 permission but after the upgrade it has 644.
If you "sudo chmod 755 /usr/share/initramfs-tools/hooks/lvm2 && sudo update-initramfs -u" the system will boot correctly.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lvm2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Filipe Milani de Souza (filipemilanidesouza) wrote :

Good afternoon. I am having the least problem, but the example above did not solve my problem.

Changed in lvm2 (Ubuntu):
assignee: nobody → Filipe Milani de Souza (filipemilanidesouza)
status: Confirmed → In Progress
Changed in lvm2 (Ubuntu):
importance: Undecided → Critical
tags: added: regression-release rls-hh-incoming
Changed in lvm2 (Ubuntu):
assignee: Filipe Milani de Souza (filipemilanidesouza) → nobody
status: In Progress → Confirmed
Changed in lvm2 (Ubuntu):
status: Confirmed → Triaged
summary: - version 2.03.11-2ubuntu1 breaks initramfs
+ lvm2 version 2.03.11-2ubuntu1 breaks initramfs
Revision history for this message
Mario Schwalbe (schwalbe) wrote :

Good morning. Took me an afternoon to figure this out, after no kernel was booting anymore. Still present with version 2.03.11-2ubuntu2 of the package.

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

I've tried the steps in comment 2, but I'm still left at (initramfs) after a reboot.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

I also have this problem (with a LUKS & LVM). As a workaround, I did:

1) boot into live CD, start a terminal and do everything as root (sudo -i)
2) open the encrypted LUKS partition: cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt

Note that the name (in my case "nvme0n1p3_crypt") must match the name that is in the etc/crypttab . Otherwise the later generated initramfs will not work correctly.
3) vgscan && vgchange -ay vgubuntu
4) mount /dev/vgubuntu/root /mnt
5) mount /dev/nvme0n1p2 /mnt/boot # this is my /boot partition
6) mount --bind /dev /mnt/dev && mount --bind /sys /mnt/sys && mount --bind /proc /mnt/proc
7) chroot /mnt
8) chmod 755 /usr/share/initramfs-tools/hooks/lvm2
9) update-initramfs -u

Lukas Märdian (slyon)
Changed in lvm2 (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
status: Triaged → In Progress
Revision history for this message
Lukas Märdian (slyon) wrote :

That file mode must have been lost during the last merge...
I've prepared a fix for the 664 -> 755 mode change of /usr/share/initramfs-tools/hooks/lvm2 available in this PPA (currently building):

https://launchpad.net/~slyon/+archive/ubuntu/lp1915579

Could you please check and confirm if this is fixing the problem for you?

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

The steps in comment #7 worked for me. Thanks @toabctl

Revision history for this message
Mario Schwalbe (schwalbe) wrote :

@Lukas (#8): Works.

1. Permissions are correct. This was obvious already, since `update-initramfs -v` states that it doesn't execute /usr/share/initramfs-tools/hooks/lvm2 due to insufficient permissions.
2. Unpacked the initramfs and files are included again.
3. Boots.

Thanks a lot.

Revision history for this message
Lukas Märdian (slyon) wrote :

Thank a lot for the confirmation @Mario!

I've uploaded the fixed package to hirsute-proposed and @xnox implemented a check in "pkgbinarymangler" to avoid such failures in the future: https://launchpad.net/ubuntu/+source/pkgbinarymangler/147

Changed in lvm2 (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Eugene Crosser (crosser) wrote :

I confirm that after upgarading lvm2 to 2.03.11-2ubuntu3 from -proposed, the hook file has correct permissions, and resulting initrd is bootable.

Revision history for this message
Aaron Johnson (acjohnson) wrote :

2.03.11-2ubuntu3 fixed this for me as well

tags: removed: rls-hh-incoming
Revision history for this message
Ernst Persson (ernstp) wrote :

You really should migrate this from proposed to non-proposed asap!

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

This bug was fixed in the package lvm2 - 2.03.11-2ubuntu3

---------------
lvm2 (2.03.11-2ubuntu3) hirsute; urgency=medium

  * Fix file mode of debian/initramfs-tools/lvm2/hooks/lvm2 (LP: #1915579)

 -- Lukas Märdian <email address hidden> Thu, 04 Mar 2021 11:00:58 +0100

Changed in lvm2 (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.