我正在尝试提取路由器的 squashfs 文件系统。这里是固件。
首先,我解压了文件。接下来,我跑去binwalk
获取有关该文件的一些信息。
DECIMAL HEX DESCRIPTION
-------------------------------------------------------------------------------------------------------
58 0x3A TRX firmware header, little endian, header size: 28 bytes, image size: 6656000 bytes, CRC32: 0x2B1713B2 flags/version: 0x10000
86 0x56 LZMA compressed data, properties: 0x5D, dictionary size: 65536 bytes, uncompressed size: 3614368 bytes
1282426 0x13917A Squashfs filesystem, little endian, non-standard signature, version 3.0, size: 5367357 bytes, 853 inodes, blocksize: 65536 bytes, created: Wed Aug 7 05:08:47 2013
然后我跑去binwalk -e
提取文件的内容。我得到了三个文件:
.
├── 13917A.squashfs
├── 56
└── 56.7z
运行unsquashfs
上13917A.squashfs
失败了,说是找不到魔块。这是因为该文件使用了非标准魔法。将魔术更改为标准制作unsquashfs
并将其file
检测为 squashfs 文件系统。但unsquashfs
没有成功完成:
caff@UbunutuX2:~/Netgear/test$ unsquashfs 13917A.squashfs
Reading a different endian SQUASHFS filesystem on 13917A.squashfs
Filesystem on 13917A.squashfs is (768:0), which is a later filesystem version than I support!
我还尝试使用Jeremy Collake 的 Firmware Mod Kit提取文件系统。这也失败了:
caff@UbunutuX2:~/Netgear/test$ /opt/firmware-mod-kit/trunk/unsquashfs_all.sh 13917A.squashfs
Attempting to extract SquashFS .X file system...
Trying ./src/others/squashfs-3.4-nb4/unsquashfs-lzma... Skipping others/squashfs-hg55x-bin (wrong version)...
File extraction failed!
如何提取这个 squashfs 文件系统?