Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New kernels can't find libcryptsetup in initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
rjmx
n00b
n00b


Joined: 13 Oct 2014
Posts: 5

PostPosted: Fri Oct 24, 2014 4:09 pm    Post subject: New kernels can't find libcryptsetup in initramfs Reply with quote

I'm just switching all my boxes to Gentoo after 12 years with Debian. All so far use encrypted disks with luks, and are amd64 systems.
On one of them, I can't compile a bootable kernel/initramfs any longer: instead of being asked for a password on boot, I get a message saying that it can't find libcryptsetup.so.4.
I successfully built quite a few kernels initially (while getting everything going), so clearly something has changed.
If I dismantle the initramfs files in /boot with cpio, it appears that the ones that work have libcryptsetup.so.4 in /usr/lib64, whereas the ones that fail have it in /usr/lib. This probably explains why the boot process can't find it, and clearly I've changed something, but what?
Back to top
View user's profile Send private message
rjmx
n00b
n00b


Joined: 13 Oct 2014
Posts: 5

PostPosted: Mon Oct 27, 2014 5:41 pm    Post subject: More information Reply with quote

After diving into the genkernel scripts, I've discovered that it uses a program called 'lddtree' to determine where it gets any included libraries to include in the initramfs. This is what I get when I run lddtree on /sbin/cryptsetup on that box where compiled kernels don't work:

Code:

~# lddtree /sbin/cryptsetup
cryptsetup => /sbin/cryptsetup (interpreter => /lib64/ld-linux-x86-64.so.2)
    libcryptsetup.so.4 => /usr/lib/libcryptsetup.so.4     *********
        libuuid.so.1 => /lib64/libuuid.so.1
        libdevmapper.so.1.02 => /lib64/libdevmapper.so.1.02
            libudev.so.1 => /lib64/libudev.so.1
            libpthread.so.0 => /lib64/libpthread.so.0
        libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0     *********
            libdl.so.2 => /lib64/libdl.so.2
            libz.so.1 => /lib64/libz.so.1
    libpopt.so.0 => /usr/lib/libpopt.so.0     *********
    libc.so.6 => /lib64/libc.so.6


Note the '/usr/lib' in the marked lines. On my box where I can still compile kernels that work, these are '/usr/lib64', which is what I'd expect.

I do note that '/usr/lib' is a symlink to '/usr/lib64', but I don't see why it gets picked up instead of '/usr/lib64'. ANyone got any ideas?
Back to top
View user's profile Send private message
rjmx
n00b
n00b


Joined: 13 Oct 2014
Posts: 5

PostPosted: Mon Oct 27, 2014 6:32 pm    Post subject: [Solved} Reply with quote

After the last post, I checked further. Seems that the problem turned up after I'd copied over root's old .bashrc and .bash_profile files from the old Debian backup. One of these contained the following line:

LD_LIBRARY_PATH="/usr/X11R6/lib:/usr/lib:/usr/local/lib"

I don't remember why I felt the need to add that (too long ago, I guess), but when I removed it and logged in again, I built another kernel. The resulting initramfs had the libraries in /usr/lib64 as I figured they should be, and the kernel loaded cryptsetup and happily booted.

Sigh.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum