Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] Keine Verschlüsselung mit dm-crypt
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
zeitsofa
n00b
n00b


Joined: 08 Feb 2011
Posts: 9

PostPosted: Wed Feb 09, 2011 3:26 am    Post subject: [gelöst] Keine Verschlüsselung mit dm-crypt Reply with quote

Hi zusammen,

ich wollte so eben ein Verzeichnis verschlüsseln aber leider ohne Erfolg. Geplant war cryptsetup/LUKS zu benutzen.
Das Ganze sieht so aus:

Code:

# cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/sda1

WARNING!
========
Hiermit überschreiben Sie Daten auf /dev/sda1 unwiderruflich.

Are you sure? (Type uppercase yes): YES
LUKS-Passsatz eingeben:
Passsatz wiederholen:
device-mapper: reload ioctl failed: Datei oder Verzeichnis nicht gefunden
Einrichten der dm-crypt-Schlüsselzuordnung für Gerät /dev/sda1 fehlgeschlagen.
Prüfen Sie, dass der Kernel die aes-xts-plain-Verschlüsselung unterstützt.
(Sehen Sie im System-Log nach, ob sich dort Hinweise finden.)


Der interessante Teil von dmesg sind die letzten beiden Zeilen
Code:

# dmesg | tail -2
device-mapper: table: 254:0: crypt: Error allocating crypto tfm
device-mapper: ioctl: error adding target to table


Kernel/Module
Code:
# uname -r
2.6.36-gentoo-r5


Code:

# lsmod | grep "crypt\|aes\|blowfish"
blowfish                7108  0
aes_i586                6780  0
aes_generic            25722  1 aes_i586
dm_crypt                8495  0


Code:

# zgrep "CONFIG_BLK_DEV_DM\|CONFIG_DM_CRYPT\|CONFIG_CRYPTO_CBC" /proc/config.gz
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=m
CONFIG_CRYPTO_CBC=y


Der Wiki Artikel nach dem ich vorgehen wollte:
http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS

Hat jemand eine Idee was dem guten Stück fehlen könnte?

Beste Grüße
zeitsofa


Last edited by zeitsofa on Thu Feb 10, 2011 10:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Wed Feb 09, 2011 7:23 am    Post subject: Reply with quote

│ Symbol: CRYPTO_XTS [=y] │
│ Type : tristate │
│ Prompt: XTS support (EXPERIMENTAL) │
│ Defined at crypto/Kconfig:257 │
│ Depends on: CRYPTO [=y] && EXPERIMENTAL [=y] │
│ Location: │
│ -> Cryptographic API (CRYPTO [=y])

Probier es mal damit?
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
BlueSkyDriver
n00b
n00b


Joined: 26 Nov 2005
Posts: 57

PostPosted: Wed Feb 09, 2011 7:26 am    Post subject: Re: Keine Verschlüsselung mit dm-crypt Reply with quote

Vielleicht ist die Partition gemountet? Das sollte sie bei der Aktion nicht sein.

saludos
andreas
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Wed Feb 09, 2011 11:34 am    Post subject: Reply with quote

einfach alle cipher in den Kernel einkompilieren

in bestimmten Fällen ist es besser, keine Module für Dinge zu haben :idea:
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3925
Location: Hamburg

PostPosted: Wed Feb 09, 2011 10:30 pm    Post subject: Reply with quote

Ich finde hier noch
Code:
echo /sbin/cryptsetup -c aes-lrw-benbi:sha256 -y -s 384 luksFormat /dev/sdb1
in meiner History, und ein einfaches mounten des Laufwerkes + decrypten braucht bei mir folgende Module :
Code:
n22 ~ # lsmod | grep "crypt\|aes\|blowfish"
aes_generic            25766  0
dm_crypt               10283  0
dm_mod                 54017  1 dm_crypt
crypto_blkcipher        9676  4 eseqiv,xts,dm_crypt,ecb
cryptomgr               1892  0
aead                    3983  1 cryptomgr
crypto_algapi           9907  9 krng,eseqiv,aes_generic,xts,arc4,ecb,crypto_blkcipher,cryptomgr,aead
Back to top
View user's profile Send private message
Hollowman
Guru
Guru


Joined: 19 Apr 2007
Posts: 584

PostPosted: Thu Feb 10, 2011 10:32 am    Post subject: Reply with quote

Das was Finswimmer geschrieben hat passt, hatte ich eben auch als ich den flaschen Cipher gewählt hatte.

Sebastian
Back to top
View user's profile Send private message
zeitsofa
n00b
n00b


Joined: 08 Feb 2011
Posts: 9

PostPosted: Thu Feb 10, 2011 1:57 pm    Post subject: Reply with quote

Danke für den Wink ich probieres jetzt mal hiermit:


grep CRYPTO /usr/src/linux/.config
Code:

CONFIG_BLK_DEV_CRYPTOLOOP=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_GF128MUL=y
CONFIG_CRYPTO_NULL=y
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_TEST is not set
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_LRW is not set
CONFIG_CRYPTO_PCBC=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRC32C_INTEL=y
CONFIG_CRYPTO_GHASH=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=y
CONFIG_CRYPTO_RMD128=y
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_RMD256=y
CONFIG_CRYPTO_RMD320=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_TGR192=y
CONFIG_CRYPTO_WP512=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_586=y
CONFIG_CRYPTO_ANUBIS=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_CAMELLIA=y
CONFIG_CRYPTO_CAST5=y
CONFIG_CRYPTO_CAST6=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=y
CONFIG_CRYPTO_KHAZAD=y
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
CONFIG_CRYPTO_SEED=y
CONFIG_CRYPTO_SERPENT=y
CONFIG_CRYPTO_TEA=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_TWOFISH_COMMON=y
CONFIG_CRYPTO_TWOFISH_586=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_ZLIB=y
CONFIG_CRYPTO_LZO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
# CONFIG_CRYPTO_DEV_HIFN_795X is not set


Sobald der Kernel fertig is weiß ich mehr und meld mich :)

Grüße
zeitsofa
Back to top
View user's profile Send private message
zeitsofa
n00b
n00b


Joined: 08 Feb 2011
Posts: 9

PostPosted: Thu Feb 10, 2011 2:33 pm    Post subject: Reply with quote

so ein bisschen weiter bin ich mal

# cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/sda1
WARNING!
========
Hiermit überschreiben Sie Daten auf /dev/sda1 unwiderruflich.

Are you sure? (Type uppercase yes): YES
LUKS-Passsatz eingeben:
Passsatz wiederholen:
device-mapper: remove ioctl failed: Das Gerät oder die Ressource ist belegt

# mount | grep /dev/sda1
#

# dmesg
[snip]
usb 5-6: new high speed USB device using ehci_hcd and address 3
usb 5-6: New USB device found, idVendor=17ef, idProduct=1000
usb 5-6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 5-6:1.0: USB hub found
hub 5-6:1.0: 4 ports detected
eth0: no IPv6 routers present
device-mapper: ioctl: unable to remove open device temporary-cryptsetup-15340




also so recht will das noch nicht laufen.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Feb 10, 2011 3:10 pm    Post subject: Reply with quote

zeitsofa wrote:
so ein bisschen weiter bin ich mal

# cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/sda1
WARNING!
========
Hiermit überschreiben Sie Daten auf /dev/sda1 unwiderruflich.

Are you sure? (Type uppercase yes): YES
LUKS-Passsatz eingeben:
Passsatz wiederholen:
device-mapper: remove ioctl failed: Das Gerät oder die Ressource ist belegt

# mount | grep /dev/sda1
#

# dmesg
[snip]
usb 5-6: new high speed USB device using ehci_hcd and address 3
usb 5-6: New USB device found, idVendor=17ef, idProduct=1000
usb 5-6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 5-6:1.0: USB hub found
hub 5-6:1.0: 4 ports detected
eth0: no IPv6 routers present
device-mapper: ioctl: unable to remove open device temporary-cryptsetup-15340




also so recht will das noch nicht laufen.


papperlapub

das ist der ordnungsgemäße Betriebsmodus von cryptsetup 1.1*

erst mit cryptsetup 1.2* bekommst du die Fehlermeldungen weg (war bei mir so und steht auch im Changelog, Releasenotes, Doku)

ließ sich der Container bzw. die Partition erstellen und öffnen ?

wenn ja - was willst du denn mehr ? :wink:
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
zeitsofa
n00b
n00b


Joined: 08 Feb 2011
Posts: 9

PostPosted: Thu Feb 10, 2011 10:07 pm    Post subject: Reply with quote

oh je - *kopp => tisch*

Es funktioniert danke für den Hinweis das die Meldung normal ist. Ich hatte, muss ich zu meiner Schande gestehen, nicht geschaut ob der Container erstellt wurde sondern habe vermutet das das nicht lief anhand der Fehlermeldung.

Nun gehts aber habt vielen lieben dank ;)
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Fri Feb 11, 2011 5:19 pm    Post subject: Reply with quote

naja,

zugegeben

die Meldung bekomm ich irgendwie (oder ab und zu) immer noch:


cryptsetup luksOpen /dev/foo ext4
Enter passphrase for /dev/foo:
device-mapper: remove ioctl failed: Device or resource busy
device-mapper: remove ioctl failed: Device or resource busy


naja, die Hauptsache ist ja, dass es funktioniert ;)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Fri Feb 11, 2011 8:07 pm    Post subject: Reply with quote

Kann ich bestätigen, die Meldungen kommen auch hier - ich habe allerdings auch nie negative Auswirkungen feststellen können.
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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