From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Fri, 18 Jul 2014 13:35:23 +0200 (CEST) Received: by mail-wi0-f179.google.com with SMTP id f8so681940wiw.0 for ; Fri, 18 Jul 2014 04:35:22 -0700 (PDT) Message-ID: <53C90676.2060501@gmail.com> Date: Fri, 18 Jul 2014 13:35:18 +0200 From: Milan Broz MIME-Version: 1.0 References: <1405636940.30842.YahooMailNeo@web140602.mail.bf1.yahoo.com> In-Reply-To: <1405636940.30842.YahooMailNeo@web140602.mail.bf1.yahoo.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] LUKS on a jffs2 partition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Joe Dougherty , "dm-crypt@saout.de" Cc: device-mapper development On 07/18/2014 12:42 AM, Joe Dougherty wrote: > I have a small embedded device with a raw nand flash using jffs2 > filesystem. I want to create a luks container on one of the jffs2 > partitions. Everything seems to work fine until I try to mount the > file system and I receive the error shown below. Here are the > commands I used to set this up: > cryptsetup luksFormat /dev/mtdblock4 --cipher=aes-cbc-essiv:sha256 > cryptsetup luksOpen /dev/mtdblock4 efs > At this point I can perform luksDump and all looks OK and the /dev/mapper/efs exists. So I continue to create filesystem: > mkfs.jffs2 -p -l --eraseblock=0x20000 --no-cleanmarkers --pagesize=0x800 -r ./userdata -o /dev/mapper/efs > Now the mount fails: > mount -o loud -t jffs2 /dev/mapper/efs /mnt > MTD: Attempt to mount non-MTD device "/dev/mapper/efs" > mount: mounting /dev/mapper/efs on /mnt failed: Invalid argument > > I have used similar commands successfully for non-jffs2 filesystems. Is this possible with jffs2? Any help appreciated. > Here's some additional version info: > cryptsetup --version > cryptsetup 1.6.2 > dmsetup --version > Library version: 1.02.76 (2012-08-07) > Driver version: 4.20.0 > uname -a > Linux m-1138 3.0.15+m-1138+gecbbdf0 #1 Tue Jul 8 08:57:12 MST 2014 armv7l GNU/Linux As you already found, there is a similar bug report https://code.google.com/p/cryptsetup/issues/detail?id=203 In this case it is almost for sure kernel bug, so maybe reporting it to appropriate kernel list (perhaps jffs related) would be better. (Adding dm-devel, maybe someone could help as well.) Milan