Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
07-28-2005, 12:51 PM
|
#1
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Rep:
|
slackware encryption dm-crypt
I configured my 2.6.12.3 kernel for dm-crypt... everything works then I compile the user-space tool cryptsetup-luks from
http://luks.endorphin.org/dm-crypt
but on make it spits
Code:
keyencryption.c:31:26: libdevmapper.h: No such file or directory
keyencryption.c:35:26: libdevmapper.h: No such file or directory
keyencryption.c: In function `LUKS_endec_template':
keyencryption.c:100: warning: initialization makes pointer from integer
withouta cast
make[2]: *** [libluks_la-keyencryption.lo] Error 1
make[2]: Leaving directory `/home/x/cryptsetup-luks-1.0.1/luks'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/x/cryptsetup-luks-1.0.1'
make: *** [all] Error 2
I tried using the cryptsetup-1.0.1-i686-pc-linux-gnu-static.bz2 - Precompiled binary version 1.0.1: my kernel is working correctly so I issue the commands written on the luks page
http://luks.endorphin.org/dm-crypt
# cryptsetup luksFormat /dev/loop0
WARNING!
========
This will overwrite data on /dev/loop0 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
failed to setup dm-crypt mapping.
failed to write to key storage.
Command failed.
What's wrong???
Last edited by rino.caldelli; 07-31-2005 at 04:28 PM.
|
|
|
07-29-2005, 09:43 AM
|
#2
|
Member
Registered: Dec 2004
Location: Malaysia
Distribution: Redhat/Fedora Core, Slackware, Ubuntu, Knoppix, Gentoo, SUSE, Ubuntu
Posts: 40
Rep:
|
Have u enabled the option:
types = ["device-mapper", 16] in /etc/lvm/lvm.conf ?
Note, this can only be done in LVM though ok.
http://deb.riseup.net/storage/encryption/dmcrypt/
|
|
|
07-29-2005, 05:33 PM
|
#3
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Original Poster
Rep:
|
I don't have /etc/lvm/lvm.conf ! I use slackware 10.1 and I don't know what lvm is but shouldn't have anything to do with encryption... right?
|
|
|
07-29-2005, 06:26 PM
|
#4
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
From http://www.saout.de/misc/dm-crypt/:
Quote:
But I don't want to use LVM!
You don't need LVM. Device-mapper is an all-purpose kernel feature, not tied to LVM in any way.
|
You should however, setup the kernel as said on the link posted by dragoncity99 to get device mapper working correctly. Then instead of using cryptsetup as stated on that page, use crypsetup-luks.
|
|
|
07-30-2005, 01:18 AM
|
#5
|
LQ Newbie
Registered: Oct 2003
Posts: 16
Rep:
|
extracted from my slackware setup guide at http://www.partydome.us/?slackware:
Required packages:
hashalot
cryptsetup.sh
device-mapper-1.01.00-i486-1.tgz (from /testing)
1) Compile hashalot, move to /usr/local/bin
2) Move cryptsetup.sh to /usr/local/bin
3) Run 'modprobe dm-crypt' to load the required kernel modules
4) Run 'cryptsetup -c cipher -s keysize create crypto /dev/hda5' to create the crypto
5) Run 'mkdir /crypto' to create the crypto mount point
6) Run 'mount /dev/mapper/crypto /crypto' to access your encrypted file system
links to the packages:
http://www.paranoiacs.org/~sluskyb/h...lot-0.3.tar.gz
http://www.saout.de/misc/dm-crypt/cryptsetup.sh
this is how i got dm-crypt setup under slackware 10.1. sorry but i dont know enough about encryption under linux to help you with the method you are trying. but i can tell you that the instructions above are how i got it working on my system, so you shouldnt encounter any problems.
Last edited by slackwh0re; 07-30-2005 at 01:19 AM.
|
|
|
07-30-2005, 10:18 AM
|
#6
|
Member
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270
Rep:
|
there are packages on http://slackware.php.co.ba.
you need "device-mapper" and "cryptsetup".
I tested it today with 10.1 and everything is running perfectly OK.
M.
|
|
|
07-31-2005, 09:21 AM
|
#7
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Original Poster
Rep:
|
Quote:
Originally posted by slackwh0re
extracted from my slackware setup guide at http://www.partydome.us/?slackware:
Required packages:
hashalot
cryptsetup.sh
device-mapper-1.01.00-i486-1.tgz (from /testing)
1) Compile hashalot, move to /usr/local/bin
2) Move cryptsetup.sh to /usr/local/bin
3) Run 'modprobe dm-crypt' to load the required kernel modules
4) Run 'cryptsetup -c cipher -s keysize create crypto /dev/hda5' to create the crypto
5) Run 'mkdir /crypto' to create the crypto mount point
6) Run 'mount /dev/mapper/crypto /crypto' to access your encrypted file system
links to the packages:
http://www.paranoiacs.org/~sluskyb/h...lot-0.3.tar.gz
http://www.saout.de/misc/dm-crypt/cryptsetup.sh
this is how i got dm-crypt setup under slackware 10.1. sorry but i dont know enough about encryption under linux to help you with the method you are trying. but i can tell you that the instructions above are how i got it working on my system, so you shouldnt encounter any problems.
|
I did what you told me and got a ....
root@x:/usr/local/bin# cryptsetup.sh -c aes -s 12 create crypto /dev/hda2
Error: dmsetup not found in search path.
what does that mean??? It should be a devicemapper error... you haven't told me where you downloaded device mapper from and how you installed it...
thank you
Last edited by rino.caldelli; 07-31-2005 at 09:27 AM.
|
|
|
07-31-2005, 09:33 AM
|
#8
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Original Poster
Rep:
|
Waiting slackwhore to answer I did this.. I downloaded devicemapper from the link http://slackware.php.co.ba./ that malo_umoran posted and got it working... now here's what I get
Code:
root@x:/home/x# cd /usr/local/bin/
root@x:/usr/local/bin# cryptsetup.sh -c aes -s 12
create crypto /dev/hda2
Enter passphrase:
Error: Could not create device, see syslog for details.
/dev/hda2 is a mounted vfat partition... what's the problem????
Last edited by rino.caldelli; 07-31-2005 at 04:27 PM.
|
|
|
07-31-2005, 10:18 AM
|
#9
|
Member
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270
Rep:
|
Quote:
Originally posted by rinonapo
Waiting slackwhore to answer I did this.. I downloaded devicemapper from the link http://slackware.php.co.ba./ that malo_umoran posted and got it working... now here's what I get
root@x:/home/x# cd /usr/local/bin/
root@x:/usr/local/bin# cryptsetup.sh -c aes -s 12 create crypto /dev/hda2
Enter passphrase:
Error: Could not create device, see syslog for details.
/dev/hda2 is a mounted vfat partition... what's the problem????
|
don't use "cryptsetup.sh" but just "cryptsetup" from package "cryptsetup-0.1-i686-2mm". I made these packages myself and tested it with kernel 2.6.12.3.
I am using it all the time without any problems ...
example:
# echo PASSWORD | cryptsetup create crypto /dev/hda2
# mount -t ext2 /dev/mapper/crypto /mnt/crypto
important: if you don't give any paramters about encryption, default is "-c aes -s 256"
M.
|
|
|
07-31-2005, 12:59 PM
|
#10
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Original Poster
Rep:
|
malo_umoran I did what you said and got
Code:
root@x:/home/x# echo PASSWORD | cryptsetup create crypto /dev/hda2
cryptsetup: error while loading shared libraries: libgcrypt.so.11:
cannot open shared object file: No such file or directory
root@x:/home/x#
By the way: I wanted to thank everyone for contributing to this post which is getting very interesting.. thank you so much!
Last edited by rino.caldelli; 07-31-2005 at 04:26 PM.
|
|
|
07-31-2005, 01:17 PM
|
#11
|
Member
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270
Rep:
|
you of course need libgcrypt. I forgot to mention that, because it was not my package. there are a few of these on linuxpackages.net, just choose your Slack:
http://www.linuxpackages.net/search_...libgcrypt&ver=
and "PASSWORD" in
Code:
echo PASSWORD | cryptsetup create crypto /dev/hda2
is acctualy your password. I wrote it like that to show, how can be used in scripts. you can of course still use
Code:
cryptsetup create crypto /dev/hda2
and after that you will be asked for password.
M.
Last edited by malo_umoran; 07-31-2005 at 01:20 PM.
|
|
|
07-31-2005, 04:24 PM
|
#12
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Original Poster
Rep:
|
I'm getting quite frustrated at linux encryption, I've just installed libgcrypt and I get a new error
Code:
root@x:/home/x# cryptsetup create crypto /dev/hda2
cryptsetup: error while loading shared libraries: libgpg-error.so.0:
cannot open shared object file: No such file or directory
Why is it all so complicated?? I compiled the 2.6 kernel, enabled all modules, installed devicemapper, installed cryptsetup, installed hashalot, now I installed libgcrypt and still I can't encrypt a hard drive!!!!!
Last edited by rino.caldelli; 07-31-2005 at 04:26 PM.
|
|
|
07-31-2005, 09:08 PM
|
#13
|
Member
Registered: Dec 2004
Location: Malaysia
Distribution: Redhat/Fedora Core, Slackware, Ubuntu, Knoppix, Gentoo, SUSE, Ubuntu
Posts: 40
Rep:
|
I had the same problem before this, and using the same Slack 10.1, this is because actually u need this two files:
1. libgcrypt-1.2.1-i486-1h3x.tgz
2. libgpg-error-1.0-i486-1arf.tgz --> U MISSED OUT THIS ONE
|
|
|
08-01-2005, 01:47 AM
|
#14
|
Member
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181
Original Poster
Rep:
|
Thank you dragoncity... now I have all programs and libraries and kernel modules, but now i get a more laconic
Code:
root@x:/usr/local/bin# cryptsetup create cryptos /dev/hda2
Command failed: Invalid argument
the sintax is right and /dev/hda2 exists and is a used vfat partition!
By the way out of curiosity I tried using crypto.sh which I had in /usr/local/bin
Code:
root@x:/usr/local/bin# cryptsetup.sh create crypto /dev/hda2
Error: No device mapper support in kernel.
root@x:/usr/local/bin# modprobe device_mapper
FATAL: Module device_mapper not found.
the device mapper in my kernel is activated under block devices!!!
Last edited by rino.caldelli; 08-01-2005 at 01:53 AM.
|
|
|
08-01-2005, 02:36 AM
|
#15
|
Member
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270
Rep:
|
strange ... I never had any problems.
do you have both activated:
Code:
<*> Device mapper support
<*> Crypt target support
and all the encryptions you need?
M.
p.s.: you don't need "hashalot" for dm-crypt. cryptsetup.sh as an older version needed it.
|
|
|
All times are GMT -5. The time now is 04:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|