Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Possibly outdated documentation: dracut, systemd-cryptsetup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 57

PostPosted: Sat Aug 10, 2024 2:19 pm    Post subject: Possibly outdated documentation: dracut, systemd-cryptsetup Reply with quote

The Gentoo handbook https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel suggests using dracut with generating initramfs, and I followed https://wiki.gentoo.org/wiki/Dracut to configure the list of dracut modules to use. However, it listed systemd-cryptsetup, which depends on a package sys-fs/systemd which does not exist now. I'm using both systemd and cryptsetup, and I wonder do I need it?

Thanks!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Sat Aug 10, 2024 3:17 pm    Post subject: Reply with quote

That appears to be a typographic error in the documentation. systemd is sys-apps/systemd, not sys-fs/systemd. I think systemd has always been in sys-apps, so this is likely just that someone copied an adjoining line and failed to fully edit it.
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 57

PostPosted: Sat Aug 10, 2024 3:44 pm    Post subject: Reply with quote

Hu wrote:
That appears to be a typographic error in the documentation. systemd is sys-apps/systemd, not sys-fs/systemd. I think systemd has always been in sys-apps, so this is likely just that someone copied an adjoining line and failed to fully edit it.


Thanks for helping!
I've already had systemd installed, however this module is not showing up.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Sat Aug 10, 2024 3:57 pm    Post subject: Reply with quote

What error are you seeing? Does your use of cryptsetup require that it be run in the initramfs, or are you only using it for drives unlocked after the init system starts?
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 57

PostPosted: Sat Aug 10, 2024 4:04 pm    Post subject: Reply with quote

Hu wrote:
What error are you seeing? Does your use of cryptsetup require that it be run in the initramfs, or are you only using it for drives unlocked after the init system starts?


When running
Code:
make install
on linux kernel, I saw 'module not found' error when running dracut.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3687
Location: Rasi, Finland

PostPosted: Sat Aug 10, 2024 4:28 pm    Post subject: Reply with quote

AprilGrimoire wrote:
When running
Code:
make install
on linux kernel, I saw 'module not found' error when running dracut.
Please provide more of the log. Or even better; use wgetpaste and paste the url to the whole output.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 57

PostPosted: Sun Aug 11, 2024 8:15 pm    Post subject: Reply with quote

Zucca wrote:
AprilGrimoire wrote:
When running
Code:
make install
on linux kernel, I saw 'module not found' error when running dracut.
Please provide more of the log. Or even better; use wgetpaste and paste the url to the whole output.


Sorry.

Code:

(base) april@AprilGrimoire-Mechrevo /usr/src/linux-6.6.38-gentoo $ doas dracut --add systemd-cryptsetup /tmp/test.img 6.6.38-gentoo
dracut[I]: Executing: /usr/bin/dracut --add systemd-cryptsetup /tmp/test.img 6.6.38-gentoo
dracut[E]: Module 'systemd-cryptsetup' cannot be found.


Now I've managed to make it work (barely) by removing the systemd-cryptsetup module. crypt alone seems working, however the ask for passphrase prompt is usually flooded by many lines of log at boot-time.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sun Aug 11, 2024 10:42 pm    Post subject: Reply with quote

Do you have sys-fs/cryptsetup installed? From the output of installing dracut there is this:
Code:
Install additional packages for optional runtime features:
  sys-fs/cryptsetup[-static-libs] for Decrypt devices encrypted with cryptsetup/LUKS
(other listed packages excluded for brevity)
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Sun Aug 11, 2024 11:09 pm    Post subject: Reply with quote

AprilGrimoire wrote:
however the ask for passphrase prompt is usually flooded by many lines of log at boot-time.
This is normal. The kernel usually does not complete all setup for all devices before the cryptsetup prompt is printed, so some kernel messages are displayed afterward. This has no effect on cryptsetup, and you can enter your password normally.
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 57

PostPosted: Mon Aug 12, 2024 4:59 am    Post subject: Reply with quote

pjp wrote:
Do you have sys-fs/cryptsetup installed? From the output of installing dracut there is this:
Code:
Install additional packages for optional runtime features:
  sys-fs/cryptsetup[-static-libs] for Decrypt devices encrypted with cryptsetup/LUKS
(other listed packages excluded for brevity)


Thank you!

cryptsetup is installed, otherwise I wouldn't be able to boot.

Code:

(base) april@AprilGrimoire-Mechrevo ~ $ eix cryptsetup
[I] sys-fs/cryptsetup
     Available versions:  2.6.1(0/12)^t 2.7.2(0/12)^t ~2.7.3(0/12)^t {+argon2 fips gcrypt kernel nettle nls +openssl pwquality ssh static static-libs test +udev urandom}
     Installed versions:  2.7.2(0/12)^t(05:23:25 AM 08/10/2024)(argon2 nls openssl udev -fips -gcrypt -kernel -nettle -pwquality -ssh -static -static-libs -test -urandom)
     Homepage:            https://gitlab.com/cryptsetup/cryptsetup
     Description:         Tool to setup encrypted devices with dm-crypt
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 57

PostPosted: Mon Aug 12, 2024 5:01 am    Post subject: Reply with quote

Hu wrote:
AprilGrimoire wrote:
however the ask for passphrase prompt is usually flooded by many lines of log at boot-time.
This is normal. The kernel usually does not complete all setup for all devices before the cryptsetup prompt is printed, so some kernel messages are displayed afterward. This has no effect on cryptsetup, and you can enter your password normally.


Thank you! However it looks confusing, and gives me no indication of whether I could start typing the passphrase. How can I make the passphrase prompt persistent, for example on the bottom of the screen?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Mon Aug 12, 2024 1:43 pm    Post subject: Reply with quote

The passphrase prompt should be printed when cryptsetup is ready. However, nothing prevents the kernel from printing more messages after the prompt, and the prompt will not be reprinted. You could look upward in the output to check for the prompt. You could change the kernel's verbosity to a quieter setting before printing the prompt. You could add an artificial delay before printing the prompt, to give the kernel more time to finish device probes. Personally, I only get a dozen or so lines of post-prompt output, which isn't enough to scroll the prompt out, so I just live with not having the prompt at the bottom.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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