Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[not using it any more]Dracut ignoring options
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
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Wed Jul 17, 2024 1:18 pm    Post subject: [not using it any more]Dracut ignoring options Reply with quote

Like every kernel update I get a non working initrd
First problem:
Code:
# dracut --force -kver 6.6.35-gentoo-dist --hostonly
dracut[F]: The provided directory where to look for kernel modules (ver)
dracut[F]: does not match the kernel version set for the initramfs (6.6.13-gentoo-dist).
dracut[F]: Set DRACUT_KMODDIR_OVERRIDE=1 to ignore this check.

I can fix that by setting versions directly via arguments
Code:
dracut --force -kver 6.6.35-gentoo-dist --hostonly /boot/initramfs-6.6.35-gentoo-dist.img 6.6.35-gentoo-dist

But my config is still more or less fully ignored:
Code:
cat /etc/dracut.conf.d/myflags.conf
add_dracutmodules+=" crypt dm btrfs busybox "
install_items+=" /etc/crypttab /etc/conf.d/dmcrypt /etc/init.d/dmcrypt /boot/key.gpg "
compress=xz

While it adheres the compression (and changes it, when I change it to gzip). Neither is it including the busybox module nor the 4 files needed for decrypting my root partition.
It also moves all the binaries to /usr/bin like Red Hat does. But keeps the systemd-udevd linking to /bin/udevadm. – Don't know if that is a problem with OpenRC.
Any ideas? Or has anybody an init-system that just works?


Last edited by wanne32 on Thu Jul 18, 2024 4:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1910

PostPosted: Wed Jul 17, 2024 1:42 pm    Post subject: Reply with quote

Use --kver not -kver

Edit: /etc/conf.d/dmcrypt /etc/init.d/dmcrypt are likely being included (check with lsinitrd command), but won't be used as dracut doesn't know to look for this. It does not use OpenRC at all.
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 429
Location: Nijmegen

PostPosted: Wed Jul 17, 2024 2:50 pm    Post subject: Reply with quote

Use --verbose and then dracut will tell you why it is ignoring those options.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Wed Jul 17, 2024 3:11 pm    Post subject: Reply with quote

grknight wrote:
Use --kver not -kver

Sorry. This was my fault.

grknight wrote:
Edit: /etc/conf.d/dmcrypt /etc/init.d/dmcrypt are likely being included (check with lsinitrd command), but won't be used as dracut doesn't know to look for this. It does not use OpenRC at all.
No. It is not included. In looked into it with lsinitrd. Otherwise I would never had the idea that dracut just silently ignores options.
The more important stuff is /etc/crypttab since it is used by dracut-crypt-lib.sh

I am also not happy at all, that it now leaks my root passwords via /etc/shadows even so the /etc/shadow is not used in /etc/passwd.
It also includes no two confs in /etc/cmdline.d/: 90crypt.conf 95root-dev.conf witch don't seem wrong but include the swap partitions which are not needed since linux broke hibernate with its lockdown "feature" anyway.
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Wed Jul 17, 2024 3:39 pm    Post subject: Reply with quote

https://homeserv.balja.org/index.php/s/zfQaq8fKmmrbMSd
So busybox is included. Just not listed in lib/dracut/modules.txt
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Wed Jul 17, 2024 4:51 pm    Post subject: Reply with quote

Btw: any alternatives to dracut in gentoo? I don't see initramfs-tools. Genkernel seems for self compiled kernels only?
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 429
Location: Nijmegen

PostPosted: Wed Jul 17, 2024 5:08 pm    Post subject: Reply with quote

wanne32 wrote:
Btw: any alternatives to dracut in gentoo? I don't see initramfs-tools. Genkernel seems for self compiled kernels only?


UGRD, merged it in the day before yesterday, not sure if it will do everything you want it to do though, its still very fresh.

Genkernels initramfs can indeed only be used with genkernels kernels. Genkernel is slowly being replaced with distribution kernels though, so I don't recommend switching to that.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Thu Jul 18, 2024 4:29 pm    Post subject: Reply with quote

I do not like to use GURU and masked packages. Documentation is also a bit spase.
On the other hand: ugrd just works and has all the features I ever wanted. Detects btrfs devices correctly, works with gpg, adheres keyfiles. No manual tinkering. All I had to do was specifying the LUKS UUIDs which it wasn't able to detect automatically. Have to figure out a few minor details like autogenerating on kernel updates, generating matching grub entries and keyboard layouts.
But for the time I invested in debuging dracut I can generate/move them manually for the next 500 years.
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 429
Location: Nijmegen

PostPosted: Thu Jul 18, 2024 5:03 pm    Post subject: Reply with quote

Quote:
I do not like to use GURU and masked packages.


It's neither in ::guru, nor masked. As I said, I merged it into ::gentoo this week.

Quote:
Have to figure out a few minor details like autogenerating on kernel updates, generating matching grub entries


Simply enable the "grub" and "ugrd" flags for sys-kernel/installkernel.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Thu Jul 18, 2024 6:23 pm    Post subject: Reply with quote

Quote:
It's neither in ::guru
Uh, they write that on github...

Quote:
Simply enable the "grub" and "ugrd" flags for sys-kernel/installkernel.
Ah cool.
Btw: Why:
Code:
equery u sys-kernel/installkernel
U I
 + + dracut       : Generate an initramfs or UKI on each kernel installation
 + + grub         : Re-generate grub.cfg on each kernel installation, used grub.cfg is overridable with GRUB_CFG env var
 - - refind       : Install a Gentoo icon for rEFInd alongside the (unified) kernel image, used icon is overridable with REFIND_ICON env var
 - - systemd      : Use systemd's kernel-install to install kernels, overridable with SYSTEMD_KERNEL_INSTALL env var
 - - systemd-boot : Use systemd-boot's native layout by default
 - - uki          : Install UKIs to ESP/EFI/Linux for EFI stub booting and/or bootloaders with support for auto-discovering UKIs
 - - ukify        : Build an UKI with systemd's ukify on each kernel installation

vs.
Code:
equery h ugrd
 * Searching for USE flag ugrd ...
[IP-] [  ] sys-kernel/installkernel-39-r2:0
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 429
Location: Nijmegen

PostPosted: Thu Jul 18, 2024 6:59 pm    Post subject: Reply with quote

Quote:
Uh, they write that on github...


That still needs updating after the move.

Quote:

Ah cool.
Btw: Why:


Because it's a new package and therefore does not have stable keywords yet. Therefore the "ugrd" flag is stable masked. So to enable the flag you'd need to accept testing keywords for both sys-kernel/installkernel and sys-kernel/ugrd.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Thu Jul 18, 2024 7:10 pm    Post subject: Reply with quote

Thx.
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