From: Thomas Gleixner <tglx@linutronix.de>
To: Paul Wong <paul.wong@digitalview.com>, linux-mtd@lists.infradead.org
Subject: Re: jffs2 filesystem
Date: Wed, 18 Sep 2002 08:05:32 +0200 [thread overview]
Message-ID: <200209180805.33027.tglx@linutronix.de> (raw)
In-Reply-To: <005601c25ec7$0b5f8f30$9000010a@paulwong>
On Wednesday 18 September 2002 05:53, Paul Wong wrote:
> Hi! all,
> I have a problem about the jffs2 file system. Pls. refer below message.
> If the i/o error occur in eraseall process, is the jffs2 fs corrupted if i
> copy the jffs2 image to /dev/mtd1 ? Does the "dd" or "cp" take care the i/o
> error? thanks.
> bash-2.04# eraseall /dev/mtd1
> Erasing 16 Kibyte @ f0000 -- 9 % compnand_erase: attempt to erase a bad
> block a
> t page 0x00003d20
> Erasing 16 Kibyte @ 1a4000 -- 16 % complete.
> eraseall: /dev/mtd1: MTD Erase failure: Input/output error
> Erased 10240 Kibyte @ 0 -- 100% complete.
I assume, you are using NAND flash. Your chip has a factory marked bad block.
> bash-2.04# dd if=jffs2.img of=/dev/mtd1 bs=1k
> dd: writing `/dev/mtd1': Bad address
> 3607+1 records in
> 3607+0 records out
> bash-2.04#
dd / cp don't know about bad blocks. But the NAND-driver refuses to write to
this block.
Solutions:
1. Mount your device after erasall with
mount -t jffs2 /dev/mtd1 /mnt/bla
and copy your data to the filesystem.
2. Use a bootloader utility, which skips the bad block.
3. Write a small utility, which can handle bad blocks
--
Thomas
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
next prev parent reply other threads:[~2002-09-18 6:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-18 3:53 jffs2 filesystem Paul Wong
2002-09-18 6:05 ` Thomas Gleixner [this message]
2002-09-18 8:04 ` paul
2002-09-18 8:46 ` Thomas Gleixner
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=200209180805.33027.tglx@linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-mtd@lists.infradead.org \
--cc=paul.wong@digitalview.com \
/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