From: Saravanan Chanemouganandam <schane@osmozis.com>
To: linux-mtd@lists.infradead.org
Subject: dual jffs2 mtd partition problem
Date: Tue, 6 Nov 2007 16:30:58 +0100 [thread overview]
Message-ID: <200711061630.59674.schane@osmozis.com> (raw)
Hi all,
I am fascing problem while updating a "Jffs2 root filesystem" on my cm-x270
arm target board. The board has bootloader on the NOR and statically defined
dual Jffs2 partitions on the NAND devices for the root filesystem.
cm-debian:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00010000 "phys_mapped_flash"
mtd1: 00200000 00020000 "OsmoConfig"
mtd2: 0fa00000 00020000 "rootfs_1"
mtd3: 10600000 00020000 "rootfs_2"
For an update rootfs process, I perform the following procedure...
A flash updating scheme employing 2 JFFS2 partitions, allowing to update one
while running the other.
For example, if I am running with mtdblock2 as main root filesystem in ro,
when I want to update my root, I can program the new image into mtdblock3 and
then switch the root filesystem to mtdblock3 when I reboot (by specifying in
the kernel cmdling as root=/dev/mtdblock3 ). The next time I update, the
process would be reversed (program and switch to /dev/mtdblock2).
So, during an update process, if any failure occurs in the middle ( like power
failure or write error), the system should boot with the old rootfs
partition. The problem is that during an update rootfs, when I power down the
board, on reboot the board throws a "kernel panic" error
...
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to
kernel.
Analysing the MTD partitions by mounting via nfs on the host shows the
partitions got erased partially and hence the kernel panic.
Can anyboby precise me, how come the current rootfs partition getting erased
when theres is an error while updating the alternate partition. ?
Thanks
Sara
reply other threads:[~2007-11-06 15:31 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=200711061630.59674.schane@osmozis.com \
--to=schane@osmozis.com \
--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