Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dm-crypt with LUKS - Some questions about the tutorial
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Thu Mar 18, 2010 9:33 pm    Post subject: dm-crypt with LUKS - Some questions about the tutorial Reply with quote

Hi,

i'm on the way to switch from truecrypt to dm-crypt with luks for some reasons.

I found this great tutorial, but i've 2 problems:


- http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS#Decrypting.2FEncrypting_partitions_at_startup

There are some options given for the swap partion. If I put that line to my /etc/conf.d/dmcrypt i'm getting the message that those options are unknown and the line will be ignored. The swap partion is mounted, i guess with some default options. In the default /etc/conf.d/dmcrypt is the comment
Code:

# options='<opts>'                   == cryptsetup, for LUKS you can only use --readonly

Is that right? For luks there are no other options then --readonly? Is the tutorial outdated?


- mdadm - raid1
I've a raid1 with 2 discs. Booting without the "initramfs" from the tutorial everything is ok. When booting with the initramfs (and the init-file from here, as it is mentioned in the tutorial) the raid isn't working anymore. The second disc is not in the raid-array anymore after booting. I can add it with
Code:
mdadm /dev/md0 --add /dev/sdd1

but then the raid has to resync. I've to do that after each boot, so this is no option :/
Any ideas?

Edit: dmesg says about that md thing:

Code:

1591-[    6.729953] md: md0 stopped.
1592-[    6.735250] md: bind<sdc1>
1593:[    6.737098] raid1: raid set md0 active with 1 out of 2 mirrors
1594-[    6.737136] md0: detected capacity change from 0 to 500105150464
1595-[    6.737337] mdadm used greatest stack depth: 3960 bytes left
1596-[    6.739266]  md0: unknown partition table

Btw: The fs at that raid is truecrypt encrypted, but that works fine without that initramfs. The second disc should be /dev/sdd1.


Thanks a lot for your help!


Regards,
fame
Back to top
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Thu Mar 18, 2010 9:57 pm    Post subject: Reply with quote

For the second problem i found the reason:

http://en.gentoo-wiki.com/wiki/Initramfs#Software_RAID


I've copied my mdadm.conf and the mdadm binary to the initramfs. Then i've added the
Code:
mdadm --assemble --scan /dev/md0

line somewhere in the "init" file, but i dont know where to add. It didn't worked btw :)
Back to top
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Fri Mar 19, 2010 8:18 am    Post subject: Reply with quote

The second problem is gone now.

I've added

Code:
busybox raidautorun /dev/md0


to the init-file from the initramfs (just put it somewhere at the end^^).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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