MTD and jffs2 mount problem on Linux-2.6.23 rc2

Grant Erickson gerickson at nuovations.com
Tue Mar 4 12:14:36 EST 2008


On 3/4/08 2:34 AM, Dach Miroslaw wrote:
> I have created on my target board the jffs2 image which is foreseen to be
> place on /dev/mtd3:
> 
> ./mkfs.jffs2 --pad=0xA0000 --eraseblock=0x20000 --root=TEST-DIR
> --output=image2.jffs2
> flash_erase /dev/mtd3
> dd if=./image2.jffs2 of=/dev/mtd3 bs=2 count=327680
> 
> Up to this point all went fine.
> 
> The problem emerged when I have tried to mount the jffs2 partition:
> mkdir /mnt
> mount -t jffs2 /dev/mtdblock3  /mnt

Dach:

Based on recent experience, I found the following to work with my board and
a 2.6.25-rc2 kernel:

% mkfs.jffs2 -n -e 16 KiB -b -d /export/haleakala -n -o root.img -s 512 -p
  512

# flash_eraseall -q /dev/mtd9
# nandwrite -q /dev/mtd9 root.img
# mount -t jff2 /dev/mtdblock9 /import

So, based on your steps above, it looks like you might meet success by
replacing 'flash_erase' with 'flash_eraseall' and 'dd' with 'nandwrite'.

Regards,

Grant Erickson





More information about the linux-mtd mailing list