From: Joseph Cheek <joseph.cheek@timesys.com>
To: "Linux Users list. Open to all LinuxLink subscribers."
<linux-users-list@lists.timesys.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [linux-users-list] Data loss on unclean powercycle with JFFS2/NAND
Date: Wed, 17 Dec 2008 23:43:37 -0500 [thread overview]
Message-ID: <4949D4F9.4000709@timesys.com> (raw)
In-Reply-To: <705901BA1DF18142AB3DE716DDF374F801FBD840@CBA0E2K03.CBA0.centerbeam.com>
Hi Manu,
I don't know about the JFFS2 issue, but does this sed need to happen
dynamically? Can you instead just ship the pre-modified inittab?
If not, you could possibly try sed -i (inplace edit) if you are using
sed proper and not busybox sed. That might shorten the amount of time
in which inittab is in an in-between state.
Thanks!
Joseph Cheek, joseph.cheek@timesys.com
Packaging Technologies Team Lead
TimeSys Corp., www.timesys.com
Manu Rao wrote:
> We have an embedded system with ARM9, running linux 2.6.22 and jffs2 on
> Samsung nand.
> As part of our bootup process, we modify the /etc/inittab so that the
> getty login screen is replaced with our application.
>
> if sed "/^#*T0/cT0:23:respawn:/sbin/getty -L -n -l /our_app/app ttyS0"
> /etc/inittab > /etc/inittab_tmp; then
> mv /etc/inittab_tmp /etc/inittab
>
> We have recently discovered units where the inittab suddenly becomes a
> zero-length file. My conjecture was that this had to do with the
> write-buffering, and when I add a sync after the move, it helps
> somewhat.
>
> The way I understood jffs2, if we have a FileA that is being replaced
> with a FileB, we should always have access to either FileA or FileB. But
> without any doubt, inittab is getting zeroed out.
>
> How does a move in the Filesystem occur? How can the size become zero?
>
> Any pointers appreciated.
>
> Thanks
> Manu Rao
> San Jose, CA
>
> _______________________________________________
> linux-users-list mailing list
> linux-users-list@lists.timesys.com
> https://lists.timesys.com/listinfo/linux-users-list
>
next prev parent reply other threads:[~2008-12-18 4:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-18 0:48 Data loss on unclean powercycle with JFFS2/NAND Manu Rao
2008-12-18 4:43 ` Joseph Cheek [this message]
2008-12-18 18:25 ` [linux-users-list] " Manu Rao
2008-12-19 17:46 ` Kootsookos, Peter J UTCFS
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=4949D4F9.4000709@timesys.com \
--to=joseph.cheek@timesys.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-users-list@lists.timesys.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