OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Extract Or Mount A Nand Image?, is it possible?
xamindar
post Jul 18 2008, 12:24 AM
Post #1





Group: Members
Posts: 803
Joined: 30-March 04
From: California
Member No.: 2,368



I have a NAND backup of my zaurus that will not restore for some reason back to my zaurus. It is the same exact size as any other NAND image so I assume the data must still be in there. Hopefully there is a way to get it out.

Anyone know of a way to extract it on a linux machine or to even mount the NAND image so I can access it's contents?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
xamindar
post Jul 27 2008, 04:08 PM
Post #2





Group: Members
Posts: 803
Joined: 30-March 04
From: California
Member No.: 2,368



Ok, I did it. A lot of googling finaly paid off. I'll post a little howto just so others can do it if they need and also so I can in the future if I forget. blink.gif

I found a link here to a script that will extract the individual jffs2 filesystems from the NAND image. I also attached the script exactly as I used it on my c3100 NAND backup to this post. Just take off the .txt extension and make it executable.

Here is what I did to get my usr partition from NAND mounted. (usr is the one that had all my stored files)
I stuck the nand-ripper.sh script, modified the parameters in the script to match what is hopefully the correct info, and my nand backup (SYSTC310.DBK) in the same folder and extracted the usr partition with this command:
CODE
./nand-ripper.sh nand_usr user SYSTC310.DBK

I now have nand_usr which is the partition I wanted access to.

Then I had to do some digging around to find out how to even mount or extract this type of image. Most helpful was a post here and here.

if your kernel has them as modules, make sure to modprobe loop and block2mtd

Create the mtd device as I don't really have a NAND on my desktop machine:
CODE
mknod /dev/mtdblock0 b 31 0

Set up a loop device straight to my extracted partition file:
CODE
losetup /dev/loop0 nand_usr

Tell the block2mtd driver what you want it to convert to a fake MTD device.
CODE
echo "/dev/loop0" > /sys/module/block2mtd/parameters/block2mtd

Then, finally mount the device:
CODE
mkdir /mnt/zaurus_usr
mount -t jffs2 /dev/mtdblock0 /mnt/zaurus_usr


Attached File(s)
Attached File  nand_ripper.sh.txt ( 4.62K ) Number of downloads: 45
 
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th December 2014 - 05:43 PM