View Single Post
Posts: 31 | Thanked: 32 times | Joined on Jan 2008 @ Helsinki
#5
So I did it: I was able to rescue my data from the internal flash. Should somebody else ever need to do the same, here's how I did it.

I downloaded the latest FIASCO image, then unpacked it with flasher:

Code:
./flasher-3.0.amd64 -F RX-44_2008SE_2.2007.50-2_PR_COMBINED_MR0_ARM.bin -u
I unpacked the initfs image which was contained in the FIASCO image with the instructions from:

http://labs.vivi.eng.br/blog/?p=29

I copied the whole thing on my home drive into a directory "myinitfs". I then edited the "linuxrc" file. I added these lines just under the "We are in USER state now" comment line:

Code:
# We are in USER state now

text2screen -s 2 -H center -y 20 -T 0 -t "Copying data..."
mount -t jffs2 /dev/mtdblock4 /mnt/mtdblock4
mount /dev/mmcblk0p1 /mnt/mmcblk0p1
tar cf /mnt/mmcblk0p1/mtdbl4.tgz /mnt/mtdblock4
umount /mnt/mtdblock4 
umount /mnt/mmcblk0p1
text2screen -s 2 -H center -y 40 -T 0 -t "Copy done."
That little script will pack your whole root file system from the internal memory to the external memory card, which you can then remove and insert into a memory card reader.

To create a new initfs image, i ran:

Code:
mkfs.jffs2 --root=myinitfs --eraseblock=128KiB --little-endian --no-cleanmarkers --output=myinitfs.jffs2
You need mtd-tools for that (apt-get mtd-tools etc.)

And to flash the new initfs, preserving the roofs on the internal memory card:

Code:
./flasher-3.0.amd64 -n myinitfs.jffs2 -f
That's it! After rebooting with the new initfs and waiting for the data to copy, I was able to rescue my invaluable personal data from the internal memory.

Next thing to do: schedule regular backups. On the other hand, why bother anymore...