update-initramfs fails when booted with dracut initrd

Bug #2084809 reported by Benjamin Drung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dracut (Ubuntu)
In Progress
High
Unassigned

Bug Description

I created an initrd with dracut and successfully booted with it, but generating an initrd fails then:

```
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic
cryptsetup: WARNING: target 'luks-e1446dc1-f3d2-445f-96aa-09245ebe7bd5' not
    found in /etc/crypttab
W: Couldn't identify type of root file system '/dev/mapper/system_crypt' for fsck hook
```

Booted with an initrd from initramfs-tools:

```
$ mount | grep system_crypt | grep -v snap
/dev/mapper/system_crypt on / type ext4 (rw,relatime,discard,errors=remount-ro)
```

Booted with an initrd from dracut:

```
$ mount | grep " / "
/dev/mapper/luks-e1446dc1-f3d2-445f-96aa-09245ebe7bd5 on / type ext4 (rw,relatime,errors=remount-ro)
```

ProblemType: Bug
DistroRelease: Ubuntu 24.10
Package: initramfs-tools 0.142ubuntu34
ProcVersionSignature: Ubuntu 6.11.0-8.8-generic 6.11.0
Uname: Linux 6.11.0-8-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.30.0-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct 17 15:14:42 2024
InstallationDate: Installed on 2022-03-09 (953 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: Upgraded to oracular on 2024-05-02 (168 days ago)
modified.conffile..etc.apport.crashdb.conf: [modified]
mtime.conffile..etc.apport.crashdb.conf: 2024-09-11T14:06:08.605603

Revision history for this message
Benjamin Drung (bdrung) wrote :
description: updated
Benjamin Drung (bdrung)
description: updated
description: updated
Revision history for this message
Benjamin Drung (bdrung) wrote :

/etc/crypttab is not included in the initrd, including this files fixes it.

Revision history for this message
Benjamin Drung (bdrung) wrote :
affects: initramfs-tools (Ubuntu) → dracut (Ubuntu)
Changed in dracut (Ubuntu):
importance: Undecided → High
status: New → In Progress
Revision history for this message
Benjamin Drung (bdrung) wrote :

That bug escalated quickly: I misunderstood the meaning of the `hostonly=false` mode. We want to use `hostonly`, but in a mode that support major hardware changes: https://github.com/dracut-ng/dracut-ng/issues/748

To work around this bug, you can build the initrd in hostonly mode 'sloppy':

```
sudo dracut -H --hostonly-mode=sloppy --force
```

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.