AFAIK, we don't use systemd-cryptsetup in Ubuntu's initrd, and you are
trying to use an option specific to systemd's crypttab implementation.
So I am not surprised by:

  cryptsetup: WARNING: dm_crypt-0: ignoring unknown option
x-initrd.attach

What are you trying to do here exactly?


** Changed in: systemd (Ubuntu Focal)
       Status: Confirmed => Incomplete

** Changed in: systemd (Ubuntu Jammy)
       Status: Confirmed => Incomplete

** Changed in: systemd (Ubuntu Mantic)
       Status: Confirmed => Incomplete

** Changed in: systemd (Ubuntu Noble)
       Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2056802

Title:
  crypttab does not honor `x-initrd.attach` option

Status in systemd package in Ubuntu:
  Incomplete
Status in systemd source package in Bionic:
  Won't Fix
Status in systemd source package in Focal:
  Incomplete
Status in systemd source package in Jammy:
  Incomplete
Status in systemd source package in Mantic:
  Incomplete
Status in systemd source package in Noble:
  Incomplete

Bug description:
  From systemd version 245+ an option was added x-initrd.attach

  ---------

  Setup this encrypted block device in the initrd, similarly to
  systemd.mount(5) units marked with x-initrd.mount.

   Although it's not necessary to mark the mount entry for the root file
  system with x-initrd.mount, x-initrd.attach is still recommended with
  the encrypted block device containing the root file system as
  otherwise systemd will attempt to detach the device during the regular
  system shutdown while it's still in use. With this option the device
  will still be detached but later after the root file system is
  unmounted.

  All other encrypted block devices that contain file systems mounted in
  the initrd should use this option.

   Added in version 245. [0]

  ---------

  release: noble
  systemd version: 253.5-1ubuntu6

  Install noble to a vm with virt-manager and encrypt the lvm during subiquity 
install.
  After successful install,
  Modify /etc/crypttab to include the parameter in the 4th column
  example:
  sda6_crypt UUID=099aae4a-b11b-49a6-a6c4-62939eddf7a0 none luks,x-initrd.attach

  update-initramfs -u -k all

  During boot or shutdown the logs show
  cryptsetup: WARNING: dm_crypt-0: ignoring unknown option x-initrd.attach

  There are two separate problems
  1. crypttab doesn't recognize x-initrd.attach option in /etc/crypttab file.
       cryptsetup: WARNING: dm_crypt-0: ignoring unknown option x-initrd.attach
  2. this error happens on shutdown/restart
        [systemd-cryptsetup]: Device dm-crypt-0 is still in use.
        [systemd-cryptsetup]: Failed to deactivate: Device or resource busy.
  The vm does eventually shutdown after throwing the above warnings.

  [0]
  
https://www.freedesktop.org/software/systemd/man/latest/crypttab.html#x-initrd.attach

  These patches look like they could fix the issue, The last one might not be 
needed.
  git format-patch -1 8ce02b87cece09797c1030c778db4180e1e2ce2e
  
https://github.com/systemd/systemd/commit/8ce02b87cece09797c1030c778db4180e1e2ce2e

  git format-patch -1 1dc85eff1d0dff18aaeaae530c91bf53f34b726e
  
https://github.com/systemd/systemd/commit/1dc85eff1d0dff18aaeaae530c91bf53f34b726e

  git format-patch -1 bf1484c70a24cf04c145a9509c8124ffd7fb0879
  
https://github.com/systemd/systemd/commit/bf1484c70a24cf04c145a9509c8124ffd7fb0879

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2056802/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to