[EN] Fonera+ : dump, mount, extract squashfs filesystem
Par Lama Bleu le lundi 8 octobre 2007, 10:40 - Fonera - Lien permanent
This is the same method as described in my non-public post of 02 Sept 2007,
but now directly from your running LaFonera+
This is also a risk-free method without reflashing.
You need to boot ramdisk following
the instructions here to access your Window$ share through WiFi.
I assume /cifs (in your LaFonera+) is access to share
\\<computer_IP>\fonera
Use the script mycifs.sh or adapt it !
First, find the start of squashfs filesystem in partition "image"
Make a dump to /cifs of your "image" partition.
File size is approx. 2.2 MB
root@LamaBleu:~# cat /dev/mtdblock2 > /cifs/mtdblock2
Find the magic header sqsh for the starting of squashfs
filesystem. In my case (should differ for you, depending version running)
:
root@LamaBleu:/cifs# hexdump -C /cifs/mtdblock2 | grep sqsh 000a5020 11 75 ff ff ec 70 0f f5 73 71 73 68 00 00 02 80 |.u...p..sqsh....|
offset is 0x000a5028 hexa ( "sqsh" position)
Take your hex-calc:
0A5028 / 8 = 14A05 --> 84485 (dec)
Extract the squasfs filesystem portion from /cifs/mtdblock2 to a new file on
/cifs.
root@LamaBleu:/cifs# dd if=/cifs/mtdblock2 bs=8 skip=84485 of=/cifs/squashfs 202235+0 records in 202235+0 records out
Mount it in a empty directory of your fonera, using losetup to simulate
block-device:
root@LamaBleu:/cifs# losetup /dev/loop1 /cifs/squashfs root@LamaBleu:/cifs# mount -t squashfs /dev/loop1 /mnt root@LamaBleu:/cifs# ls /mnt bin etc lib proc sbin tmp var dev jffs mnt rom sys usr www
Now you can browse the filesystem, just browse as read-only, not writable. Make
a backup of /mnt to CIFS share with tar command.
Enjoy.
Lama BLeu.



Commentaires
hello ! should differ for you, depending version running : certaines parenthèse en disent + que tour le reste
merci pour ton billet ! toujors un
plaisir de te lire.