cryptsetup / LUKS disk encryption on Debian not working

687 views
Skip to first unread message

niko....@gmail.com

unread,
Jul 22, 2014, 3:07:07 PM7/22/14
to beagl...@googlegroups.com
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!

Robert Nelson

unread,
Jul 22, 2014, 3:16:33 PM7/22/14
to Beagle Board
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,

--
Robert Nelson
http://www.rcn-ee.com/

niko....@gmail.com

unread,
Jul 22, 2014, 3:29:04 PM7/22/14
to beagl...@googlegroups.com
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!

Robert Nelson

unread,
Jul 22, 2014, 3:55:31 PM7/22/14
to Beagle Board
On Tue, Jul 22, 2014 at 2:29 PM, <niko....@gmail.com> wrote:
> 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?

First lets start with figuring what image you have first:

cat /etc/rcn-ee.conf

niko....@gmail.com

unread,
Jul 22, 2014, 4:06:47 PM7/22/14
to beagl...@googlegroups.com
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

Robert Nelson

unread,
Jul 22, 2014, 4:14:24 PM7/22/14
to Beagle Board
On Tue, Jul 22, 2014 at 3:06 PM, <niko....@gmail.com> wrote:
> 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?

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.

Niko Heeren

unread,
Jul 22, 2014, 4:56:04 PM7/22/14
to beagl...@googlegroups.com
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...

niko....@gmail.com

unread,
Jul 27, 2014, 7:04:43 AM7/27/14
to beagl...@googlegroups.com
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

niko....@gmail.com

unread,
Jul 30, 2014, 5:38:12 PM7/30/14
to beagl...@googlegroups.com
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!

Don deJuan

unread,
Jul 30, 2014, 5:44:07 PM7/30/14
to beagl...@googlegroups.com
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

Don deJuan

unread,
Jul 30, 2014, 5:47:20 PM7/30/14
to beagl...@googlegroups.com
On 07/30/2014 02:38 PM, niko....@gmail.com wrote:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Oh forgot to mention the only thing different I did was apply the nuke patchset. Been going about 4 months on that install.

John Syn

unread,
Jul 30, 2014, 6:30:49 PM7/30/14
to beagl...@googlegroups.com
You won’t receive a copy of your posts so there is no need to post multiple times. 

Regards,
John
From: Don deJuan <donju...@gmail.com>
Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Date: Wednesday, July 30, 2014 at 2:46 PM
To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Subject: Re: [beagleboard] cryptsetup / LUKS disk encryption on Debian not working

Don deJuan

unread,
Jul 30, 2014, 7:22:06 PM7/30/14
to beagl...@googlegroups.com
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

niko....@gmail.com

unread,
Aug 3, 2014, 6:15:33 AM8/3/14
to beagl...@googlegroups.com
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] [<c04cec9b>] (__irq_svc+0x3b/0x5c) from [<c04ce9f4>] (_raw_spin_unlock_irqrestore+0xc/0x10)
Aug  3 12:04:19 photon kernel: [  404.686379] [<c04ce9f4>] (_raw_spin_unlock_irqrestore+0xc/0x10) from [<c026b9ef>] (__gpio_set_value+0x5b/0xc0)
Aug  3 12:04:19 photon kernel: [  404.686401] [<c026b9ef>] (__gpio_set_value+0x5b/0xc0) from [<c03b64ff>] (led_set_brightness+0x1f/0x30)
Aug  3 12:04:19 photon kernel: [  404.686416] [<c03b64ff>] (led_set_brightness+0x1f/0x30) from [<c03b68c9>] (led_trigger_event+0x25/0x38)
Aug  3 12:04:19 photon kernel: [  404.686431] [<c03b68c9>] (led_trigger_event+0x25/0x38) from [<c000d343>] (cpu_idle+0x27/0xb8)
Aug  3 12:04:19 photon kernel: [  404.686448] [<c000d343>] (cpu_idle+0x27/0xb8) from [<c07f058b>] (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] [<c00111f1>] (unwind_backtrace+0x1/0x9c) from [<c04c9031>] (__schedule_bug+0x31/0x44)
Aug  3 12:04:19 photon kernel: [  404.692915] [<c04c9031>] (__schedule_bug+0x31/0x44) from [<c04cdf7f>] (__schedule+0x4df/0x574)
Aug  3 12:04:19 photon kernel: [  404.692931] [<c04cdf7f>] (__schedule+0x4df/0x574) from [<c004e663>] (__cond_resched+0x1b/0x24)
Aug  3 12:04:19 photon kernel: [  404.692946] [<c004e663>] (__cond_resched+0x1b/0x24) from [<c04ce073>] (_cond_resched+0x23/0x2c)
Aug  3 12:04:19 photon kernel: [  404.692961] [<c04ce073>] (_cond_resched+0x23/0x2c) from [<c02cc803>] (__pm_runtime_idle+0x67/0x68)
Aug  3 12:04:19 photon kernel: [  404.692978] [<c02cc803>] (__pm_runtime_idle+0x67/0x68) from [<c03b9909>] (omap_aes_finish_req+0x11/0x24)
Aug  3 12:04:19 photon kernel: [  404.692994] [<c03b9909>] (omap_aes_finish_req+0x11/0x24) from [<c03b9b9d>] (omap_aes_done_task+0xc1/0x13c)
Aug  3 12:04:19 photon kernel: [  404.693011] [<c03b9b9d>] (omap_aes_done_task+0xc1/0x13c) from [<c0035527>] (tasklet_action+0x47/0x9c)
Aug  3 12:04:19 photon kernel: [  404.693025] [<c0035527>] (tasklet_action+0x47/0x9c) from [<c0034f0f>] (__do_softirq+0x97/0x180)
Aug  3 12:04:19 photon kernel: [  404.693040] [<c0034f0f>] (__do_softirq+0x97/0x180) from [<c0035205>] (irq_exit+0x55/0x5c)
Aug  3 12:04:19 photon kernel: [  404.693054] [<c0035205>] (irq_exit+0x55/0x5c) from [<c000d0e3>] (handle_IRQ+0x27/0x60)
Aug  3 12:04:19 photon kernel: [  404.693068] [<c000d0e3>] (handle_IRQ+0x27/0x60) from [<c00085a9>] (omap3_intc_handle_irq+0x51/0x5c)
Aug  3 12:04:19 photon kernel: [  404.693083] [<c00085a9>] (omap3_intc_handle_irq+0x51/0x5c) from [<c04cec9b>] (__irq_svc+0x3b/0x5c)




On Tuesday, July 22, 2014 10:14:24 PM UTC+2, RobertCNelson wrote:

mr.re...@gmail.com

unread,
Jul 19, 2016, 7:26:48 AM7/19/16
to BeagleBoard
Hai friend,
 Please try to execute the command as root user or use sudo command
Reply all
Reply to author
Forward
0 new messages