MTD and jffs2 mount problem on Linux-2.6.23 rc2

Dach Miroslaw miroslaw.dach at psi.ch
Thu Mar 6 02:48:46 EST 2008


Hi Jorn,

I have followed your idea with block2mtd.

The steps I have done are as following:
# mkdir /mnt
# ./mkfs.jffs2 -n --pad=0xA0000 --eraseblock=0x20000 --root=MTEST-PC-M24 --output=image2.jffs2
# losetup /dev/loop0 image2.jffs2
# insmod block2mtd block2mtd=/dev/loop0,640ki

[ 2715.317777] block2mtd: mtd4: [d: /dev/loop0] erase_size = 640KiB [655360]

# mount -t jffs2 /dev/mtdblock4 /mnt
                                                                                
[ 2725.702309] jffs2: Too few erase blocks (1)
mount: mounting mtd4 on /mnt failed

I have no idea what is the meaning of "Too few erase blocks".

Best Regards

M.






-----Original Message-----
From: Jörn Engel [mailto:joern at logfs.org]
Sent: Wed 3/5/2008 2:50 PM
To: Dach Miroslaw
Cc: Jörn Engel; Schlägl Manfred jun.; linux-mtd at lists.infradead.org; Grant Erickson
Subject: Re: MTD and jffs2 mount problem on Linux-2.6.23 rc2
 
On Wed, 5 March 2008 14:44:45 +0100, Dach Miroslaw wrote:
> 
> Thank you for the hint. I have recompiled the kernel with built-in block2mtd driver.
> 
> Do you know where to find some examples how to use block2mtd with jffs2 image.

I don't.  If someone wants to write some documentation, I'd gladly add
it.

But I believe this should do the trick:
echo block2mtd=/dev/loop0 > /sys/modules/block2mtd/parameters/block2mtd
or to explicitly set the erase size:
echo block2mtd=/dev/loop0,128KiB > /sys/modules/block2mtd/parameters/block2mtd

Jörn

-- 
The story so far:
In the beginning the Universe was created.  This has made a lot
of people very angry and been widely regarded as a bad move.
-- Douglas Adams




More information about the linux-mtd mailing list