Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cryptsetup not found while booting in initrd after update
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
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 110
Location: Dortmund

PostPosted: Mon Jul 17, 2017 7:04 pm    Post subject: cryptsetup not found while booting in initrd after update Reply with quote

I cant boot my system anymore. I updated my system a few days ago. I needed to recompile my kernel today to add a driver and now I got an error /sbin/cryptsetup not found while booting.
Code:
!! lvm failed to run, cannot activate logical volumes!
!! /sbin/cryptsetup not found inside the initramfs

I use since one year the same commands and genkernel-next:
Code:
genkernel --menuconfig --luks --lvm --makeopts='-j10' all

and after that
Code:
grub-mkconfig -o /boot/grub/grub.cfg


I also recompiled cryptsetup with
Code:
USE="static" emerge -av gnupg cryptsetup

No change, always the same error.
I use the actual kernel linux-4.9.34-gentoo
Code:
* Gentoo Linux Genkernel; Version 65
* Running with options: --menuconfig --luks --lvm --makeopts=-j10 all

* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

* Linux Kernel 4.9.34-gentoo for x86_64...
* .. with config file /etc/kernels/kernel-config-x86_64-4.9.34-gentoo
* kernel: Using config from /etc/kernels/kernel-config-x86_64-4.9.34-gentoo
*         Previous config backed up to .config--2017-07-17--20-52-22.bak
* kernel: >> Running mrproper...
*         >> Running oldconfig...
* kernel: >> Cleaning...
* kernel: >> Invoking menuconfig...
*         >> Compiling 4.9.34-gentoo bzImage...
*         >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)...
*         >> Compiling 4.9.34-gentoo modules...
*         >> Generating module dependency data...
* Copying config for successful build to /etc/kernels/kernel-config-x86_64-4.9.34-gentoo
* busybox: >> Using cache
* initramfs: >> Initializing...
*         >> Appending base_layout cpio data...
*         >> Appending udev cpio data...
cp: der Aufruf von stat für '/etc/modprobe.d/blacklist.conf' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
* cannot copy /etc/modprobe.d/blacklist.conf from udev
Traceback (most recent call last):
  File "/usr/bin/lddtree", line 52, in <module>
    from elftools.elf.elffile import ELFFile
ImportError: No module named 'elftools'
*         >> Appending auxilary cpio data...
*         >> Copying keymaps
*         >> Appending busybox cpio data...
*         >> Appending lvm cpio data...
* LVM: Adding support (copying binaries from system)...
Traceback (most recent call last):
  File "/usr/bin/lddtree", line 52, in <module>
    from elftools.elf.elffile import ELFFile
ImportError: No module named 'elftools'
*         >> Appending luks cpio data...
* Including LUKS support
Traceback (most recent call last):
  File "/usr/bin/lddtree", line 52, in <module>
    from elftools.elf.elffile import ELFFile
ImportError: No module named 'elftools'
*         >> Appending modules cpio data...
*         >> Appending blkid cpio data...
Traceback (most recent call last):
  File "/usr/bin/lddtree", line 52, in <module>
    from elftools.elf.elffile import ELFFile
ImportError: No module named 'elftools'
*         >> Appending ld_so_conf cpio data...
* ldconfig: adding /sbin/ldconfig...
Traceback (most recent call last):
  File "/usr/bin/lddtree", line 52, in <module>
    from elftools.elf.elffile import ELFFile
ImportError: No module named 'elftools'
* ld.so.conf: adding /etc/ld.so.conf{.d/*,}...
cpio: lib64 nicht erzeugt: Neuere oder gleich alte Version existiert schon
cpio: lib64 nicht erzeugt: Neuere oder gleich alte Version existiert schon
*         >> Finalizing cpio...
*         >> Compressing cpio data (.xz)...
*
* Kernel compiled successfully!
*
* Required Kernel Parameters:
*     root=/dev/$ROOT
*
*     Where $ROOT is the device node for your root partition as the
*     one specified in /etc/fstab
*
* If you require Genkernel's hardware detection features; you MUST
* tell your bootloader to use the provided INITRAMFS file.

* WARNING... WARNING... WARNING...
* Additional kernel cmdline arguments that *may* be required to boot properly...
* add "dolvm" for lvm support
* With support for several ext* filesystems available, it may be needed to
* add "rootfstype=ext3" or "rootfstype=ext4" to the list of boot parameters.

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.


Any ideas how to fix this?
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 110
Location: Dortmund

PostPosted: Mon Jul 17, 2017 10:54 pm    Post subject: Reply with quote

After reemerge busybox and an additional update, rebuilding the kernel, the cryptsetup binary is already in the initrd. I checked it with:
Code:
mkdir /tmp/initramfs
cd /tmp/initramfs
xzcat  /boot/initramfs-genkernel-x86_64-4.9.34-gentoo | cpio -idmv
ls -l sbin/cryptsetup
-rwxr-xr-x 1 root root 63360 17. Jul 22:27 sbin/cryptsetup


very strange
Back to top
View user's profile Send private message
mimosinnet
l33t
l33t


Joined: 10 Aug 2006
Posts: 663
Location: Barcelona, Spain

PostPosted: Sun Oct 28, 2018 7:00 pm    Post subject: Reply with quote

bookwood wrote:
I checked it with...


Thanks for the detailed instructions! They have been very helpful and I have included them in the genkernel article on the Gentoo wiki.

Cheers!
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts.
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