Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dracut mounting wrong btrfs subvolume to /sysroot
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
rogerroger
n00b
n00b


Joined: 24 May 2023
Posts: 2

PostPosted: Thu May 25, 2023 12:22 pm    Post subject: Dracut mounting wrong btrfs subvolume to /sysroot Reply with quote

Installed Gentoo with systemd and distkernel bin recently and tried to make a single efi file with dracut.

Used the following command to create the efi executable
Code:

nebula / # time for kver in /lib/modules/*; do dracut -f --uefi --kver "${kver##*/}"; done


My dracut config look as follows

Code:

❯ cat etc/dracut.conf.d/flags.conf
kernel_cmdline="rootflags=subvol=@gentoo"
compress="lz4"


System is installed on nvme0n1p3 LUKS encrypted volume.

On booting it successfully detects my root partition and asks for the passphrase, correctly unlocks it as /dev/mapper/root, and somewhat correctly mounts that to /sysroot (missing the correct subvolume).
So instead of the Gentoo filesystem being present at /sysroot it's the subvolumes I've created and dracut panics.

So far I've tried adding different kernel parameters such as rd.luks.name, cryptdevice or root but nothing made a difference.

pastebin of rdosreport

Any help is much appreciated.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri May 26, 2023 10:59 am    Post subject: Reply with quote

Welcome to Gentoo Forums!

Do you use grub also?
If you do plz have
Code:

GRUB_CMDLINE_LINUX="cryptdevice=UUID=xxxxxxxxxxxxxxx:root root=/dev/mapper/root rootflags=subvolume=@gentoo rootfstype=btrfs"

Secondly edit
Code:

/etc/crypttab---->>>>

root   UUID=xxxxxxxxxxxxxxxxx  none  initramfs,luks

Then
Code:

rc-update add dmcrypt boot

Remove
Code:

kernel_cmdline="rootflags=subvol=@gentoo"

from flags.conf
Then update grub and initramfs.
_________________
:)
Back to top
View user's profile Send private message
rogerroger
n00b
n00b


Joined: 24 May 2023
Posts: 2

PostPosted: Fri May 26, 2023 2:47 pm    Post subject: Reply with quote

I don't use GRUB. I wanted to make use of GPT partition automounting which GRUB doesn't support.

I added the additional cmdline options, however none of them should be necessary as automounting takes care of that.
Booting with the new parameters didn't make a difference.

Since I'm trying to unlock my encrypted root partition I need to unlock it in early userspace and not late userspace /etc/crypttab should get ignored (if I understood Dm-crypt correctly). But the root partition gets properly unlocked so it shouldn't matter anyway.

Lastly I'm running systemd, so there's no dmcrypt module I could enable for open-rc. I think the systemd equivalent is systemd-cryptsetup, which can't be used for the root volume.

I have Archlinux installed on a separate btrfs subvolume (/@), and the dracut image arch generates works. Comparing the logs nothing stood out to me that could cause this issue.

Archlinux log
Gentoo log
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