Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with dmcrypt
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
Macce
n00b
n00b


Joined: 30 Jun 2005
Posts: 41

PostPosted: Fri Jun 02, 2006 9:06 pm    Post subject: Problem with dmcrypt Reply with quote

Hello,

I followed the tutorial at Gentoo-wiki for dmcrypt, but I cant create the encrypted partition.
The partition I want to encrypt is /dev/sdb2. It exists.

"cryptsetup create ctikku /dev/sdb2" ask for the passphrase and says "Command failed: Invalid argument".
I've tried different names but it still won't work.

Any suggestions?

Best Regards,
Marcus
Back to top
View user's profile Send private message
therisen
n00b
n00b


Joined: 27 May 2006
Posts: 36
Location: Germany

PostPosted: Fri Jun 02, 2006 10:23 pm    Post subject: Reply with quote

Hi,

i'm not sure if i can help you but could you post the output of

Code:
lsmod | grep dm


Also, is devicemapper running? Look at

Code:
ls /dev/mapper/*



Greets, therisen
_________________
"Pure mathematics is on the whole distinctly more useful than applied.
For what is useful above all is technique, and mathematical technique
is taught mainly through pure mathematics.


Godfrey H. Hardy
Back to top
View user's profile Send private message
Macce
n00b
n00b


Joined: 30 Jun 2005
Posts: 41

PostPosted: Fri Jun 02, 2006 10:28 pm    Post subject: Reply with quote

Thanks for helping me.

The first command doesn't print anything.
The second prints /dev/mapper/control.
Back to top
View user's profile Send private message
therisen
n00b
n00b


Joined: 27 May 2006
Posts: 36
Location: Germany

PostPosted: Fri Jun 02, 2006 10:34 pm    Post subject: Reply with quote

Alright, then try
Code:
modprobe dm-crypt
and afterwards your
Code:
cryptsetup ...

_________________
"Pure mathematics is on the whole distinctly more useful than applied.
For what is useful above all is technique, and mathematical technique
is taught mainly through pure mathematics.


Godfrey H. Hardy
Back to top
View user's profile Send private message
Macce
n00b
n00b


Joined: 30 Jun 2005
Posts: 41

PostPosted: Fri Jun 02, 2006 10:45 pm    Post subject: Reply with quote

jupiter ~ # modprobe dm-crypt
FATAL: Module dm_crypt not found.

I complied everything (that was said to be needed in the wiki) into the kernel, if that changes the situation?

(Of cource I rebooted too...)
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Sat Jun 03, 2006 2:49 pm    Post subject: Reply with quote

Macce wrote:
jupiter ~ # modprobe dm-crypt
FATAL: Module dm_crypt not found.

I complied everything (that was said to be needed in the wiki) into the kernel, if that changes the situation?

(Of cource I rebooted too...)


You should be fine. The /dev/mapper/control exists - so you have the device mapper.

The first part of your command: cryptsetup create ctikku works fine, so I would guess you are having problems with /dev/sdb2

Code:

cryptsetup create ctikku /dev/sdb2


You can test this on a loopback device like this:

Code:

# cd /tmp
#
# dd if=/dev/zero of=file1 bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.180998 seconds, 579 MB/s
#
# losetup /dev/loop0 file1
#
# cryptsetup create ctikku /dev/loop0
Enter passphrase:
#
# mke2fs -q /dev/mapper/ctikku
#


You now have an encrypted 100MB filesystem inside a file.


troymc
Back to top
View user's profile Send private message
Macce
n00b
n00b


Joined: 30 Jun 2005
Posts: 41

PostPosted: Sat Jun 03, 2006 2:58 pm    Post subject: Reply with quote

That worked fine.

What do you think the problem is with the partition? It doesn't matter which partition I try to crypt, same error with my first and second satadisk... :(
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Sat Jun 03, 2006 3:44 pm    Post subject: Reply with quote

Macce wrote:
That worked fine.

What do you think the problem is with the partition? It doesn't matter which partition I try to crypt, same error with my first and second satadisk... :(


I don't know of any reason why you should be having problems. I have several systems with encrypted partitions done this way.

Try using the --verbose and see if it gives you any more info.

Also, you might check dmesg for any messages - maybe the default cipher isn't loaded. Is your kernel crypto built in or modules? ( grep name /proc/crypto will show you the currently available ciphers, default should be aes )


Could it be the passphrase you are using? Try something simple first, like test.


troymc
Back to top
View user's profile Send private message
Macce
n00b
n00b


Joined: 30 Jun 2005
Posts: 41

PostPosted: Sat Jun 03, 2006 4:00 pm    Post subject: Reply with quote

Guess what, it works now without doing anything more than I tried before.

Strange, but true.
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Sat Jun 03, 2006 4:03 pm    Post subject: Reply with quote

Macce wrote:
Guess what, it works now without doing anything more than I tried before.

Strange, but true.



It's those SUNSPOTS I tell ya! :P


troymc
Back to top
View user's profile Send private message
Macce
n00b
n00b


Joined: 30 Jun 2005
Posts: 41

PostPosted: Sat Jun 03, 2006 4:05 pm    Post subject: Reply with quote

Hehe.

Thanks for helping!
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