1

So, I dumped old routers ubifs image from memory and apparently it can't be read or mounted, throwing errors like "missing block size" and "missing data" although I see in hexdump it is all there. I checked similar version of router someone else dumped the ubifs image of and mounting the image or reading from it works correctly. I tried ubireader and python script ubidump but nothing works. Should I dump the ubifs from router again or I assume EC header ought to have something to do with it?

Image that works:

(base) josip@nela-computer:~/Documents/ubee/new router/images$ binwalk ~/projects/bcm2-dumps/evw32c/_bcm3384TP1_apps.bin_nand_ubifs_bs128k_ps2k.extracted/20000.ubi 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             UBI erase count header, version: 1, EC: 0x4, VID header offset: 0x800, data offset: 0x1000

(base) josip@nela-computer:~$ hexdump -n 1024 ~/projects/bcm2-dumps/evw32c/_bcm3384TP1_apps.bin_nand_ubifs_bs128k_ps2k.extracted/20000.ubi 
0000000 4255 2349 0001 0000 0000 0000 0000 0400
0000010 0000 0008 0000 0010 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0000 053f a6d0
0000040 0000 0000 0000 0000 0000 0000 0000 0000
*
0000400

Image that don't:

(base) josip@nela-computer:~/Documents/ubee/new router/images$ binwalk _output_image3e_linuxapps.bin.extracted/20000.ubi 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             UBI erase count header, version: 1, EC: 0x2, VID header offset: 0x800, data offset: 0x1000

(base) josip@nela-computer:~$ hexdump -n 1024 ~/Documents/ubee/new router/images/_output_image3e_linuxapps.bin.extracted/20000.ubi 
0000000 4255 2349 0001 0000 0000 0000 0000 0200
0000010 0000 0008 0000 0010 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0000 9340 8c2d
0000040 0000 0000 0000 0000 0000 0000 0000 0000
*
0000400

EDIT: Turns out I just needed to dump the partition again as the first dump was with errors. The dump of ubifs works now and it shows files.

(ubifs) josip@nela-computer:~/Downloads/_linuxapps3.bin.extracted$ python ~/projects/ubidump/ubidump.py 20000.ubi -s ./
==> 20000.ubi <==
1 named volumes found, 2 physical volumes, blocksize=0x20000
== volume b'linuxapps' ==
saved 52 files
(ubifs) josip@nela-computer:~/Downloads/_linuxapps3.bin.extracted$ ls
20000.ubi  linuxapps
(ubifs) josip@nela-computer:~/Downloads/_linuxapps3.bin.extracted/linuxapps$ cat readme.txt 
This is the Apps partition for 93383WVG.  Files copied into this directory 
will be compressed and stored as a JFFS2 filesystem image in the target
 folder (93383LxG).  The final step of the build creates a downloadable bin file called 
apps.bin, which can then be downloaded using the DOCSIS application.
(ubifs) josip@nela-computer:~/Downloads/_linuxapps3.bin.extracted/linuxapps$ cat version.txt 
/home/allan/Linux/LxG171mp4_wifi/targets/3384TP1/apps.bin
Wed Sep 13 09:27:19 CST 2017
root@allan-Ubuntu14
gcc version 4.2.3
Version: 1.7.1mp4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.