[Yaffs] Problem mounting nanddump yaffs2 image

Top Page
Attachments:
Message as email
+ (text/plain)
+ proc_mtd.txt (text/plain)
+ proc_yaffs.txt (text/plain)
+ signature.asc (application/pgp-signature)
Delete this message
Reply to this message
Author: Dominic Chen
Date:  
To: yaffs
Subject: [Yaffs] Problem mounting nanddump yaffs2 image
Hello,

I'm trying to mount a yaffs2 image taken from an Android device, but
unfortunately after mounting it with nandsim, the only thing that I see
is the lost+found directory. Since some people on this mailing list have
reported success doing something similar, I'd appreciate it if they
could tell me what I'm doing wrong.

To capture the image, I cross-compiled mtd-utils and pushed it to the
device, then ran "nanddump -o /dev/mtd/mtdX | gzip > /sdcard/mtdX.nd.gz"
on each mtd character device, and copied the resulting image back over
to a Ubuntu machine. I've attached the results of /proc/mtd and
/proc/yaffs on Android, if that information is helpful.

To mount the image, I first had to compile yaffs2multi, followed by
"modprobe mtdblock", "modprobe nandsim first_id_byte=0x20
second_id_byte=0xac third_id_byte=0x00 fourth_id_byte=0x15", and then
"modprobe yaffs2multi". After that, I erased the flash on the simulator
with "flash_erase /dev/mtd0 0 4096", then wrote the image with
"nandwrite -a -r /dev/mtd0 ./mtdX.nd" (after gunzip). But when I mount
the simulator with "mount -t yaffs2 -o
no-checkpoint-read,tags-ecc-off,empty-lost-and-found-off /dev/mtdblock0
/mnt/temp/", all I see is the lost+found directory, and /proc/yaffs
shows that the file chunks aren't being recognized. I've tried using dd
instead of nandwrite, but still no success. What am I doing wrong?

Thanks,

Dominic
dev: size erasesize name
mtd0: 000a0000 00020000 "misc"
mtd1: 00420000 00020000 "recovery"
mtd2: 002c0000 00020000 "boot"
mtd3: 0f000000 00020000 "system"
mtd4: 05000000 00020000 "cache"
mtd5: 09120000 00020000 "userdata"Multi-version YAFFS built:Apr 21 2011 20:3


Device 0 "system"
start_block.......... 0
end_block............ 1919
total_bytes_per_chunk 2048
use_nand_ecc......... 1
no_tags_ecc.......... 1
is_yaffs2............ 1
inband_tags.......... 0
empty_lost_n_found... 0
disable_lazy_load.... 0
refresh_period....... 500
n_caches............. 10
n_reserved_blocks.... 5
always_check_erased.. 0

data_bytes_per_chunk. 2048
chunk_grp_bits....... 0
chunk_grp_size....... 1
n_erased_blocks...... 797
blocks_in_checkpt.... 2

n_tnodes............. 5519
n_obj................ 987
n_free_chunks........ 54308

n_page_writes........ 122
n_page_reads......... 21781
n_erasures........... 2
n_gc_copies.......... 0
all_gcs.............. 0
passive_gc_count..... 0
oldest_dirty_gc_count 0
n_gc_blocks.......... 0
bg_gcs............... 0
n_retired_writes..... 0
n_retired_blocks..... 0
n_ecc_fixed.......... 0
n_ecc_unfixed........ 0
n_tags_ecc_fixed..... 0
n_tags_ecc_unfixed... 0
cache_hits........... 0
n_deleted_files...... 0
n_unlinked_files..... 2
refresh_count........ 0
n_bg_deletions....... 0

Device 2 "userdata"
start_block.......... 0
end_block............ 1160
total_bytes_per_chunk 2048
use_nand_ecc......... 1
no_tags_ecc.......... 1
is_yaffs2............ 1
inband_tags.......... 0
empty_lost_n_found... 0
disable_lazy_load.... 0
refresh_period....... 500
n_caches............. 10
n_reserved_blocks.... 5
always_check_erased.. 0

data_bytes_per_chunk. 2048
chunk_grp_bits....... 0
chunk_grp_size....... 1
n_erased_blocks...... 180
blocks_in_checkpt.... 0

n_tnodes............. 5545
n_obj................ 1717
n_free_chunks........ 11717

n_page_writes........ 117773
n_page_reads......... 97950
n_erasures........... 2091
n_gc_copies.......... 58720
all_gcs.............. 12404
passive_gc_count..... 12404
oldest_dirty_gc_count 1136
n_gc_blocks.......... 1416
bg_gcs............... 1416
n_retired_writes..... 0
n_retired_blocks..... 0
n_ecc_fixed.......... 0
n_ecc_unfixed........ 0
n_tags_ecc_fixed..... 0
n_tags_ecc_unfixed... 0
cache_hits........... 9670
n_deleted_files...... 0
n_unlinked_files..... 5460
refresh_count........ 3
n_bg_deletions....... 0

Device 4 "cache"
start_block.......... 0
end_block............ 639
total_bytes_per_chunk 2048
use_nand_ecc......... 1
no_tags_ecc.......... 1
is_yaffs2............ 1
inband_tags.......... 0
empty_lost_n_found... 0
disable_lazy_load.... 0
refresh_period....... 500
n_caches............. 10
n_reserved_blocks.... 5
always_check_erased.. 0

data_bytes_per_chunk. 2048
chunk_grp_bits....... 0
chunk_grp_size....... 1
n_erased_blocks...... 356
blocks_in_checkpt.... 1

n_tnodes............. 1378
n_obj................ 104
n_free_chunks........ 22876

n_page_writes........ 179
n_page_reads......... 11871
n_erasures........... 3
n_gc_copies.......... 143
all_gcs.............. 29
passive_gc_count..... 29
oldest_dirty_gc_count 2
n_gc_blocks.......... 2
bg_gcs............... 2
n_retired_writes..... 0
n_retired_blocks..... 0
n_ecc_fixed.......... 0
n_ecc_unfixed........ 0
n_tags_ecc_fixed..... 0
n_tags_ecc_unfixed... 0
cache_hits........... 0
n_deleted_files...... 0
n_unlinked_files..... 71
refresh_count........ 1
n_bg_deletions....... 0