git: initrd: Fix cryptsetup and tcplay rescue programs

Aaron LI aly at crater.dragonflybsd.org
Fri Sep 18 09:09:35 PDT 2026


commit 4935cf62c0e4f0dc2b7ecd1fcab301589d1f789e
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Sep 18 23:20:14 2026 +0800

    initrd: Fix cryptsetup and tcplay rescue programs
    
    My previous rescue.libcrypto merge commit
    (250a8b4928d6d15bd3909848d72a595025c798b9) introduced a regression and
    broke cryptsetup/tcplay. For example,
    
    ```
    $ sudo /rescue/cryptsetup isLuks /dev/zero
    ioctl deps call failed: No such file or directory
    Cannot initialize device-mapper. Is dm kernel module loaded?
    ```
    
    This was caused by that the libdm.a's symbols were hidden by
    libdevmapper.a, which appeared before libdm.
    
    To solve this conflict, separately link libdm.a for cryptsetup/tcplay,
    and remove -ldm from the final link command, so there is no symbol
    hiding problem.
    
    After the fix, the above command doesn't error and only exit with code
    234.
    
    In addition, link libprivate_ssh.a for scp/ssh in the same way as
    libdm.a.  This also avoids the extra building of the library.

Summary of changes:
 initrd/rescue/Makefile | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4935cf62c0e4f0dc2b7ecd1fcab301589d1f789e


-- 
DragonFly BSD source repository


More information about the Commits mailing list