* 2.6 Kernel not mounting JFFS2 partition
@ 2006-11-16 20:00 Glen Johnson
2006-11-17 12:34 ` Artem Bityutskiy
0 siblings, 1 reply; 8+ messages in thread
From: Glen Johnson @ 2006-11-16 20:00 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: linux-mtd
Artem Bityutskiy wrote:
> Hello Glen,
>
> On Wed, 2006-11-15 at 10:55 -0500, Glen Johnson wrote:
>
>> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000:
>> 0x9b9a instead
>>
>
> Your problem is quite common so you inspired me to add a FAQ entry about
> it. Please, read
>
> http://www.linux-mtd.infradead.org/faq/jffs2.html#L_magicnfound
>
>
Mr. Bityutskiy,
Thank you for your reply. Your FAQ answered a variety of questions for
me. I went back through the process one more time following your
directions and ended up with a Kernel panic. I will walk through exactly
what I did and then at the bottom of this message I will include my
capture log.
After I read your FAQ I looked into which flash type I am using
(AM29LV3200B-90E1) which is a NOR type flash. I then powered up my
target system did the following:
1. "eraseall /dev/mtd2" which ended with "Erased 2048 Kibyte @ 0 -- 100%
complete."
2. cd /var/tmp
3. mkdir jffs2
4. echo 'Hello world' > jffs2/hi.txt
5. mkfs.jffs2 -d jffs2 -o jffs2.img
6. cp jffs2.img /dev/mtd2
As a step of verification I briefly read back the contents of /dev/mtd2.
7. dd if=/dev/mtd2 this produced some weird text, the filename hi.txt,
some more weird text, Hello world!, and finally
a MESS of "ÿÿ". I hit ^C to cut it short. Seeing the hi.txt and Hello
world! gave me the verification that I did
indeed create the jffs2 partition.
8. mount -t jffs2 mtd2 /mnt/ Once again many error messages/info
messages. Finally it died with these last lines:
You cannot use older JFFS2 filesystems with newer kernels
JFFS2 notice: (31) read_unknown: node header CRC failed at 0x18f070. But
it must have been OK earlier.
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000030)
# BUG: failure at fs/jffs2/readinode.c:353/read_unknown()!
Kernel panic - not syncing: BUG!
I keep seeing "You cannot use older JFFS2 filesystems with newer kernel"
however, I am using uClinux's most up to date kernel 2.6.17-uc1. Am I
using an oudated fs/jffs2/readinode.c? My fs/jffs2/readinode.c claims to
be at * $Id: readinode.c,v 1.143 2005/11/07 11:14:41 gleixner Exp $. Any
further thoughts or recommendations would be greatly appreciated.
Capture log listed below :
=================
U-Boot 1.1.2 (Jul 11 2005 - 11:28:55)
CPU: MOTOROLA MCF5272 (Mask:1)
Board: Valcom VIP8XX
DRAM: 16 MB
FLASH: 4 MB
In: serial
Out: serial
Err: serial
Enter password to stop autoboot: 2 1 0
TFTP from server 192.168.11.111; our IP address is 192.168.11.112
Filename 'vcisc-1.03.pkg'.
Load address: 0x200000
Loading: #################################################################
#################################################################
###################################################
done
Bytes transferred = 922096 (e11f0 hex)
Automatic boot of image at addr 0x00200000 ...
## Booting image at 00200000 ...
Image Name:
Image Type: M68K Linux Kernel Image (gzip compressed)
Data Size: 922032 Bytes = 900.4 kB
Load Address: 00020000
Entry Point: 00020000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
Linux version 2.6.17-uc1 (glen@ekul) (gcc version 4.1.1) #8 Tue Nov 14
12:08:38 EST 2006
uClinux/COLDFIRE(m5272)
COLDFIRE port done by Greg Ungerer, gerg@snapgear.com
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
Built 1 zonelists
Kernel command line: rootfstype=romfs
PID hash table entries: 64 (order: 6, 256 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 6036k/8192k RAM, (1011k kernel code, 148k data)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
io scheduler noop registered
io scheduler cfq registered (default)
ColdFire internal UART serial driver version 1.00
ttyS0 at 0x10000100 (irq = 73) is a builtin ColdFire UART
ttyS1 at 0x10000140 (irq = 74) is a builtin ColdFire UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
FEC ENET Version 0.2
fec: PHY @ 0x0, ID 0x001378e2 -- LXT971
eth0: ethernet 00:00:00:00:00:00
SnapGear flash probe(0xffc00000,4194304,1): 400000 at ffc00000
Flash: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 3 MTD partitions on "Flash":
0x00000000-0x00080000 : "Das U-Boot"
0x00080000-0x00200000 : "Kernel"
0x00200000-0x00400000 : "JFFS2"
SnapGear ram probe(0x141fac,798720,4): c3000 at 141fac
Creating 1 MTD partitions on "RAM":
0x00000000-0x000c3000 : "Romfs"
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 48k freed (0x127000 - 0x132000)
init: Failed to open /etc/inittab.# eraseall /dev/mtd2
Erasing 64 Kibyte @ 0 -- 0 % complete.
---------8<------------------8<---------
Cut out lots of the same.
---------8<------------------8<---------
Erased 2048 Kibyte @ 0 -- 100% complete.
# cd /var/tmp
# mkdir jffs2
# echo 'Hello world!' > jffs2/hi.txt
# mkfs.jffs2 -d jffs2 -o jffs2.img
# cp jffs2.img /dev/mtd2
# dd -if=/dev/mtd2
\x19…à\x01^A^@^@^@.N(D^@^@^@^A^@^@^@^@^@^@^@^B8C^SA^F^H^@^XAA^E"O^^ÆQhi.txtÿÿa^B^@^@^@^QE2AO^@^@^@^B^@^@^@^A^@^@^@^^@^@^@^^@^@^@^½Ý¢Ãö¥©kHello
world!
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ\x03^C
# mount -t jffs2 mtd2 /mnt/
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000:
0x007c instead
Further such events for this erase block will not be printed
---------8<------------------8<---------
Cut out lots of the same.
---------8<------------------8<---------
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0024:
0x4a10 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x001fa1ec
You cannot use older JFFS2 filesystems with newer kernels
Old JFFS2 bitmask found at 0x001fda6c
You cannot use older JFFS2 filesystems with newer kernels
JFFS2 notice: (31) read_unknown: node header CRC failed at 0x18f070. But
it must have been OK earlier.
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000030)
# BUG: failure at fs/jffs2/readinode.c:353/read_unknown()!
Kernel panic - not syncing: BUG!
Thank you,
Glen Johnson
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6 Kernel not mounting JFFS2 partition
2006-11-16 20:00 2.6 Kernel not mounting JFFS2 partition Glen Johnson
@ 2006-11-17 12:34 ` Artem Bityutskiy
[not found] ` <455DC28D.30507@valcom.com>
0 siblings, 1 reply; 8+ messages in thread
From: Artem Bityutskiy @ 2006-11-17 12:34 UTC (permalink / raw)
To: Glen Johnson; +Cc: linux-mtd
Hi,
On Thu, 2006-11-16 at 15:00 -0500, Glen Johnson wrote:
> 1. "eraseall /dev/mtd2" which ended with "Erased 2048 Kibyte @ 0 -- 100%
> complete."
At this point it is nice to make sure if the erase functionality works.
Try to read /dev/mtd2 and make sure it contains only 0xFFs.
> 8. mount -t jffs2 mtd2 /mnt/ Once again many error messages/info
> messages. Finally it died with these last lines:
> You cannot use older JFFS2 filesystems with newer kernels
Download newer JFFS2 utilities and use newer mkfs.jffs2. It will
probably solve your problems.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 8+ messages in thread
* 2.6 Kernel not mounting JFFS2 partition.
@ 2006-11-15 15:55 Glen Johnson
2006-11-15 19:27 ` Artem Bityutskiy
0 siblings, 1 reply; 8+ messages in thread
From: Glen Johnson @ 2006-11-15 15:55 UTC (permalink / raw)
To: linux-mtd
Dear linux-mtd,
I have a target system which works fine using MTD and JFFS2 with
the uClinux 2.4.22 kernel. I am attempting to bring up the uClinux
2.6.17 kernel now and am having some problems with mounting the JFFS2
partition. I have tried both recommended procedures for mounting a
JFFS2 partition.
First attempt, I created a JFFS2 image on the target platform,
erased the partition, and then copied the image to the partition.
All seemed well until "mount -t jffs2 /dev/mtdblock2 /mnt" and I
received +3500 lines of error messages.
Second attempt, I created a JFFS2 image on a separate computer,
tftp-ed the image to the target, erased the JFFS2 partition and copied
in the jffs2 image to the partition. What resulted was the same +3500
lines of error messages.
By the way toward the bottom of the list of errors it says "You cannot
use older JFFS2 file systems with newer kernels", so I tried down
loading Red Hats cvs server and used the latest and greatest version
of mkfs.jffs2. Still gave me the same error messages as before.
Can anyone give any recommendations on what I am doing wrong? I know
I'm close to getting it working but I can't seem to find the right
flag to set or whatever it is. Any and all help is greatly appreciated.
Directly below is an abbreviated listing of the errors and just after
this I supplied a boot log to provide context to the target system.
ERROR MESSAGE:
- ----------------------
mount -t jffs2 /dev/mtdblock2 /mnt
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000:
0x9b9a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004:
0x2a04 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008:
0x1ca7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c:
0x2a03 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010:
0x1c2a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014:
0x0022 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018:
0x0415 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c:
0x08a2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020:
0x1d04 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024:
0x2b10 instead
Further such events for this erase block will not be printed
Empty flash at 0x00005014 ends at 0x00005018
Empty flash at 0x00009008 ends at 0x0000900c
Empty flash at 0x00009028 ends at 0x0000902c
- --------8<------------------------8<--------
In the interest of time and space I removed the other
3500 lines like the ones above and below this.
- --------8<------------------------8<--------
Empty flash at 0x001e6384 ends at 0x001e6388
Empty flash at 0x001e6590 ends at 0x001e6594
Empty flash at 0x001efd80 ends at 0x001efdf0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0000:
0x246f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0004:
0x4a8a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0008:
0x202a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f000c:
0xb0aa instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0010:
0x6422 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0014:
0x0004 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0018:
0xd1ea instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f001c:
0x4280 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0020:
0x0008 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f0024:
0x2541 instead
Further such events for this erase block will not be printed
Empty flash at 0x001f2820 ends at 0x001f2824
Empty flash at 0x001f2864 ends at 0x001f2868
Empty flash at 0x001f2878 ends at 0x001f287c
Empty flash at 0x001f2884 ends at 0x001f2888
Empty flash at 0x001f2a90 ends at 0x001f2a94
Empty flash at 0x001f3000 ends at 0x001f3010
Empty flash at 0x001f3024 ends at 0x001f3028
Empty flash at 0x001f3060 ends at 0x001f3064
Empty flash at 0x001f3f7c ends at 0x001f3fe0
Empty flash at 0x001f3fe4 ends at 0x001f4000
Empty flash at 0x001f8528 ends at 0x001f852c
Old JFFS2 bitmask found at 0x001f91ec
You cannot use older JFFS2 filesystems with newer kernels
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 32
mount: Mounting /dev/mtdblock2 on /mnt failed: Input/output error
BOOT LOG:
---------------
U-Boot 1.1.2 (Jul 11 2005 - 11:28:55)
CPU: MOTOROLA MCF5272 (Mask:1)
Board: Valcom VIP8XX
DRAM: 16 MB
FLASH: 4 MB
In: serial
Out: serial
Err: serial
Enter password to stop autoboot: 2 1 0
TFTP from server 192.168.11.111; our IP address is 192.168.11.112
Filename 'vcisc-1.03.pkg'.
Load address: 0x200000
Loading:
*#################################################################
#################################################################
###################################################
done
Bytes transferred = 921780 (e10b4 hex)
Automatic boot of image at addr 0x00200000 ...
## Booting image at 00200000 ...
Image Name:
Image Type: M68K Linux Kernel Image (gzip compressed)
Data Size: 921716 Bytes = 900.1 kB
Load Address: 00020000
Entry Point: 00020000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
Linux version 2.6.17-uc1 (glen at ekul
<http://lists.infradead.org/mailman/listinfo/linux-mtd>) (gcc version
4.1.1) #7 Thu Nov 9
14:17:03 EST 2006
uClinux/COLDFIRE(m5272)
COLDFIRE port done by Greg Ungerer, gerg at snapgear.com
<http://lists.infradead.org/mailman/listinfo/linux-mtd>
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
Built 1 zonelists
Kernel command line: rootfstype=romfs
PID hash table entries: 64 (order: 6, 256 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 6036k/8192k RAM, (1011k kernel code, 148k data)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
io scheduler noop registered
io scheduler cfq registered (default)
ColdFire internal UART serial driver version 1.00
ttyS0 at 0x10000100 (irq = 73) is a builtin ColdFire UART
ttyS1 at 0x10000140 (irq = 74) is a builtin ColdFire UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
FEC ENET Version 0.2
fec: PHY @ 0x0, ID 0x001378e2 -- LXT971
eth0: ethernet 00:00:00:00:00:00
SnapGear flash probe(0xffc00000,4194304,1): 400000 at ffc00000
Flash: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 3 MTD partitions on "Flash":
0x00000000-0x00080000 : "Das U-Boot"
0x00080000-0x00200000 : "Kernel"
0x00200000-0x00400000 : "JFFS2"
SnapGear ram probe(0x141fac,798720,4): c3000 at 141fac
Creating 1 MTD partitions on "RAM":
0x00000000-0x000c3000 : "Romfs"
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 48k freed (0x127000 - 0x132000)
init: Failed to open /etc/inittab.#
Thanks,
Glen Johnson
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-11-17 16:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-16 20:00 2.6 Kernel not mounting JFFS2 partition Glen Johnson
2006-11-17 12:34 ` Artem Bityutskiy
[not found] ` <455DC28D.30507@valcom.com>
2006-11-17 14:21 ` Artem Bityutskiy
2006-11-17 16:28 ` Glen Johnson
2006-11-17 16:34 ` Artem Bityutskiy
2006-11-17 16:39 ` Glen Johnson
-- strict thread matches above, loose matches on Subject: below --
2006-11-15 15:55 Glen Johnson
2006-11-15 19:27 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).