View Single Post
tolou's Avatar
Posts: 87 | Thanked: 1 time | Joined on Mar 2006
#195
Originally Posted by fanoush View Post
When I like current stable system in flash (after clean reflashing and tweaking it a bit) I boot from mmc and do a backup
Code:
mount -t jffs2 /dev/mtdblock4 /opt
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
umount /opt
then when I want to restore system in flash I boot from mmc and do
Code:
./flash_eraseall -j /dev/mtd4
./nandwrite -a -p /dev/mtd4 /media/mmc1/rootfs.jffs2
Be sure to use correct device name (/dev/mtd4 for rootfs) and never ever use -j option of nandwrite. Also never ever erase or flash /dev/mtd1 or mtd0. By doing this you can seriously screw your device to the point that reflashing will not help you (and won't be posible at all).
Iīm currently running the system on MMC only and wonder how I can restore the backup to the card instead, in case I will need this in the future. Whatīs the (short?)device name for the boot partition, /dev/mmcblk0p2 or what?

I also concerned about the different filesystems as I have the ext2 on the card. Having run the
Code:
mount /dev/mmcblk0p2 /opt
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
produced what seems to be a compressed image of my card. But can I really mix the system types like this? What happens when I want to restore the jff2 image to my ext2 card again?
Can I run something like this from the flash system then even though itīs ext2?
Code:
./flash_eraseall -j /dev/mmcblk0p2
./nandwrite -a -p /dev/mmcblk0p2 /media/mmc1/rootfs.jffs2
__________________
Naboo
__________________