特尔;博士:
尝试将提取的 ubi 文件系统挂载到 /dev/mtd0 给了我错误:
libscan: scanning eraseblock 323 -- 100 % complete
ubiformat: 324 eraseblocks are supposedly empty
ubiformat: error!: file "340D04.ubi" (size 42467348 bytes) is not multiple of eraseblock size (131072 bytes)
error 0 (Success)
那东西怎么闪啊
更长的版本:
我希望反转 Arris 调制解调器固件的固件,将旧版本的固件与较新的固件进行比较。我想访问运行固件的小型 Web 服务器的 webroot,因为我认为其中存在错误。
在这个旧版本中,binwalk 给了我这个:
> binwalk spTurquoise210-700_1.6.9.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
544 0x220 Certificate in DER format (x509 v3), header length: 4, sequence length: 985
1533 0x5FD Certificate in DER format (x509 v3), header length: 4, sequence length: 1246
3332 0xD04 JFFS2 filesystem, little endian
3411204 0x340D04 UBI erase count header, version: 1, EC: 0x0, VID header offset: 0x800, data offset: 0x1000
提取这个binwalk -e spTurquoise210-700_1.6.9.bin产量:
total 166M
drwxr-xr-x 3 root root 4.0K Mar 5 16:10 .
drwxr-xr-x 4 michael michael 4.0K Mar 5 16:10 ..
-rw-r--r-- 1 root root 43M Mar 5 16:10 220.crt
-rw-r--r-- 1 root root 39M Mar 5 16:10 340D04.ubi
-rw-r--r-- 1 root root 43M Mar 5 16:10 5FD.crt
-rw-r--r-- 1 root root 43M Mar 5 16:10 D04.jffs2
drwxr-xr-x 3 root root 4.0K Mar 5 16:10 jffs2-root
jffs2-root 的内容不显示 webroot。我已经挂载了 D04.jffs2 映像,它看起来与提取的 jffs2-root 目录内容相同。它似乎是刷新固件的升级程序。
所以,我想我会检查 340D04.ubi 图像。要安装并检查它,我:
> rmmod mtdram
> du -sk 340D04.ubi
39812 340D04.ubi
> modprobe mtdram total_size=39812
> flash_erase /dev/mtd0 0 0
> ubiformat /dev/mtd0 -f 340D04.ubi
这就是我遇到问题的地方。ubiformat 命令的输出是:
libscan: scanning eraseblock 323 -- 100 % complete
ubiformat: 324 eraseblocks are supposedly empty
ubiformat: error!: file "340D04.ubi" (size 42467348 bytes) is not multiple of eraseblock size (131072 bytes)
error 0 (Success)
我不知道如何将 ubi 文件系统闪存到 mtd0 设备上,以便我可以(稍后)安装它。