Author Topic: Recovering Files From Nand Backup?  (Read 5095 times)

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Recovering Files From Nand Backup?
« on: April 20, 2006, 09:53:59 pm »
For those of us who frequently flash between two or more different ROMs, is there a way to extract files from the NAND backup image without reflashing that image because it takes too much time to backup current image, reflash to backup, copy files to SD, then reflash back to last backup image. Is there any way to fake a mtd device and mount the nand backup file directly or a tool to extract files from it?
« Last Edit: April 20, 2006, 09:54:36 pm by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
Recovering Files From Nand Backup?
« Reply #1 on: April 21, 2006, 09:20:24 am »
Quote
For those of us who frequently flash between two or more different ROMs, is there a way to extract files from the NAND backup image without reflashing that image
There was a thread with a script on the zaurusboard (which is gone now... like the dev.net), but I have it archived on one of my many zaurus backup cds. I will try to locate it this weekend for you. I should add that Stubear was a mod on that board and should also have the script. I think (iirc) that Stubear modified it to work properly on the C-series NANDs... you could ask him.

Greg

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Recovering Files From Nand Backup?
« Reply #2 on: April 21, 2006, 10:01:14 am »
This is largely going to be dependent upon locating the offset within the NAND image of the jffs2 file system.

If you can do that then you can set up a loop device with losetup -o (for offset) and then mount that jffs2 file system. (this needs to be done from a machine with enough memory and a kernel with all the suitably linked features).

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
Recovering Files From Nand Backup?
« Reply #3 on: April 21, 2006, 03:58:40 pm »
Quote
There was a thread with a script on the zaurusboard
I found it. It's a perl script to extract the ROM from the NAND... you may be able to modify it for your needs.

I'll just zip up the whole thread and attach it here.

Greg

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Recovering Files From Nand Backup?
« Reply #4 on: April 21, 2006, 08:08:40 pm »
Quote
Quote
There was a thread with a script on the zaurusboard
I found it. It's a perl script to extract the ROM from the NAND... you may be able to modify it for your needs.

I'll just zip up the whole thread and attach it here.

Greg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=124098\"][{POST_SNAPBACK}][/a][/div]

Thanks a lot! I will give it a try when my Z's not so busy compiling stuff
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

VT-Zuser

  • Newbie
  • *
  • Posts: 4
    • View Profile
Recovering Files From Nand Backup?
« Reply #5 on: May 02, 2006, 02:03:58 am »
Need help recovering files from an SL-C750 that suddenly went toes-up today.  I had already found the script mentioned above while searching the site, but the partition sizes in the original thread are for the C860 (and someone later posted changes for the C700.  Neither seems to be useful with the NAND backup from my C750.  Does anybody know what the correct partition sizes and offset are?

VT-Zuser

  • Newbie
  • *
  • Posts: 4
    • View Profile
Recovering Files From Nand Backup?
« Reply #6 on: May 14, 2006, 12:58:48 am »
OK, I've made some progress on my own, but I'm still stuck.  I've learned that application data lives under /home/zaurus/Applications/dtm.   So if I can get the home partition mounted on my desktop, I should be able to just copy the files out, and then transfer them to my C860.

I've also found this script, which seems to be an update of the earlier mentioned one with the proper values for ROMs from C700-C860.

This thread supposedly shows how to create the MTD device to hold the partition image and then mount it, but none of the three partition images work.  I get either something like "Can't find superblock" (last night) or segmentation fault (tonight).

All the modules as well as the jffs2 module loaded fine.  I'm running FC3, reasonably updated. Kernel 2.6.10, Athlon 2800.

Help, please!  Are these in fact jffs2 images, and if so how do I mount them?

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Recovering Files From Nand Backup?
« Reply #7 on: May 17, 2006, 04:35:42 pm »
this is quite an interesting article about loopback mounts using byte offsets to access disk partitions inside a whole-disk backup:
http://edseek.com/~jasonb/articles/linux_loopback.html

however, if I were you, I'd simply backup your current image, reflash to the backup, extract the files (rsync is ideal for this), then revert to the first one!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

gojira

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Recovering Files From Nand Backup?
« Reply #8 on: August 11, 2006, 11:43:25 pm »
Quote
[div align=\"right\"][a href=\"index.php?act=findpost&pid=126964\"][{POST_SNAPBACK}][/a][/div]

Did you have any luck with this?  My z just stopped booting (but can still do a nand backup) and my last sync with the desktop was 2 weeks ago (switched from linux to os x intel which is having usb-over-ethernet driver issues...)
Zaurus SL-C3200 Debian EABI / Sharp ROM (tetsu v18j), Socket CF Bluetooth (Rev E), BT747 GPS, Canon K30225 CF Wifi.  RIP: Zaurus SL-C860 Sharp ROM (1.40JP).

VT-Zuser

  • Newbie
  • *
  • Posts: 4
    • View Profile
Recovering Files From Nand Backup?
« Reply #9 on: August 12, 2006, 02:06:26 am »
Quote
Quote
[div align=\"right\"][a href=\"index.php?act=findpost&pid=126964\"][{POST_SNAPBACK}][/a][/div]

Did you have any luck with this?  My z just stopped booting (but can still do a nand backup) and my last sync with the desktop was 2 weeks ago (switched from linux to os x intel which is having usb-over-ethernet driver issues...)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=138332\"][{POST_SNAPBACK}][/a][/div]

I finally gave up.  The C750 wouldn't boot at all, and I'm afraid of flashing the possibly corrupt image over a working C860.  That was why I wanted to be able to mount the backup as a jffs image and extract files, but I gave up on that since nobody seemed to have the necessary info.