[uClinux-dev] Problems mounting a JFFS2 file system

Kjell Uddeborg kjell at cablescan.com
Wed Mar 5 12:48:03 EST 2003


Hi Phil,

Thanks for your reply. I think I know what is going on now. It's related to running both blkmem and MTD at the same time. Both the /dev/mtdblock devices and the /dev/rom devices have the same major device ID. I will try to fix the problem by changing the device ID for the mtdblocks.

The /proc/mtd file looks like this:

  /> cat /proc/mtd
  dev:    size   erasesize  name
  mtd0: 000c0000 00010000 "kernel (768K)"
  mtd1: 00100000 00010000 "rootfs (1024K)"
  mtd2: 00002000 00002000 "environment (8K)"

It's interesting what you say about the garbage collection. Looks like the sector size is 64k. Five sectors would be 320k. Do you know if this means that you have to have this much space free for the garbage collection or it it's enough that your partition is of this size or greater. Is it possible to change the sector size?

Thanks for your help,
Kjell Uddeborg



-----Original Message-----
From: uclinux-dev-admin at uclinux.org
[mailto:uclinux-dev-admin at uclinux.org]On Behalf Of Phil Wilshire
Sent: Tuesday, March 04, 2003 2:17 PM
To: uclinux-dev at uclinux.org
Subject: Re: [uClinux-dev] Problems mounting a JFFS2 file system


Hi Kjell
Could you do a 
cat /proc/mtd 
so that we can check your mtd partitions.

jffs2 needs quite a large number of sectors ( 5 for GC )

try the same with regular jffs.


regards
  Phil Wilshire

Kjell Uddeborg wrote:
> 
> Hi,
> 
> I'm having some problems mounting a JFFS2 file system. I'm using uClinux kernel 2.4 on a Motorola M5249C3 board.
> 
> I think that I have all MTD stuff configured correctly and I can erase the device /dev/mtd1 with no problem, see screen dump:
> 
> -----------------------------
> /> eraseall /dev/mtd1
> MTD_open
> MTD_ioctl
>  0raTsiDng_ 6i4 oKicbyttel @
>  1raTsiDng_ 6i4 oKicbyttel @
>  2raTsiDng_ 6i4 oKicbyttel @
>  3raTsiDng_ 6i4 oKicbyttel @
>  4raTsiDng_ 6i4 oKicbyttel @
>  5raTsiDng_ 6i4 oKicbyttel @
>  6raTsiDng_ 6i4 oKicbyttel @
>  7raTsiDng_ 6i4 oKicbyttel @
>  8raTsiDng_ 6i4 oKicbyttel @
>  9raTsiDng_ 6i4 oKicbyttel @
>  araTsiDng_ 6i4 oKicbyttel @
>  braTsiDng_ 6i4 oKicbyttel @
>  craTsiDng_ 6i4 oKicbyttel @
>  draTsiDng_ 6i4 oKicbyttel @
>  eraTsiDng_ 6i4 oKicbyttel @
>  fraTsiDng_ 6i4 oKicbyttel @
> @ raTseDd _10c24l Koibsytee
>   0 -- 100% complete.
> -----------------------------
> 
> As you can see I have all the debug outputs turned on. Looks to me that the command completed successfully.
> 
> The problem occurs when I try to mount the JFFS2 file system, see screen dump:
> 
> -----------------------------
> /> mount -t jffs2 /dev/mtdblock1 /mnt/jffs2
> arena open of 1 failed!
> mount: Mounting /dev/mtdblock1 on /mnt/jffs2 failed: No such device
> pid 28: failed 256
> -----------------------------
> 
> The /dev/mtdblock1 is exists, see this partial listing on /dev:
> 
> -----------------------------
> /> ls -l /dev
> .
> .
> crw-------  1 0        0         90,   0  Jan 01 1970  mtd0
> crw-------  1 0        0         90,   2  Jan 01 1970  mtd1
> crw-------  1 0        0         90,   4  Jan 01 1970  mtd2
> crw-------  1 0        0         90,   6  Jan 01 1970  mtd3
> brw-------  1 0        0         31,   0  Jan 01 1970  mtdblock0
> brw-------  1 0        0         31,   1  Jan 01 1970  mtdblock1
> brw-------  1 0        0         31,   2  Jan 01 1970  mtdblock2
> brw-------  1 0        0         31,   3  Jan 01 1970  mtdblock3
> crw-------  1 0        0         90,   1  Jan 01 1970  mtdr0
> crw-------  1 0        0         90,   3  Jan 01 1970  mtdr1
> crw-------  1 0        0         90,   5  Jan 01 1970  mtdr2
> crw-------  1 0        0         90,   7  Jan 01 1970  mtdr3
> .
> .
> -----------------------------
> 
> If you have any thoughts of what could be causing this problem please send me a note.
> 
> Thanks for your help,
> Kjell Uddeborg
> Cablescan
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org

-- 
SDCS -- System Design & Consulting Services LLC, http://www.sysdcs.com
** Embedded Linux Training **  email me for details  
630 Springhouse Sq., Leesburg VA 20175 t: 703 669 9766 f: 703 669 9768
_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org




More information about the uClinux-dev mailing list