On Fri, 31 May 2019 at 14:55:04 +0200, Guilhem Moulin wrote: > And your proposed logic won't work well with detached headers, which > might be long gone by the time the initramfs image is created.
My bad, on second read your proposal doesn't affect detached headers at all, as you only propose to change the way how mountpoints are mapped to dm-crypt target(s), not further discovery (further device stack traversal). However I believe my other points remain. Perhaps we could look mountpoints up in /etc/fstab first, and fallback to /proc/mounts for the missing ones; thought at this point it's not clear to me whether that would be regression-free. By the way, with your use-case if the source device from /etc/fstab were specified by UUID (like the debian installer does by default) not as /dev/mapper/$NAME, then mapping it to a crypttab(5) entry is bound to fail: the mapped device with that UUID has the new/transient name. -- Guilhem.
signature.asc
Description: PGP signature