dirname applet missing from initramfs

Bug #1960083 reported by William Wilson
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
Fix Released
High
William Wilson
zfs-linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The initramfs is currently being built without the dirname applet. This is causing issues with zfs encrypted devices, as cryptsetup is attempting to use dirname to determine the location of the system key. This results in the following error:

/init: line 971: dirname: not found

followed by a prompt that is missing the zpool name. For example

"Please unlock disk keystore-" rather than "Please unlock disk keystore-rpool".

After entering the password, the user is dropped to an initramfs shell.

It appears that this was caused by a change in cryptsetup to suddenly need dirname to function properly.

Revision history for this message
William Wilson (jawn-smith) wrote :

This seems to have been as simple as updating the config file for the initramfs to include CONFIG_DIRNAME=y

Changed in busybox (Ubuntu):
status: New → In Progress
assignee: nobody → William Wilson (jawn-smith)
importance: Undecided → High
description: updated
Revision history for this message
William Wilson (jawn-smith) wrote :

Should anybody run into this issue and need a temporary workaround: from the initramfs run

zfs set keylocation=file:///run/keystore/system.key <pool name>

(where pool name is the name of your zpool) then reboot.

tags: added: patch
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

$ dput ssh-ubuntu busybox_1.30.1-7ubuntu3_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: /tmp/busybox_1.30.1-7ubuntu3_source.changes: Valid signature from 9B8EC849D5EF70ED
Checking signature on .dsc
gpg: /tmp/busybox_1.30.1-7ubuntu3.dsc: Valid signature from 9B8EC849D5EF70ED
Uploading to ssh-ubuntu (via sftp to upload.ubuntu.com):
  Uploading busybox_1.30.1-7ubuntu3.dsc: done.
  Uploading busybox_1.30.1-7ubuntu3.debian.tar.xz: done.
  Uploading busybox_1.30.1-7ubuntu3_source.buildinfo: done.
  Uploading busybox_1.30.1-7ubuntu3_source.changes: done.
Successfully uploaded packages.

Changed in busybox (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

although it seems to be a regression introduced by zfs-linux => previously it would copy the coreutils dirname into the initramfs as a binary. Which seems to have been dropped in the most recent upload in jammy. I kind of agree that busybox providing dirname applet is better, but it still feels like a bad regression introduced by zfs-linux.

Revision history for this message
Steve Langasek (vorlon) wrote :

We need to make sure there are some Breaks: added here so that a partial upgrade can't result in a broken initramfs. Probably new zfs-initramfs Breaks: busybox-initramfs (<< 1:1.30.1-7ubuntu3).

Also I see that this has not been uploaded to -proposed, pending review. I've copied your package from PPA, added the changelog bug reference, and uploaded to jammy-proposed now. Consider it reviewed. :)

Revision history for this message
Steve Langasek (vorlon) wrote :

oops correction, you did already upload it just hadn't shown up in britney output yet (so my upload was a rejected duplicate).

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I wonder if zfs-initramfs should actually add a harmless copy-exec dirname => which should either do nothing (in case busybox-initramfs provides dirname) or copy the coreutils implementation. Without breaks.

And I think I will take this upstream as well, as it seems to me that the upstream hook can similarly cause issues if used on stock older releases of Ubuntu.

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

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

Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.30.1-7ubuntu3

---------------
busybox (1:1.30.1-7ubuntu3) jammy; urgency=medium

  * Add dirname from coreutils to the initramfs (LP: #1960083)

 -- William 'jawn-smith' Wilson <email address hidden> Fri, 04 Feb 2022 16:10:23 -0600

Changed in busybox (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
geole0 (geole0) wrote (last edit ):

Hello
Are you sure?

https://zupimages.net/viewer.php?id=22/07/fxcb.jpg

it is in the package busybox - 1:1.30.1-7ubuntu2 (the end is 2 , not 3)

My install is today with software update during install,
Should I redownload a brand new ISO?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Fix was released in busybox 1:1.30.1-7ubuntu3 and requires initramfs rebuild

your screenshot clearly shows version number 1:1.30.1-7ubuntu2

Revision history for this message
geole0 (geole0) wrote (last edit ):

I just downloaded the iso today, then I redid an installation But it's still the version minus one

I don't know how to update the ISO I just downloaded before installing it

Deliver your correction in the distribution circuit.

a@a:~/Téléchargements$ ls -ls
3229164 -rw-rw-r-- 1 a a 3306657792 févr. 15 19:35 jammy-desktop-amd64.iso

 sudo mount jammy-desktop-amd64.iso /mnt

ls -ls /mnt/casper

     56 -r--r--r-- 1 root root 56565 févr. 2 08:56 filesystem.manifest
      3 -r--r--r-- 1 root root 2885 févr. 2 08:56 filesystem.manifest-minimal-remove
      4 -r--r--r-- 1 root root 3615 févr. 2 08:56 filesystem.manifest-remove
      1 -r--r--r-- 1 root root 11 févr. 2 08:56 filesystem.size
2391932 -r--r--r-- 1 root root 2449338368 févr. 2 08:56 filesystem.squashfs
      1 -r--r--r-- 1 root root 833 févr. 2 09:36 filesystem.squashfs.gpg
  78235 -r--r--r-- 1 root root 80111871 févr. 2 08:56 initrd
  10798 -r--r--r-- 1 root root 11056576 févr. 2 08:56 vmlinuz

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Downloaded the iso today doesn't mean the iso was built today, or if it contains this update.

jammy installer iso are attempted to be built daily, but are only published once they pass automated smoke testing and validation. The last image that passed that was built on 2nd of February. And builds since then have been failing validation are probably toast.

You can try a /pending/ image to see if this bug is fixed, but please be aware it has been failing automated testing thus it may have other issues.

Revision history for this message
geole0 (geole0) wrote (last edit ):

Hello
Oh!!!!!!!
 jammy-desktop-amd64.iso 2022-02-16 08:35 3.1G Desktop image for 64-bit PC (AMD64) computers (standard download)

ADD-ON

and version 3 is present with new installation..
 This error message is therefore no longer present.

It will remain to deal with the following (New bug) that I had already spotted when I hit the command
zfs set keylocation=file:///run/keystore/system.key rpool

It says initramfs is not allowed to mount root!

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1960083

tags: added: iso-testing
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 2.1.2-1ubuntu3

---------------
zfs-linux (2.1.2-1ubuntu3) jammy; urgency=medium

  * Apply pending stable updates with bug fixes and v5.16, v5.17 compat.
  * Add breaks to ensure that busybox with dirname is required for
    zfs-initramfs. LP: #1960083

 -- Dimitri John Ledkov <email address hidden> Mon, 21 Feb 2022 15:12:27 +0000

Changed in zfs-linux (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
geole0 (geole0) wrote :

Hello

This version is good jammy-desktop-amd64.iso 2022-03-21 08:38

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.