2011-09-09 16 views
2

라우터 펌웨어를 추출하고 수정하고 싶습니다. 그래서 나는 bitsum의 firmware mod kit를 사용했습니다. 오류가없는 것 같습니다. 나는 rootfs.img (squashfs 이미지) 파일도있다 image_parts 디렉토리를 얻을 수 있습니다. 하지만 문제는 내가 그것을 마운트 할 수도없고 unsquashfs도 할 수 없다는 것입니다.펌웨어 이미지를 unsquashfs 또는 마운트하는 방법은 무엇입니까?

# ./extract-ng.sh AirTies_Air5021RU_FW_1.2.0.16_FullImage.bin 
Firmware Mod Kit (extract-ng) 0.69 beta, (c)2011 Craig Heffner, Jeremy Collake 
http://www.bitsum.com 

Scanning firmware... 

DECIMAL HEX   DESCRIPTION 
------------------------------------------------------------------------------------------------------- 
65228  0xFECC  Squashfs filesystem, big endian, version 2.0, size: 1369418 bytes, 382 inodes, blocksize: 65536 bytes, created: Tue May 3 13:44:22 2011 

Extracting 65228 bytes of header image at offset 0 
Extracting squashfs file system at offset 65228 
Extracting 160 byte footer from offset 1972107 
Extracting squashfs files... 
Firmware extraction successful! 
Firmware parts can be found in 'fmk/*' 

마운트 시도 출력 :

fmk# ls 
image_parts logs rootfs 
fmk# cd image_parts/ 
fmk/image_parts# ls 
footer.img header.img rootfs.img 
fmk/image_parts# file rootfs.img 
rootfs.img: Squashfs filesystem, big endian, version 2.0, 1369418 bytes, 382 inodes, blocksize: 65536 bytes, created: Tue May 3 13:44:22 2011 
fmk/image_parts# mount rootfs.img /mnt/rootfs/ -o loop -t squashfs 
mount: wrong fs type, bad option, bad superblock on /dev/loop0, 
     missing codepage or helper program, or other error 
     In some cases useful info is found in syslog - try 
     dmesg | tail or so 
fmk/image_parts# dmesg | tail -n 1 
[24799.284066] SQUASHFS error: Can't find a SQUASHFS superblock on loop0 

unsquashfs이 시도 출력 :

fmk/image_parts# unsquashfs rootfs.img 
Reading a different endian SQUASHFS filesystem on rootfs.img 
Parallel unsquashfs: Using 1 processor 
336 inodes (377 blocks) to write 

[=============================|                     ] 99/377 26% 
gzip uncompress failed with error code -3 

Failed to write squashfs-root/lib/libqueue.so, skipping 
[=============================|                     ] 100/377 26% 
gzip uncompress failed with error code -3 

gzip uncompress failed with error code -3 

gzip uncompress failed with error code -3 

... 


Failed to write squashfs-root/lib/modules/2.6.8.1/extra/blaa_dd.ko, skipping 
[====================================|                   ] 123/377 32% 
gzip uncompress failed with error code -3 

gzip uncompress failed with error code -3 

... 

Failed to write squashfs-root/webs/management/ui_password.html, skipping 
[========================================================|              ] 191/377 50% 
gzip uncompress failed with error code -3 

Failed to write squashfs-root/webs/index.html, skipping 
[========================================================|              ] 192/377 50% 
gzip uncompress failed with error code -3 

... 


Failed to write squashfs-root/usr/sbin/brctl, skipping 
[===============================================================================================================|] 377/377 100% 
created 188 files 
created 46 directories 
created 52 symlinks 
created 95 devices 
created 1 fifos 

내가 검색 "에러 코드 -3"이 Z_DATA_ERROR이다

는 추출 출력 (데이터가 손상되었거나 불완전 함). 지금 어떻게해야합니까?

감사

+0

대신 serverfault에 있어야하지 않습니까? –

답변

3

Bcm63xx 펌웨어 이미지는 SquashFS는-LZMA 같은 특별한 형식이 있습니다. bcm tools (brfwmod.exe)라는 펌웨어 이미지를 추출 할 도구가 있습니다. 명령에는 lzma-unsquash가 있습니다. 나는 성공적으로 도구를 사용하여 그것을 unaquash.

+1

안녕하세요 요제프. 이 [link] (https://docs.google.com/file/d/0BzD4hxGinKcycHFhOS13NWJTMms/edit?usp=sharing)에서 다운로드 할 수 있습니다. – kursat

+0

bcm-tools를 게시 해 주셔서 감사합니다! 이전 메일에 내 메일 주소가 포함되어 있기 때문에 이전 메일을 삭제 했으므로 삭제할 수 없습니다. – hunger