Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Dracut + crypt-gpg dm + systemd?
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
trickygnome
n00b
n00b


Joined: 17 May 2017
Posts: 19

PostPosted: Tue Feb 18, 2025 5:18 am    Post subject: [Solved] Dracut + crypt-gpg dm + systemd? Reply with quote

I use Dracut for a long time. I have encryped full root with LUKS2 and key at USB in gpg file. I use rd.luks rd.lvm parameters and crypt-gpg dm - dracutmodules.
For this I require systemd-cryptsetup module that require to install "sys-apps/systemd" package. https://wiki.gentoo.org/wiki/Dracut#List_of_modules

Gentoo now support choice:
- sys-apps/systemd: The historical udev code base was merged with systemd's in 2012, so installing any recent systemd version already provides an udev implementation. The corresponding daemon is named systemd-udevd.
- sys-apps/systemd-utils: A collection of systemd-specific split off for use with alternative init systems. It includes the udev program.

https://wiki.gentoo.org/wiki/Gentoo_without_systemd#The_udev_situation

Dracut developers says that they fully support OpenRC init system. But I can't make proper Dracut initramfs without "sys-apps/systemd" package.

Can you explain me why "sys-apps/systemd" required? Can we extract systemd-cryptsetup and place to sys-apps/systemd-utils for Dracut?
_________________
if posts > 50 then; eat(shit); fi
Shitty laptop with two cores 2.3GHz. Updating took one night per week.
I was working with powersave CPU governor for some time, but not now.


Last edited by trickygnome on Sun Feb 23, 2025 2:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 571

PostPosted: Tue Feb 18, 2025 5:37 pm    Post subject: Reply with quote

I guess systemd is used for systemd-ask-password.
Back to top
View user's profile Send private message
zen_desu
Apprentice
Apprentice


Joined: 25 Oct 2024
Posts: 157

PostPosted: Tue Feb 18, 2025 7:18 pm    Post subject: Reply with quote

If you're looking for an initramfs without systemd, ugrd is an option where "systemdless" is part of the design :P

At this point dracut is largely built around systemd stuff
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1833
Location: South America

PostPosted: Tue Feb 18, 2025 10:51 pm    Post subject: Re: Dracut + crypt-gpg dm + systemd? Reply with quote

trickygnome wrote:
For this I require systemd-cryptsetup module that require to install "sys-apps/systemd" package.

It looks to me like regular cryptsetup can be used just fine.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
trickygnome
n00b
n00b


Joined: 17 May 2017
Posts: 19

PostPosted: Sun Feb 23, 2025 2:00 pm    Post subject: Reply with quote

It was my mistake, specified wrong UUID for USB :
rd.luks.key=/luks-key.gpg:UUID=

So Dracut working with sys-apps/systemd-utils, virtual/udev for BTRFS + LUKS2 + GPG. Without kernel modules, without "add_drivers". Without systemd.
Tested for version "dracut 105"

Code:
add_dracutmodules+=" plymouth crypt-gpg dm "


detected modules at run:
Code:

bash
shell-interpreter
drm
plymouth
crypt
dm
crypt-gpg
rootfs-block
udev-rules
base
fs-lib
shutdown



sMueggli wrote:
I guess systemd is used for systemd-ask-password.

For asking password Dracut can plymouth if it is installed.
_________________
if posts > 50 then; eat(shit); fi
Shitty laptop with two cores 2.3GHz. Updating took one night per week.
I was working with powersave CPU governor for some time, but not now.
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