LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-06-2007, 08:25 AM   #1
SlackN00b
Member
 
Registered: Dec 2003
Distribution: Slackware 9.1
Posts: 44

Rep: Reputation: 15
cryptsetup error (Command failed: Invalid argument)


Hi, I think I've read any existing faq and guide on dm-crypt so I think I'm helpless,but I try to expose my problem anyway.

I'd like to encrypt a container with dm-crypt and this is what I have:

Slackware-11

Custom kernel 2.6.19 compiled with static dm-crypt and loop device and aes as module.


Code:
root@nowhere:~# ls -l /dev/mapper/control
crw-rw---- 1 root root 10, 63 2007-02-06 15:39 /dev/mapper/control
Code:
root@nowhere:~# dmsetup targets
crypt            v1.3.0
striped          v1.0.2
linear           v1.0.2
error            v1.0.1
Code:
root@nowhere:~# cat /proc/crypto
name         : aes
driver       : aes-generic
module       : aes
priority     : 100
refcnt       : 1
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32
Code:
root@nowhere:~# losetup /dev/loop0
/dev/loop0: [0804]:228891 (/home/joe/terces)
cryptsetup-0.1 is the version


---Now when I issue the command:

Code:
cryptsetup -y create terces /dev/loop0
Command failed: Invalid argument
Can you help me please understanding what's the problem.

Thx a lot in advance.
 
Old 02-06-2007, 11:21 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,294

Rep: Reputation: 138Reputation: 138
If the version of cryptsetup you have is LUKS enabled, this is an excellent HowTo on setting up encrypted partitions/containers:

http://feraga.com/node/51

There is a 10.2 version of cryptsetup-luks available:

http://www.linuxpackages.net/pkg_details.php?id=7660

don't know if it will work on 11.0. But you can download and compile from source here:

http://luks.endorphin.org/dm-crypt

The LUKS version of cryptsetup gives you a lot of additional features and the bulk of info on the net for cryptsetup is on the LUKS version AFAIK. I haven't used anything but the LUKS version myself, so I can't be of much assistance if you don't have that version or don't want to use it.
 
Old 02-06-2007, 01:07 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,180

Rep: Reputation: Disabled
Perhaps my Wiki article on encryption using cryptoloop gives you new insights: http://alien.slackbook.org/dokuwiki/...nux:cryptoloop

Eric
 
Old 02-06-2007, 03:14 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,294

Rep: Reputation: 138Reputation: 138
That's a nice article but I believe cryptoloop is deprecated and is replaced by dm-crypt/cryptsetup in most distros. IIRC there may be some security issues with cryptoloop as well.
 
Old 02-07-2007, 04:37 AM   #5
SlackN00b
Member
 
Registered: Dec 2003
Distribution: Slackware 9.1
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks anyway but I've decided to reinstall slackware 11 from scratch with kernel 2.6.17 and found out that dm-crypt works perfectly.

Since the the 2 systems are both slackware 11 "default install" but the "not working" one was using a recompiled 2.6.19 kernel, the only difference might be in the kernel libs.
Might be there a bug in the 2.6.19 ??

Cheers.
 
Old 02-07-2007, 12:59 PM   #6
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,294

Rep: Reputation: 138Reputation: 138
It's possible but not likely; you generally hear about that type of problem if it exists. I think it's more likely that there was an error or oversight in your kernel compilation or some incompatability with the version of cryptsetup used and your kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HDIO_GET_MULTCOUNT failed: Invalid argument yashwantpinge Linux - Hardware 1 06-02-2006 09:36 AM
cryptsetup - command failed: invalid argument Captain Harlock Debian 2 05-09-2006 12:18 AM
KDSKBENT: Invalid argument / failed to bind key 255 to value 2015 KevinAlaska Linux - Hardware 8 09-21-2004 06:59 PM
KBENT: Invalid argument failed to bind key 255 to value 3119 brynjarh Linux - Newbie 0 06-30-2004 02:40 AM
Mount Failed: Invalid Argument BoboBrazil Linux - Software 4 07-13-2003 12:57 PM


All times are GMT -5. The time now is 07:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration