You are not logged in.

#1 2016-10-02 18:01:10

StR@ng3r
Member
Registered: 2011-11-12
Posts: 65

Full systemd boot with luks and btrfs subvolumes

(This has also been asked on reddit: https://www.reddit.com/r/archlinux/comm … _luks_and/ )

Hello archers,

I'd like to use a full systemd boot. However, for some reason I cannot get it to work.

Here is how far I get:
http://i.imgur.com/3Fou9dt.jpg

First it is almost like it is trying to mount root before decrypting the volume. Then after unlocking the luks volume, it doesn't get past the point in the picture. So I guess the first step would be to somehow tell systemd to wait mounting the root volume until it has actually been decrypted.


These are the relevant sections from my config files:

# /etc/mkinitcpio.conf

 HOOKS="systemd autodetect modconf block keyboard keymap sd-encrypt filesystems fsck" 

# /boot/loader/entries/arch.conf

 options rd.luks.uuid=9668333c... rd.luks.options=discard root=UUID=bb2ec3d1... rootflags=subvol=@ rw 

# disk setup

 /dev/nvme0n1p1
 /dev/nvme0n1p2
  - cryptroot
 /dev/nvme0n1p3
  - cryptswap 

# fstab

 # /dev/mapper/cryptroot LABEL=root
 UUID=bb2ec3d1...   /   btrfs   rw,...,subvol=@

 # /dev/mapper/cryptroot LABEL=root
 UUID=bb2ec3d1...   /home   btrfs   rw,...,subvol=@home

 # /dev/nvme0n1p1
 PARTUUID=16b11b86...   /boot   vfat   rw,relatime...

Any advice?

Last edited by StR@ng3r (2016-10-02 18:03:34)

Offline

#2 2016-10-03 10:33:20

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: Full systemd boot with luks and btrfs subvolumes

This is just a guess, based on my experience of using LVM (not used btrfs), so may be wrong.

I think your root needs to be the /dev/mapper device, and I'd use rd.luks.name instead of rd.luks.uuid (see systemd-cryptsetup-generator man page):

... rd.luks.name=9668...=cryptroot root=/dev/mapper/cryptroot ...

Offline

#3 2016-10-03 19:58:20

rdeckard
Wiki Maintainer
Registered: 2015-01-28
Posts: 137

Re: Full systemd boot with luks and btrfs subvolumes

Try this:

options luks.uuid=9668333c... luks.options=allow-discards root=/dev/mapper/luks-966833c... rootflags=subvol=@ rw 

Last edited by rdeckard (2016-10-03 20:02:28)

Offline

#4 2016-10-03 20:55:58

StR@ng3r
Member
Registered: 2011-11-12
Posts: 65

Re: Full systemd boot with luks and btrfs subvolumes

Using root=/dev/mapper/luks-UUID did the trick. Thank you!

Offline

#5 2016-10-03 21:03:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Full systemd boot with luks and btrfs subvolumes

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB