Re: loop-aes encrypted root on Fedora 15 using systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 3, 2011 at 10:38 AM, Jari Ruusu
<jariruusu@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Frederick Gazerblezeebe wrote:
>> /dev/loop2: [0001]:5099 (/dev/sda2) encryption=AES128 multi-key-v3
>> /dev/loop3: [0702]:2104244 (/dev/sda3) encryption=AES128 multi-key-v3
>>
>> but systemd is unable to mount it to /home as defined in fstab,
>>
>> /dev/loop3      /home      ext4    defaults        0 2    #/dev/sda3
>
> Does it work if you remove #/dev/sda3 text at the end of the line? Strict
> reading of fstab(5) man page says that lines that begin with # are comments.
> Mount program fstab parser code seems to be happy with extra stuff at end of
> line, but other fstab parser implementations are not necessarily ok with
> that.
>
Removing the comment at the end of the fstab entry had no effect;
booting is aborted leaving the system in rescue mode.  Looking at the
console output I found the following:

Starting /home aborted because a dependency failed.
systemd: job dev-loop3.device/start failed with result 'timeout'

I am investigating this right now...


>> One additional peculiarity is that although the swap is activated at
>> boot time, it is not  encrypted until I remove/add it again.  The
>> fstab entry is
>>
>> /dev/sda5       swap       swap    sw,loop=/dev/loop5,encryption=AES128   0 0
>
> That sounds like systemd is not using swapon program to enable swap. Does it
> work if you set it up with non-changing encryption keys? As in,
> build-initrd.sh sets it up, and /etc/fstab line is:
>
> /dev/loop5  swap  swap  sw  0  0
>
Changing the fstab entry per your suggestion fails to add any swap:

XXX[101]% swapon -s
Filename                                Type            Size    Used    Priority
XXX[102]% swapoff -a
XXX[103]% swapon -a
swapon: /dev/loop5: read swap header failed: Invalid argument

I then tried creating a static device node /dev/loop5 (I had to create
a static device node for /dev/loop3 (/home) before the
EXTRACOMMANDSTR1 for losetup would run), but the behavior was the
same.

I did find some error messages the syslog that are relevant:

Jun  3 13:17:49 mars systemd[1]: Unit systemd-tmpfiles-setup.service
entered failed state.
Jun  3 13:19:02 mars systemd[1]: Job dev-loop5.device/start timed out.
Jun  3 13:19:02 mars systemd[1]: Job dev-loop5.swap/start failed with
result 'dependency'.
Jun  3 13:19:02 mars systemd[1]: Job dev-loop5.device/start failed
with result 'timeout'.

I'm looking in the systemd scripts right now to see if I can track
down the source of this error.  Unfortunately, a number of these
'scripts' are actually binaries and therefore essentially blackboxes
to me.  I'm hoping that the problem resides in one of the actual
scripts...

FG
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux