From: Saravanan Chanemouganandam <schane@osmozis.com>
To: linux-mtd@lists.infradead.org
Subject: transfer jffs2 rootFS to Nand flash
Date: Wed, 29 Aug 2007 16:10:50 +0200 [thread overview]
Message-ID: <200708291610.50617.schane@osmozis.com> (raw)
Hi all,
I am fascing problem in mounting jffs2 root file system on the cm-x270 board
after flashing the jffs2 root file system image on to the MTD Nand partition
with the following steps....
1. boot cm-x270 with NAND, NOR and JFFS2 drivers built into kernel
2. mounted root file system via "nfs"
3. checked the partitions
cm-debian:~# cat /proc/partitions
major minor #blocks name
254 0 513576 nand
31 0 4096 mtdblock0 ( NOR)
31 1 524288 mtdblock1 (NAND)
cm-debian:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00010000 "phys_mapped_flash"
mtd1: 20000000 00020000 "cmx270-0"
cm-debian:~#
4. cm-debian:~#flash_eraseall -j /dev/mtd1
5. on the host created jffs2 rootfs image using #mkfs.jffs2 -r cmrootfs -n -o
cmrootfs.img -e 0x20000 --pad=0x20000000
6. copied cmrootfs.img to the cm-x270 board
7. on the cm-x270, flashed rootfs image using mtd-utilities
cm-debian:~# nandwrite /dev/mtdblock1 /mnt/net/cmrootfs.img
.....
Writing data to block 1ffe0000
Data did not fit into device, due to bad blocks
: Success
cm-debian:~#
8. Tested the jffs2 rootFS using mount
cm-debian:~# mount -t jffs2 /dev/mtdblock1 /mnt/test
cm-debian:/mnt/net# ls /mnt/test
bin dev home lib media opt proc sbin sys usr
boot etc initrd lost+found mnt packages.txt root srv tmp var
After reboot, I am getting the kernel panic with boot option for root as
root=/dev/mtdblock1 rootfstype=jffs2"
...
...
IP-Config: Complete:
device=eth0, addr=192.168.6.202, mask=255.255.255.0, gw=192.168.6.1,
host=cm-x270, domain=, nis-domain=(none),
bootserver=192.168.6.1, rootserver=192.168.6.1, rootpath=
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 8, c->nr_blocks 4096
VFS: Cannot open root device "mtdblock1" or unknown-block(31,1)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(31,1)
Could anyone please tell me where I am wrong ? and why is the JFFS doesn't
mount the file system?
Thanks
Sara
next reply other threads:[~2007-08-29 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 14:10 Saravanan Chanemouganandam [this message]
2007-08-29 14:42 ` transfer jffs2 rootFS to Nand flash Ricard Wanderlof
[not found] ` <200708301345.36832.schane@osmozis.com>
2007-08-30 11:51 ` Ricard Wanderlof
[not found] ` <200708301655.54224.schane@osmozis.com>
2007-08-30 15:09 ` Ricard Wanderlof
2007-08-30 15:58 ` Saravanan Chanemouganandam
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=200708291610.50617.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