cryptsetup / LUKS disk encryption on Debian not working

Hello

I am trying to encrypt a USB drive using the BBB and Debian wheezy (Kernel 3.8.13-bone20).

So the command I try is:
cryptsetup --verbose --verify-passphrase luksFormat /dev/sda1

However I get the following errors:
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Cannot initialize device-mapper. Is dm_mod kernel module loaded?
Command failed with code 38: Cannot initialize device-mapper. Is dm_mod kernel module loaded?

As far as my limited Linux knowledge tells me, the respective kernel modules are not part of my kernel. Is that correct? Is there an easy way to make this work? Or do you see alternatives to encrypt USB drives?

Thanks!

So... 3.8.13-bone20 was released on May 28, 2013.. I enabled dm_mod
support in 3.8.13-bone22 (on Jun 20, 2013)..

We are currently shipping 3.8.13-bone60..

You should really upgrade.

Regards,

OMG - fastest reply ever. Thank you so much Robert. I thought I tried updating the kernel. What I did:
wget https://rcn-ee.net/deb/sid-armhf/v3.8.13-bone60/install-me.sh

chmod +x ``install``-me.sh
sudo .``/install-me``.sh
sudo reboot

But apparently this is not how its being done. Is there a howto for newbie somewhere…? Where did I go wrong?

Thanks again!

First lets start with figuring what image you have first:

cat /etc/rcn-ee.conf

Regards,

No such file or directory…

I am running a Debian Wheezy I downloaded from the BBB Wiki a while ago. Can this also be updated (using your tools)?
Would there be a simple way to migrate?

Thanks += 1

Sadly nope. As it's not my image, so the automated install-me.sh/etc
is not guaranteed to work/boot.

But you can always build that kernel branch and install the kernel
image/dtbs/modules where they need to be.

Regards,

Thank you! Since I have no clue about building kernels, etc., I guess the least painful will be to install your latest image and rebuild the machine...

Soooo…

I made a SD card with the latest debian RCN demo-image (2014-07-06). This time cryptsetup works a little better but it is far from operational.
What I did:
sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1
sudo cryptsetup luksOpen /dev/sdb1 sdb1
sudo mkfs.ext4 /dev/mapper/sdb1

At this point the BBB crashes. The first time I got a kernel panic warning on ssh:
kernel:[79920.677253] Kernel panic - not syncing: hung_task: blocked tasks

So I formatted the usb drive to ext4 on my PC, hooked it back to the BBB and opened it there. This worked. However writing to the disk will again crash my poor BBB.

Anyone any ideas how I could make BBB debian work with LUKS on an external disk?

Cheers
N

Is anyone running a encrypted usb drive on debian on the bbb? Because I think this might be a bug… Mine keeps crashing and I have basically nothing else installed / configured.
Any help would be greatly appreciated!

Not on Debian but on Arch Linux ARM/ALARM I have had no major issues.

Oh forgot to mention the only thing different I did was apply the nuke patchset. Been going about 4 months on that install.

You won’t receive a copy of your posts so there is no need to post multiple times.

Regards,
John

actually if you read them both they both have different content. Second one was a fact I forgot to mention in the first, would have taken you less time to re-read them both than typing that out lol

I upgraded to the latest Kernel (bone62) and tried again. No success - still kernel panic.
Can anyone help me?
Should I file a bug report somewhere?
Log is full with this:

Aug 3 12:04:19 photon kernel: [ 404.686312] Exception stack(0xc082ff18 to 0xc082ff60)
Aug 3 12:04:19 photon kernel: [ 404.686321] ff00: df0c226c 20000013
Aug 3 12:04:19 photon kernel: [ 404.686333] ff20: 00000000 5b355b35 20000013 de147b1c 00000037 00000000 df0c227c 413fc082
Aug 3 12:04:19 photon kernel: [ 404.686346] ff40: 00000000 c091b960 00202341 c082ff60 c04ce9f1 c04ce9f4 60000033 ffffffff
Aug 3 12:04:19 photon kernel: [ 404.686362] [] (__irq_svc+0x3b/0x5c) from [] (_raw_spin_unlock_irqrestore+0xc/0x10)
Aug 3 12:04:19 photon kernel: [ 404.686379] [] (_raw_spin_unlock_irqrestore+0xc/0x10) from [] (__gpio_set_value+0x5b/0xc0)
Aug 3 12:04:19 photon kernel: [ 404.686401] [] (__gpio_set_value+0x5b/0xc0) from [] (led_set_brightness+0x1f/0x30)
Aug 3 12:04:19 photon kernel: [ 404.686416] [] (led_set_brightness+0x1f/0x30) from [] (led_trigger_event+0x25/0x38)
Aug 3 12:04:19 photon kernel: [ 404.686431] [] (led_trigger_event+0x25/0x38) from [] (cpu_idle+0x27/0xb8)
Aug 3 12:04:19 photon kernel: [ 404.686448] [] (cpu_idle+0x27/0xb8) from [] (start_kernel+0x207/0x25c)
Aug 3 12:04:19 photon kernel: [ 404.686588] BUG: scheduling while atomic: swapper/0/0/0x40000100
Aug 3 12:04:19 photon kernel: [ 404.692868] Modules linked in: sha256_generic g_multi libcomposite dm_crypt
Aug 3 12:04:19 photon kernel: [ 404.692899] [] (unwind_backtrace+0x1/0x9c) from [] (__schedule_bug+0x31/0x44)
Aug 3 12:04:19 photon kernel: [ 404.692915] [] (__schedule_bug+0x31/0x44) from [] (__schedule+0x4df/0x574)
Aug 3 12:04:19 photon kernel: [ 404.692931] [] (__schedule+0x4df/0x574) from [] (__cond_resched+0x1b/0x24)
Aug 3 12:04:19 photon kernel: [ 404.692946] [] (__cond_resched+0x1b/0x24) from [] (_cond_resched+0x23/0x2c)
Aug 3 12:04:19 photon kernel: [ 404.692961] [] (_cond_resched+0x23/0x2c) from [] (__pm_runtime_idle+0x67/0x68)
Aug 3 12:04:19 photon kernel: [ 404.692978] [] (__pm_runtime_idle+0x67/0x68) from [] (omap_aes_finish_req+0x11/0x24)
Aug 3 12:04:19 photon kernel: [ 404.692994] [] (omap_aes_finish_req+0x11/0x24) from [] (omap_aes_done_task+0xc1/0x13c)
Aug 3 12:04:19 photon kernel: [ 404.693011] [] (omap_aes_done_task+0xc1/0x13c) from [] (tasklet_action+0x47/0x9c)
Aug 3 12:04:19 photon kernel: [ 404.693025] [] (tasklet_action+0x47/0x9c) from [] (__do_softirq+0x97/0x180)
Aug 3 12:04:19 photon kernel: [ 404.693040] [] (__do_softirq+0x97/0x180) from [] (irq_exit+0x55/0x5c)
Aug 3 12:04:19 photon kernel: [ 404.693054] [] (irq_exit+0x55/0x5c) from [] (handle_IRQ+0x27/0x60)
Aug 3 12:04:19 photon kernel: [ 404.693068] [] (handle_IRQ+0x27/0x60) from [] (omap3_intc_handle_irq+0x51/0x5c)
Aug 3 12:04:19 photon kernel: [ 404.693083] [] (omap3_intc_handle_irq+0x51/0x5c) from [] (__irq_svc+0x3b/0x5c)

Hai friend,
Please try to execute the command as root user or use sudo command