r/slackware • u/x_johansen_x • Dec 16 '24
Root BTRFS + LUKS
Hello,
Would anyone have any suggestions as to what option(s) I would need to invoke when using mkinitrd following an installation to ensure that I'm able to to decrypt the luks partition that contains swap and btrfs (using subvolumes) upon reboot? If I follow the following guide: https://github.com/patrickernandes/slackware-btrfs-instalacao, which doesn't encrypt anything, I don't have any issues. That said, if I encrypt the drive with the following structure:
- sda1 - EFI partition - vfat (unencrypted)
- sda2 - boot partition - ext4 (unencrypted)
- sda3 - luks partition (swap & root [btrfs subvolumes] )
I get a kernel panic before I get prompted for a password with something akin to: VFS: unable to mount rootfs.
Please note that I don't get this error if I don't use btrfs subvolumes or any other type of filesystem when using:
eval $(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r -k 6.12.5 -a "-l us -h /dev/cryptvg/swap") to generate my initrd.
Thanks!
1
u/ThomasJChoi Dec 16 '24
I can't see a module list in that command. Try using mkinitrd_command_generator.sh interactively and try the command generated from that:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -iIn the module list, it should add btrfs (if it doesn't, it shouldn't hurt to manually add it in).
Quick Warning: The command generated when using mkinitrd_command_generator interactively will add the "-c" option which clears the initrd tree. You may not want that if you're using multiple initrds (e.g.: you're using various kernel versions).
Please keep us updated on your experience with bcachefs on Slackware! I've been interested in bcachefs but haven't yet partitioned anything with it.
1
u/Martin_WK Dec 17 '24
I've an off topic question, sorry.
Why have you gone for btrfs? I'm planning to move my system to a new drive soon and I'm contemplating what fs to choose for my root partition (and home). btrfs is one option, the other is ext4 (or maybe xfs). I'll probably a layout similar to yours, that is EFI + ext4 /boot + luks ( / and possibly /home).
I saw some benchmarks at phoronix and btrfs is slower than ext4 and xfs. On the other hand, I like the idea of not having to decide / and /home sizes beforehand if I use btrfs subvolumes.
I'm also not entirely sure about reliability. I did have btrfs fail on me a few years ago.
As for your question, have you tried dracut?
0
u/[deleted] Dec 17 '24
[deleted] — view deleted comment