Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

cryptsetup should bring in dmcrypt but it doesn't

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

cryptsetup should bring in dmcrypt but it doesn't

  • Quote

Post by wynnmc » Thu May 15, 2025 11:02 am

As far as I can see, installing cryptsetup should install /etc/init.d/dmcrypt and /etc/conf.d/dmcrypt but on the machine I have just installed Gentoo on, it doesn't. On the other working machine with Gentoo installed it does.

Why?
Top
grknight
Retired Dev
Retired Dev
Posts: 2565
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Thu May 15, 2025 12:17 pm

Please show emerge --info and qlist -e cryptsetup |grep -e init.d -e conf.d from that machine
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Thu May 15, 2025 1:07 pm

Thank you.

Here is emerge -info:

Code: Select all

Portage 3.0.67 (python 3.13.3-final-0, default/linux/amd64/23.0, gcc-14, glibc-2.40-r8, 6.12.25-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.12.25-gentoo-dist-x86_64-Intel-R-_Core-TM-_i5-8365U_CPU_@_1.60GHz-with-glibc2.40
KiB Mem:    15977716 total,  15530840 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Wed, 14 May 2025 00:45:00 +0000
Head commit of repository gentoo: e926507d0e831a090d04b9cb56d4bd77d7dbfe56
sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.31.5::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.0::gentoo
dev-lang/perl:             5.40.2::gentoo
dev-lang/python:           3.13.3::gentoo
dev-lang/rust-bin:         1.85.1::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.56::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.12::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r8::gentoo
Repositories:
gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE CC-BY-ND-3.0 @FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8 -l9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="VIDEO_CARDS:intel acl amd64 bzip2 cet crypt dist-kernel gdbm iconv ipv6 libtirpc multilib ncurses nls openmp pam pcre readline seccomp ssl test-rust unicode xattr zlib" ABI_X86="64" ADA_TARGET="gcc_14" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_13" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
I hope this doesn't go over the 64K limit.
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Thu May 15, 2025 1:08 pm

Code: Select all

qlist -e cryptsetup |grep -e init.d -e conf.d
produced no output.
Top
grknight
Retired Dev
Retired Dev
Posts: 2565
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Thu May 15, 2025 1:19 pm

Also, what does emerge -pv sys-fs/cryptsetup say?
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Thu May 15, 2025 1:36 pm

I think the problem has come from the fact that cryptsetup was emerged while running under the installation iso. I have booted up with that and, of course, both

Code: Select all

/etc/conf.d/dmcrypt
and

Code: Select all

/etc/init.d/dmcrypt
were there. I have copied them across.

Thank you for your help,

wynnmc
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Thu May 15, 2025 2:04 pm

No, that shouldn't matter. If you booted the installation media, but then chroot'd into your system's drive, then emerge would write to your drive, and you would have those files. If you booted the installation media and managed to emerge onto its storage, then none of those changes would have persisted into your system, and you wouldn't have the cryptsetup program.
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Thu May 15, 2025 2:11 pm

Well, in another thread, I have found out how to get wifi working and I have emerged cryptsetup again and this time

Code: Select all

/etc/conf.d/dmcrypt
and

Code: Select all

/etc/init.d/dmcrypt
are there and the dates show that they have come from this emerge and are not the ones I copied across...
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Thu May 15, 2025 4:33 pm

I don't know if this should go in a new thread but I have now altered /etc/conf.d/dmcrypt to open the encrypted home partition asking for the passphrase as it does on the old machine. I have made these changes

Code: Select all

## /home with passphrase
target=home
source='/dev/nvme0n1p4'
but it doesn't ask for the passphrase during boot and the partition doesn't get luksOpen'd

Can anybody suggest what I can do to try and find out why?

wynnmc
Top
grknight
Retired Dev
Retired Dev
Posts: 2565
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Thu May 15, 2025 5:11 pm

Did you do rc-update add dmcrypt boot while inside the chroot or booted into the installation?
Also does /sbin/cryptsetup or /usr/bin/cryptsetup exist?

With OpenRC, you can turn on logging in /etc/rc.conf such that the file can be read and reviewed to debug this kind of thing
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Fri May 16, 2025 8:08 am

Thank you, grknight, I think that could be the problem ... part of what I now see as a wider problem: I started out with the idea of installing an encrypted root but had problems and changed to another idea which, on reflection, I saw wouldn't work, and finally decided to have the same layout as on this machine. I think it likely that, with these changes to what I was doing, I could have done something in the wrong way.

I have decided that the only way out of this mess (of my own doing, of course) is to wipe storage and start at the beginning again.

So, you may see me here next as :D or perhaps :( again...

Thank you for all your help,

wynnmc
Top
wynnmc
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Sun Dec 01, 2019 5:26 pm

  • Quote

Post by wynnmc » Fri May 16, 2025 4:53 pm

I have just successfully installed Gentoo on the new machine. I made sure that dmcrypt was started at boot and home, which is encrypted, is successfully decrypted during boot with the appropriate changes to /etc/conf.d/dmcrypt.conf -- I also have encrypted swap.

I have got here with your help, Neddy Seagoon, grknight and others -- my very grateful thanks.

I started with the idea of installing it with encrypted root but dodging between the page describing the changes necessary to the Handbook to do this and the Handbook page became onerous and I changed to the same layout as on this machine.

Thank you all for your help,

wynnmc
Top
Post Reply

12 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic