public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: angelo <angelo70@gmail.com>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Cc: Ricard Wanderlof <ricard.wanderlof@axis.com>
Subject: Re: help request, jffs2 fs files get lost
Date: Mon, 02 May 2011 10:43:46 +0200	[thread overview]
Message-ID: <4DBE6EC2.5020008@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1105020853440.15966@lnxricardw.se.axis.com>

On 02/05/2011 08:55, Ricard Wanderlof wrote:
>
> On Sun, 1 May 2011, Angelo Dureghello wrote:
>
>> So from uClinux, i try to prepare the jffs2 fs:
>>
>> # eraseall /dev/mtd2
>> erased 1024 Kibyte @ 0 -- 100% complete.
>>
>> cat /dev/mtd2    i see the flash has been cleared
>>
>> then i create a folder "backup" in /var with some files and try to 
>> crete the jffs2 fs:
>>
>> mkfs.jffs2 -d backup -o jffs2.img
>>
>> cp /deV/mtd2 jffs2.img
>
> If this is in fact what you're doing, you're overwriting your 
> jffs2.img file with the all-ff's contents of the newly erased 
> /dev/mtd2. Swap the two arguments instead.
>
> /Ricard

Hi Ricard,
sorry, was late and just appended a bad had-written text,

i generally do "cp jffs2.img /dev/mtd2", and after mounting mtdblock2 i 
see correctly the root tree.

I did some other tests:
if i mount the new created jffs2 and unmount it, nothing is lost.
If i mount it, open a file, append some text, close it and unmount, then 
at the next mount everything is disapperaed (checking mtd2, all is set 
to 0xff).

Saving modified files i notice a warning:
Writing files is also notice some MTD debug trace, maybe an error:
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000074)


many thanks,
angelo


-- 

  .:.:.SYSAM.:.:.

   di Angelo Dureghello
     via San Nazario 149
       34151, Trieste, Italy
     ++39 340 7631990
   www.sysam.it  <http://www.sysam.it>

  reply	other threads:[~2011-05-02  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01 11:35 help request, jffs2 fs files get lost Angelo Dureghello
2011-05-02  6:55 ` Ricard Wanderlof
2011-05-02  8:43   ` angelo [this message]
     [not found]   ` <4DBE6BCD.3050400@gmail.com>
2011-05-02  8:58     ` Ricard Wanderlof
2011-05-02  9:16       ` angelo

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=4DBE6EC2.5020008@gmail.com \
    --to=angelo70@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ricard.wanderlof@axis.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