* jffs2 filesystem
@ 2002-09-18 3:53 Paul Wong
2002-09-18 6:05 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: Paul Wong @ 2002-09-18 3:53 UTC (permalink / raw)
To: linux-mtd
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.
Paul
****************************************************************************
***
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.
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#
****************************************************************
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: jffs2 filesystem
2002-09-18 3:53 jffs2 filesystem Paul Wong
@ 2002-09-18 6:05 ` Thomas Gleixner
2002-09-18 8:04 ` paul
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2002-09-18 6:05 UTC (permalink / raw)
To: Paul Wong, linux-mtd
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: jffs2 filesystem
2002-09-18 6:05 ` Thomas Gleixner
@ 2002-09-18 8:04 ` paul
2002-09-18 8:46 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: paul @ 2002-09-18 8:04 UTC (permalink / raw)
To: tglx, linux-mtd
----- Original Message -----
From: "Thomas Gleixner" <tglx@linutronix.de>
To: "Paul Wong" <paul.wong@digitalview.com>; <linux-mtd@lists.infradead.org>
Sent: Wednesday, September 18, 2002 2:05 PM
Subject: Re: jffs2 filesystem
> 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. \
yes, I use the samsung 16MB NAND flash.
>
> > 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
should "mount -t jffs2 /dev/mtdblock1 /mnt/bla" ?
> and copy your data to the filesystem.
>
> 2. Use a bootloader utility, which skips the bad block.
any bootloader utility recommend? is LILO or GRUB?
>
> 3. Write a small utility, which can handle bad blocks
is the utility compile with the nand driver?
thanks Thomas.
Paul
>
> --
> Thomas
> ____________________________________________________
> linutronix - competence in embedded & realtime linux
> http://www.linutronix.de
> mail: tglx@linutronix.de
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: jffs2 filesystem
2002-09-18 8:04 ` paul
@ 2002-09-18 8:46 ` Thomas Gleixner
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2002-09-18 8:46 UTC (permalink / raw)
To: paul, linux-mtd
On Wednesday 18 September 2002 10:04, paul@maypaul.com wrote:
> should "mount -t jffs2 /dev/mtdblock1 /mnt/bla" ?
Sure, sorry.
> > and copy your data to the filesystem.
> > 2. Use a bootloader utility, which skips the bad block.
> any bootloader utility recommend? is LILO or GRUB?
Neither LILO nor GRUB support this AFAIK
> > 3. Write a small utility, which can handle bad blocks
> is the utility compile with the nand driver?
No it has to be a user space application. I'm not sure, if it is possible to
do it right now with the existing library functions. I will check this today
in the afternoon
--
Thomas
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-18 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-18 3:53 jffs2 filesystem Paul Wong
2002-09-18 6:05 ` Thomas Gleixner
2002-09-18 8:04 ` paul
2002-09-18 8:46 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox