[arch-general] Systemd with encrypted Btrfs

Aurko Roy roy.aurko at gmail.com
Tue Jul 24 06:10:50 EDT 2012


Hi,
    Thanks for the quick reply. I wasn't aware of the changes in
crypttab syntax with systemd; but changing it the way you described it
did the trick for swap.

You're right, on digging deeper (logs) I found that the fsck had
failed earlier as well but I never noticed it as the boot process
wasn't interrupted. I didn't face it again after setting passno. to 0.
I had heard about btrfs being released without a proper fsck in place
but I thought that was long ago and that btrfsck was ready for general
use.

Rodrigo: I already solved it, but thanks for your reply anyway.

-aurko

On Tue, Jul 24, 2012 at 3:09 PM, Tom Gundersen <teg at jklm.no> wrote:
> On Tue, Jul 24, 2012 at 10:58 AM, Aurko Roy <roy.aurko at gmail.com> wrote:
>> 1. I have an encrypted swap that randomly generates a new passphrase
>> everytime I reboot, but systemd asks me for a  passphrase every time I
>> boot. On pressing enter or entering any random characters it proceeds
>> normally.  This is more of an annoyance than a real problem.
>
> Note that systemd does not support Arch's traditional crypttab syntax,
> so you might need to adjust your crypttab file. The format is
> described in "man crypttab". I have a similar setup to what you
> describe and my crypttab line is:
>
> # cat /etc/crypttab
> swap    /dev/sda2       /dev/urandom    swap
>
>> 2. I have an encrypted btrfs partition which it unlocks normally, but
>> while trying to mount says:
>> "fsck: fsck.btrfs: not found
>> fsck: Error 2 while executing fsck.btrfs for /dev/mapper/myvolume" and
>> this stops the whole boot process. I have to disable that partition on
>> fstab to get systemd to boot properly. Once the boot process is
>> complete, I can see that the decryption has proceeded normally (from
>> systemctl -a) and can remount it normally in a manual fashion. I
>> initially thought that creating fsck.btrfs as a symlink to btrfsck
>> might do the job, but that doesn't work either.
>
> There is no fsck.btrfs binary yet, and btrfsck does not support the
> expected interface. Until a proper fsck.btrfs exists you should mark
> your partition as not wanting to be fsck'ed in fstab (i.e. set passno,
> the last argument, to 0).
>
>> Does anybody have any experience successfully mounting (encrypted or
>> not) btrfs partitions using systemd?
>
> I would have thought you'd get a similar failure also with
> initscripts? Though in that case boot would not pause.
>
> -t


More information about the arch-general mailing list