From: Aras Vaichas <arasv@magtech.com.au>
To: MTD-LIST <linux-mtd@lists.infradead.org>
Subject: problem updating jffs2 rootfs partition
Date: Mon, 19 Jan 2009 15:03:28 +1100 [thread overview]
Message-ID: <4973FB90.5080309@magtech.com.au> (raw)
Hi, I need to update a jffs2 root partition on a running system.
I'm using a statically linked version of flash_eraseall and nandwrite to
prepare the NAND chip and then write a jffs2 image on to it.
This is what I do:
* ftp the upgrade script onto the device, and run the install script
which does:
* copy all the installation files to a tmpfs /tmp directory
* kill all non-essential processes, and those that are accessing the
root partition (like syslogd)
* 'umount /' which remounts root as read-only
* flash_eraseall
* nandwrite
* reboot
The problem is that sometimes I get jffs2 errors, and sometimes the
upgrade fails due to corruption of the nand.
During a nandwrite I will sometimes get errors like this:
...
Writing data to block 4f0000
Writing data to block 4f4000
jffs2_flush_wbuf(): Write failed with -5
Write of 71 bytes at 0x004f01f8 failed. returned -5, retlen 0
Not marking the space at 0x004f01f8 as dirty because the flash driver
returned retlen zero
jffs2_flush_wbuf(): Write failed with -5
Write of 71 bytes at 0x004ec1f8 failed. returned -5, retlen 0
Not marking the space at 0x004ec1f8 as dirty because the flash driver
returned retlen zero
Node CRC ffffffff != calculated CRC f09e7845 for node at 00ef7b4c
jffs2_flush_wbuf(): Write failed with -5
...
Writing data to block 5fc000
Writing data to block 600000
mtd->read(0x1000 bytes from 0x480000) returned ECC error
Newly-erased block contained word 0xe0021985 at offset 0x00480000
mtd->read(0x1000 bytes from 0x4a8000) returned ECC error
Newly-erased block contained word 0xe0021985 at offset 0x004a8000
mtd->read(0x1000 bytes from 0x4cc000) returned ECC error
Newly-erased block contained word 0xe0021985 at offset 0x004cc000
Header CRC failed on REF_PRISTINE node at 0x01d08fc8: Read 0xffffffff,
calculated 0x44660075
JFFS2 notice: (45) read_unknown: node header CRC failed at 0x1d0a100.
But it must have been OK earlier.
JFFS2 notice: (45) read_unknown: node header CRC failed at 0x1d09b0c.
But it must have been OK earlier.
JFFS2 notice: (45) read_unknown: node header CRC failed at 0x1d095bc.
But it must have been OK earlier.
JFFS2 notice: (45) read_unknown: node header CRC failed at 0x1d08fc8.
But it must have been OK earlier.
JFFS2 warning: (45) jffs2_do_read_inode_internal: no data nodes found
for ino #151
Eep. read_inode() failed for ino #151. nlink 1
Writing data to block 604000
Writing data to block 608000
...
What is happening, and how can I avoid it?
Is the problem that jffs2 is performing garbage collection on the root
partition?
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
reply other threads:[~2009-01-19 4:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4973FB90.5080309@magtech.com.au \
--to=arasv@magtech.com.au \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox