View previous topic :: View next topic |
Author |
Message |
catfish52 n00b
Joined: 25 Jun 2005 Posts: 8
|
Posted: Tue Feb 13, 2007 12:08 am Post subject: cryptsetup-luks - failed ... |
|
|
Hi,
I just followed hnaparsts howto to encrypt my swap dev.
> https://forums.gentoo.org/viewtopic-t-425423-highlight-cryptfs.html
I recompiled the kernel with all the necessary options and added:
swap=crypt-swap
source='/dev/sda3'
to /etc/conf.d/cryptfs.
Now I get this when i restart the box....
* Setting up dm-crypt mappings ...
* dm-crypt map crypt-swap ...
* cryptsetup will be called with : -c aes -h sha1 -d /dev/urandom luksOpen /dev/sda3 crypt-swap
Warning: exhausting read requested, but key file is not a regular file, function might never return.
What did I'm wrong ? Im using kernel 2.6.18 and luks 1.0.4-r1 |
|
Back to top |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue Feb 13, 2007 8:02 am Post subject: |
|
|
Maybe an options line should be added. I'm using this: Code: | swap=swap
source='/dev/hda2'
options='-c blowfish-cbc-essiv:sha256 -s 256 -d /dev/urandom' | ...and it works.
Good luck! |
|
Back to top |
|
|
catfish52 n00b
Joined: 25 Jun 2005 Posts: 8
|
Posted: Tue Feb 13, 2007 11:55 am Post subject: |
|
|
I added the option line and got the same error again.
the strange thing is, that i can create, open and mount crypted partitions by hand, but it fails when I want to start it through init...
should I go back to cryptsetup-luks 1.03 ? which version do you use ?
many thanks in advance !! |
|
Back to top |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue Feb 13, 2007 12:10 pm Post subject: |
|
|
There are a lot of bugs with this package (check bugzilla)...
I'm using cryptsetup-luks-1.0.4-r1 init, but replaced /sbin/cryptsetup with a static binary from http://luks.endorphin.org/dm-crypt myself... (so that's the 1.0.3 version) all because of this bug: https://bugs.gentoo.org/show_bug.cgi?id=144687. I need the 448 key size.
Did you run "revdep-rebuild -p" already... maybe some packages need to be rebuild against a new version of something. |
|
Back to top |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue Feb 13, 2007 12:18 pm Post subject: |
|
|
...there was a change in config recently....
/usr/portage/sys-fs/cryptsetup-luks/cryptsetup-luks-1.0.4-r1.ebuild:
Quote: | pkg_postinst() {
ewarn "This ebuild introduces a new set of scripts and configuration"
ewarn "then the previous system. If you are currently using /etc/conf.d/crypfs"
ewarn "then you *MUST* read the new /etc/conf.d/cryptfs for instructions"
ewarn "on how to convert your previous cryptfs to the new syntax or your"
ewarn "encrypted partitions will *NOT* work."
einfo
einfo "Please see the example for configuring a LUKS mountpoint"
einfo "in /etc/conf.d/cryptfs"
einfo
} |
|
|
Back to top |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue Feb 13, 2007 1:48 pm Post subject: Re: cryptsetup-luks - failed ... |
|
|
catfish52 wrote: | ...
* cryptsetup will be called with : -c aes -h sha1 -d /dev/urandom luksOpen /dev/sda3 crypt-swap
Warning: exhausting read requested, but key file is not a regular file, function might never return.
|
I think the "luks" extention shouldn't be used for swap anyway...
boot.msg:
Code: | * Setting up dm-crypt mappings ...
* dm-crypt map swap ...
* cryptsetup will be called with : -c blowfish-cbc-essiv:sha256 -s 256 -d /dev/urandom create swap /dev/hda2
[ ok ]
* Running pre_mount commands for swap ...
[ ok ] |
|
|
Back to top |
|
|
catfish52 n00b
Joined: 25 Jun 2005 Posts: 8
|
Posted: Tue Feb 13, 2007 2:14 pm Post subject: |
|
|
I`m at work... will check your suggestions when I'm at back home....
thanks for your quick feedback !!! |
|
Back to top |
|
|
Trois Six n00b
Joined: 20 Feb 2007 Posts: 1
|
Posted: Tue Feb 20, 2007 8:38 pm Post subject: |
|
|
Hi,
After an upgrade, I had exactly the same problem even if I followed the "readme" inside the file /etc/conf.d/cryptfs
I finally succeeded to crypt my swap with de following parameters in /etc/conf.d/cryptfs :
Code: | swap=crypt-swap
source='/dev/hda1' |
I needed to patch the file /lib/rcscripts/addons/dm-crypt-start.sh :
I changed
Code: | cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="$source"; arg3="$target"; luks=1; } |
in dm-crypt-execute-checkfs()
to
Code: | if [ ! -n "$swap" ]; then
cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="$source"; arg3="$target"; luks=1; }
fi |
|
|
Back to top |
|
|
|