Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: systemd (Ubuntu Jammy) Status: New => Confirmed
-- 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: Confirmed Status in systemd source package in Bionic: Won't Fix Status in systemd source package in Focal: Confirmed Status in systemd source package in Jammy: Confirmed Status in systemd source package in Mantic: Confirmed Status in systemd source package in Noble: Confirmed 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