SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-10-07 23:33:09

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

Hello crunchbangers,

I asked in ArkOS-Forum and Arch Linux-Forum until now. Either my question is too stupid or there is nobody who had this error before me but nobody could help me yet.

The story:

I use ArkOS on a cubietruck which is - as far as I understood - a derivative or Arch Linux. I wanted to mount 3 encrypted partitions of a 3TB-harddisk divided in 1TB-1TB-restsize.
I had to use partitioning and encryption (with dm-crypt/Gone Disk Utility (palimpsest)) on another PC running "Linux Mint 17 64Bit" (1st reason: this was the only PC with 64Bit-CPU I had access to and I was afraid that there would be a problem partitioning 3TB on a 32Bit-system - 2nd reason: wanted to do everything directly on the Cubietruck (partitioning, encryption, copying the old data on the 3TB-HDD) but the power supply was not strong enough to supply 2 HDDs at the same time).

After booting the Cubietruck lsblk shows:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   2.7T  0 disk 
├─sda1        8:1    0 953.7G  0 part 
├─sda2        8:2    0 953.7G  0 part 
└─sda3        8:3    0 887.2G  0 part 
nand         93:0    0   7.2G  0 disk 
mmcblk0     179:0    0   7.4G  0 disk 
└─mmcblk0p1 179:1    0     2G  0 part /

Tried to open /dev/sda3 via...

cryptsetup open /dev/sda3 <nameofpartition3>

...with following error:

Enter passphrase for /dev/sda3:
device-mapper: reload ioctl on failed: No such file or directory
Failed to setup dm-crypt key mapping for device /dev/sda3.
Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).

Following [SOLVED]Unable to perform cryptsetup luksFormat when doing LVM on LUKS I rebooted the system, tried to mount /dev/sda3 again and got a slightly different error:

$ sudo cryptsetup open /dev/sda3 nameofpartition3
[sudo] password for saljut7: 
Enter passphrase for /dev/sda3: 
device-mapper: reload ioctl on temporary-cryptsetup-896 failed: No such file or directory
Failed to setup dm-crypt key mapping for device /dev/sda3.
Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).

Is there some package missing or some problem because I formatted/encrypted the partitions under another system? uname -a on the Cubietruck gives:

Linux Cubietruck 3.4.90-4-ARCH #1 SMP PREEMPT Sat Jun 14 14:27:01 MDT 2014 armv7l GNU/Linux

Any ideas where I should start to solve the problem?

sj7

Last edited by saljut7 (2014-10-07 23:37:53)

Offline

Be excellent to each other!

#2 2014-10-17 19:29:11

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

Try using cryptsetup luksOpen instead of cryptsetup open. Source.

Basically it would look something like this:

cryptsetup luskOpen /dev/sda3 secret

The block device will now be mapped to /dev/mapper/secret. You can then mount it.

mkdir -p /mnt/secret
mount /dev/mapper/secret /mnt/secret

Last edited by cup_of_squirrel (2014-10-17 19:35:02)

Offline

#3 2014-10-20 11:12:33

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

cup_of_squirrel wrote:

Try using cryptsetup luksOpen instead of cryptsetup open. Source.

Hello cup_of_squirrel,

thank you so much for your help!

Unfortunately I still get:

Enter passphrase for /dev/sda3: 
device-mapper: reload ioctl on  failed: No such file or directory
Failed to setup dm-crypt key mapping for device /dev/sda3.
Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).

I tried it several times to proof that the password is right. Unfortunately the error-message is exactly the same if I type nonsense...

Last edited by saljut7 (2014-10-20 11:30:46)

Offline

#4 2014-10-20 16:35:23

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

Hmm...

Check that aes kernel module is loaded.

lsmod | grep -i aes

If you see nothing after entering the above command, it is not loaded. To load it:

modprobe aes

You might also need dm-mod, dm-crypt, sha256 and cbc kernel modules. Check that they're loaded and modprobe them if they aren't.

Offline

#5 2014-10-20 20:59:01

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

cup_of_squirrel wrote:

Check that aes kernel module is loaded.

lsmod | grep -i aes

If you see nothing after entering the above command, it is not loaded. To load it:

modprobe aes

You might also need dm-mod, dm-crypt, sha256 and cbc kernel modules. Check that they're loaded and modprobe them if they aren't.

Finally a way to analize the problem, thank you!

$ lsmod | grep -i aes
$ modprobe aes
modprobe: FATAL: Module aes not found.
$ lsmod | grep -i dm-mod
$ lsmod | grep -i dm-crypt
$ lsmod | grep -i sha256
$ lsmod | grep -i cbc
$ modprobe dm-mod
$ modprobe dm-crypt
$ modprobe sha256
$ modprobe: FATAL: Module sha256 not found.
$ modprobe cbc
$

Okay, so it means:

aes, dm-mod, dm-crypt, sha256, cbc: not loaded
aes, sha256: could not be loaded because they are not available on my system?
dm-mod, dm-crypt, cbc: could be loaded?

well, I checked again the kernel modules:

$ lsmod | grep -i dm-mod
$ lsmod | grep -i dm-crypt
$ lsmod | grep -i dm-cbc
$ 

...so no error loading these 3 modules using modprobe but then no output (=not loaded) checking them with lsmod? Did I miss something?

Offline

#6 2014-10-21 15:15:10

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

The modules might be named something different on that distro you're using.

saljut7 wrote:

aes, sha256: could not be loaded because they are not available on my system?

To see all available module on your system do

modprobe -l | less

If you never used less, j and k scroll, q quits. To narrow it down a bit you can probably filter it down to crypto stuff only:

modproble -l | grep crypto | less

To search just for aes modify the grep command to something like grep crypto/aes*. On 64 bit systems aes is sometimes called aes-x86_64.ko, so you would do modprobe aes-x86_64.

saljut7 wrote:

dm-mod, dm-crypt, cbc: could be loaded?

To see what modules are loaded do lsmod without any flags and scroll through all the entries. If the output is too long, pipe it into less.

Last edited by cup_of_squirrel (2014-10-21 15:16:30)

Offline

#7 2014-10-25 11:51:54

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

Sorry for my late reply. Sometimes I have to wait until the coming weekend to try your hints in calm.

cup_of_squirrel wrote:

The modules might be named something different on that distro you're using.

I will keep this in mind.

cup_of_squirrel wrote:

To see all available module on your system do

modprobe -l | less

...shows only a page containing

~
[...]
~
(END)

But modprobe -l says

$ modprobe -l
modprobe: invalid option -- 'l'

Well, there is no -l in the manual, is this the right command?

cup_of_squirrel wrote:

To see what modules are loaded do lsmod without any flags and scroll through all the entries. If the output is too long, pipe it into less.

Okay, lsmod gives me:

$ lsmod
Module                  Size  Used by
dm_crypt               14713  0 
dm_mod                 59599  1 dm_crypt
ip6_tables             10449  0 
iptable_filter          1073  1 
iptable_mangle          1204  0 
iptable_raw             1005  0 
iptable_nat             3278  0 
nf_nat                 11950  1 iptable_nat
nf_conntrack_ipv4      10247  3 nf_nat,iptable_nat
nf_defrag_ipv4           981  1 nf_conntrack_ipv4
nf_conntrack           54473  3 nf_nat,iptable_nat,nf_conntrack_ipv4
ip_tables               9775  4 iptable_filter,iptable_mangle,iptable_nat,iptable_raw
sunxi_cedar_mod         8376  0 
g_ether                33179  0 
disp_ump                 743  0 
ump                    25879  1 disp_ump
hdmi                   21771  0 
lcd                     3316  0 
disp                  292081  4 lcd,hdmi,disp_ump
cfbfillrect             2648  1 disp
cfbimgblt               1674  1 disp
cfbcopyarea             2446  1 disp
bcmdhd                442113  0 
cfg80211              146744  1 bcmdhd
sunxi_gmac             23654  0 

So there is dm_crypt and dm_mod only but cbc, aes and sha256 is missing.

Okay, now I have to find out how to load cbc, aes and sha256...

Unfortunately https://wiki.archlinux.org/index.php/Dm … reparation is not very helpful. Seems that this error is not expected and there should be cbc, aes and sha256 loaded if there is already dm_crypt loaded.

Well, thank you cup_of_squirrel for analyzing the problem. If you have any more advices I would be thankful. Will ask now in the ArkOS-board again if somebody knows how to load these missing modules,

Last edited by saljut7 (2014-10-25 11:55:45)

Offline

#8 2014-10-27 16:17:43

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

saljut7 wrote:

Well, there is no -l in the manual, is this the right command?

Some versions of modprobe don't have that feature. You'll have to do it with find.

find /lib/modules/`uname -r` -type f -name "*.ko"

So, to look just for aes:

find /lib/modules/`uname -r` -type f -name "aes*.ko"

Note: the ` character is not the ' character.  `  is below  ~  on your keyboard.

--------------

saljut7 wrote:

Okay, now I have to find out how to load cbc, aes and sha256...

As mentioned before, modprobe the appropriate module you get with find command above. Could be something like:

sudo modprobe aes-x86_64
# or possibly
sudo modrpobe aes_generic

For sha it might look like this:

sudo modrpobe sha256_generic

For crc:

sudo modrpobe crc32c-intel

Last edited by cup_of_squirrel (2014-10-27 16:18:19)

Offline

#9 2014-11-12 16:13:18

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

cup_of_squirrel wrote:

Some versions of modprobe don't have that feature. You'll have to do it with find.

Hey again,

with your help i could show the DEVs of ArkOS that, (I quote them: ) "It's possible that the kernel isn't including the proper modules". They will provide new images soon.

Thank you for all your help. I think I learned a lot how to analyze problems under Linux. Anyway I tried to follow your instructions using...

$ find /lib/modules/`uname -r` -type f -name "aes*.ko"
$ find /lib/modules/`uname -r` -type f -name "dm-mod*.ko"
$ find /lib/modules/`uname -r` -type f -name "dm-crypt*.ko"
$ find /lib/modules/`uname -r` -type f -name "crypt*.ko"
$ find /lib/modules/`uname -r` -type f -name "sha256*.ko"
$ find /lib/modules/`uname -r` -type f -name "cbc*.ko"
$

...but din't show me anything. I hope I understood you right?

Offline

#10 2014-11-12 17:50:24

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

Since ArkOS is based on Arch, I've looked around on Arch wiki. Their article on kernel modules is pretty thorough.

Apparently they store their kernel modules in /usr/lib/modules/kernel_release. So your find command should look something like this:

find /usr/lib/modules/`uname -r` -type f -name "aes*.ko"

When you find the modules you need, modprobe them like I mentioned before.

Sorry for the confusion, I'm used to Debian and RHEL based distros.

Last edited by cup_of_squirrel (2014-11-12 17:53:35)

Offline

#11 2014-11-23 20:47:03

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

cup_of_squirrel wrote:

Since ArkOS is based on Arch, I've looked around on Arch wiki. Their article on kernel modules is pretty thorough.

Apparently they store their kernel modules in /usr/lib/modules/kernel_release. So your find command should look something like this:

find /usr/lib/modules/`uname -r` -type f -name "aes*.ko"

When you find the modules you need, modprobe them like I mentioned before.

Sorry for the confusion, I'm used to Debian and RHEL based distros.

Thank you so much again! I first started to analyze the folders a litte bit:

Under /usr/lib/modules I have:

drwxr-xr-x 3 root root 4096 Oct 10 01:40 3.4.90-4-ARCH
drwxr-xr-x 2 root root 4096 Sep 28 10:27 extramodules-3.4--sun7i

Folder 3.4.90-4-ARCH consists of:

lrwxrwxrwx 1 root root     26 Jun 14 22:28 extramodules -> ../extramodules-3.4--sun7i
drwxr-xr-x 9 root root   4096 Jun 14 22:28 kernel
-rw-r--r-- 1 root root 336617 Oct 10 01:40 modules.alias
-rw-r--r-- 1 root root 333107 Oct 10 01:40 modules.alias.bin
-rw-r--r-- 1 root root   6230 Jun 14 22:28 modules.builtin
-rw-r--r-- 1 root root   8924 Oct 10 01:40 modules.builtin.bin
-rw-r--r-- 1 root root  89354 Oct 10 01:40 modules.dep
-rw-r--r-- 1 root root 135227 Oct 10 01:40 modules.dep.bin
-rw-r--r-- 1 root root    188 Oct 10 01:40 modules.devname
-rw-r--r-- 1 root root  41338 Jun 14 22:28 modules.order
-rw-r--r-- 1 root root     55 Oct 10 01:40 modules.softdep
-rw-r--r-- 1 root root  86858 Oct 10 01:40 modules.symbols
-rw-r--r-- 1 root root 110306 Oct 10 01:40 modules.symbols.bin

Folder extramodules-3.4--sun7i has just one file:

-rw-r--r-- 1 root root 14 Jun 14 22:28 version

So I tried /usr/lib/modules/3.4.90-4-ARCH/kernel:

drwxr-xr-x  3 root root 4096 Jun 14 22:28 arch
drwxr-xr-x  3 root root 4096 Jun 14 22:28 crypto
drwxr-xr-x 20 root root 4096 Jun 14 22:28 drivers
drwxr-xr-x  8 root root 4096 Jun 14 22:28 fs
drwxr-xr-x  3 root root 4096 Jun 14 22:28 lib
drwxr-xr-x 19 root root 4096 Jun 14 22:28 net
drwxr-xr-x  5 root root 4096 Jun 14 22:28 sound

Following /usr/lib/modules/3.4.90-4-ARCH/kernel/crypto:

-rw-r--r-- 1 root root 4178 Jun 14 22:28 af_alg.ko.gz
-rw-r--r-- 1 root root 3039 Jun 14 22:28 algif_hash.ko.gz
-rw-r--r-- 1 root root 4542 Jun 14 22:28 algif_skcipher.ko.gz
drwxr-xr-x 2 root root 4096 Jun 14 22:28 async_tx
-rw-r--r-- 1 root root 1478 Jun 14 22:28 crc32c.ko.gz
-rw-r--r-- 1 root root 3569 Jun 14 22:28 crypto_user.ko.gz
-rw-r--r-- 1 root root 2578 Jun 14 22:28 md4.ko.gz
-rw-r--r-- 1 root root 1792 Jun 14 22:28 michael_mic.ko.gz
-rw-r--r-- 1 root root 3372 Jun 14 22:28 xor.ko.gz

So here are some files ending with *.ko.

Now I started to look for the modules via

$ find /usr/lib/modules/`uname -r` -type f -name "aes*.ko"
$ find /usr/lib/modules/`uname -r` -type f -name "dm-mod*.ko"
$ find /usr/lib/modules/`uname -r` -type f -name "dm-crypt*.ko"
$ find /usr/lib/modules/`uname -r` -type f -name "crypt*.ko"
$ find /usr/lib/modules/`uname -r` -type f -name "sha256*.ko"
$ find /usr/lib/modules/`uname -r` -type f -name "cbc*.ko"

...and found nothing.

Looking for

find /usr/lib/modules/`uname -r` -type f -name "crc32*.ko*"

gave me

/usr/lib/modules/3.4.90-4-ARCH/kernel/crypto/crc32c.ko.gz

so the command is working.

Seems there is no one of these modules I need, isn't it?

Offline

#12 2014-11-30 05:28:19

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

saljut7 wrote:

Seems there is no one of these modules I need, isn't it?

Yup, seems like they were not even included with the kernel. Not sure why. You'll have to bug ArkOS developers to remedy this. Or you could build and compile your own kernel that includes those modules, might be going too deep down the rabbit hole if you're new though.

Offline

#13 2014-11-30 13:04:50

saljut7
#! CrunchBanger
Registered: 2013-10-31
Posts: 101

Re: Missing kernel support of "aes-xts-plain64 cipher"? [Cubietruck ArkOS]

cup_of_squirrel wrote:

Yup, seems like they were not even included with the kernel. Not sure why. You'll have to bug ArkOS developers to remedy this. Or you could build and compile your own kernel that includes those modules, might be going too deep down the rabbit hole if you're new though.

I think so as well. Wouldn't need a userfriendly OS like ArkOS if I would be able to build my own kernel... beside this the Cubietruck is a little bit difficult to handle that's why there is not such a big community compared with RPi. So I expect much more problems even I would build a working kernel on my own.

Well, thank you again. I ask the DEVs another time when there will be a working update. Otherwise I need a completely different plan.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo