charles2gan / charles2gan/firmware-mod-kit
Cannot extract DD-WRT firmware Ubuntu 11.10 32-bit
- Dominant language
- C
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
1. subversion build-essential zlib1g-dev zlib1g installed, machine is also
used to compile/make/extract debian packages
2. Attempt to extract firmware by using $ ./extract-ng.sh
dd-wrt.v24-13064_vint_std-nokaid.bin
3. Alternatively attempt to extract firmware by using $ ./extract_firmware.sh
dd-wrt.v24-13064_vint_std-nokaid.bin firmware
What is the expected output? What do you see instead?
WITH ATTEMPT 1:
Scanning firmware...
DECIMAL HEX DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
0 0x0 TRX firmware header, little endian, header size: 28
bytes, image size: 3641344 bytes, CRC32: 0xD402F85E flags/version: 0x10000
622592 0x98000 Squashfs filesystem, little endian, DD-WRT signature,
version 3.0, size: 3018089 bytes, 623 inodes, blocksize: 131072 bytes, created:
Mon Nov 2 07:36:09 2009
Extracting 622592 bytes of trx header image at offset 0
Extracting squashfs file system at offset 622592
Extracting squashfs files...
[sudo] password for USER:
Firmware extraction failed!
WITH ATTEMPT 2:
Firmware Mod Kit (extract) v0.76 beta, (c)2010-2011 Jeremy Collake, - Newer NG edition by Craig Heffner
Checking for updates ...
You have the latest version of this kit.
LINUX system detected. Compatibility ok.
Testing file system of firmware ...
WARNING: You must be 'root' when extracting and building some images.
This is because some images need to create devices in your fs.
For DD-WRT, do NOT extract or build as root, use standard user.
Building tools ...
Build seems successful.
Preparing working directory ...
Removing any previous files ...
Creating directories ...
Extracting firmware
Attempting squashfs 3.0 lzma ...
Trying 'damn small' variant - used by DD-WRT v24 ...
Error: filesystem not extracted properly.
firmware image format not compatible?
AT THIS POINT I have in /firmware:
/image_parts
/image_parts/segment1.gzip
/image_parts/segment2
/image_parts/squashfs-lzma-image-3_0
/image_parts/squashfs_magic
/installed_packages
What version of the product are you using? On what operating system?
Firmware Mod Kit (build-ng) 0.76 beta
Ubuntu 11.10 32bit
Please provide any additional information below.
Attempt 1 extract.log empty.
Attempt 2 extract.log:
make: Entering directory `/home/USER/Development/DD-WRT/FMK/trunk/src'
make -C ./uncramfs/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/uncramfs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/uncramfs'
make -C ./uncramfs-lzma/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/uncramfs-lzma'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/uncramfs-lzma'
make -C ./cramfs-2.x/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/cramfs-2.x'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/cramfs-2.x'
make -C ./cramfsswap/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/cramfsswap'
strip cramfsswap
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/cramfsswap'
make -C ./squashfs-2.1-r2/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/squashfs-2.1-r2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/squashfs-2.1-r2'
make -C ./squashfs-3.0/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/squashfs-3.0'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/squashfs-3.0'
make -C ./squashfs-3.0-lzma-damn-small-variant/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/squashfs-3.0-lzma-damn-small-varian
t'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/squashfs-3.0-lzma-damn-small-varian
t'
make -C ./wrt_vx_imgtool/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/wrt_vx_imgtool'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/wrt_vx_imgtool'
make -C ./others/
make[1]: Entering directory `/home/USER/Development/DD-WRT/FMK/trunk/src/others'
make -C ./squashfs-3.0-e2100
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.0-e2100'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.0-e2100'
make -C ./squashfs-3.2-r2
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2'
make -C ./squashfs-3.2-r2-lzma
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma//C/Compr
ess/Lzma -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/C/Compr
ess/Lzma'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/C/Compr
ess/Lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma//CPP/7zi
p/Compress/LZMA_Alone -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/CPP/7zi
p/Compress/LZMA_Alone'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/CPP/7zi
p/Compress/LZMA_Alone'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/squashfs
3.2-r2/squashfs-tools all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/squashf
s3.2-r2/squashfs-tools'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma/squashf
s3.2-r2/squashfs-tools'
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-lzma'
make -C ./squashfs-3.2-r2-hg612-lzma
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/lz
ma443/C/7zip/Compress/LZMA_C -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/l
zma443/C/7zip/Compress/LZMA_C'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/l
zma443/C/7zip/Compress/LZMA_C'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/lz
ma443/C/7zip/Compress/LZMA_Alone -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/l
zma443/C/7zip/Compress/LZMA_Alone'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/l
zma443/C/7zip/Compress/LZMA_Alone'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/sq
uashfs3.2-r2/squashfs-tools all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/s
quashfs3.2-r2/squashfs-tools'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma/s
quashfs3.2-r2/squashfs-tools'
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.2-r2-hg612-lzma'
make -C ./squashfs-3.3
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3'
make -C ./squashfs-3.3-lzma
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma//C/Compress
/Lzma -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/C/Compress
/Lzma'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/C/Compress
/Lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma//CPP/7zip/C
ompress/LZMA_Alone -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/CPP/7zip/C
ompress/LZMA_Alone'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/CPP/7zip/C
ompress/LZMA_Alone'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/squashfs3.3
/squashfs-tools all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/squashfs3.
3/squashfs-tools'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma/squashfs3.
3/squashfs-tools'
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-lzma'
make -C ./squashfs-3.3-grml-lzma
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/lzma/C
/Compress/Lzma -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/lzma/
C/Compress/Lzma'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/lzma/
C/Compress/Lzma'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/lzma/C
PP/7zip/Compress/LZMA_Alone -f sqlzma.mk all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/lzma/
CPP/7zip/Compress/LZMA_Alone'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/lzma/
CPP/7zip/Compress/LZMA_Alone'
make -C
/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/squash
fs3.3/squashfs-tools all
make[3]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/squas
hfs3.3/squashfs-tools'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma/squas
hfs3.3/squashfs-tools'
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-3.3-grml-lzma'
make -C ./squashfs-4.0-lzma
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-4.0-lzma'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-4.0-lzma'
make -C ./squashfs-4.0-realtek
make[2]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-4.0-realtek'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/others/squashfs-4.0-realtek'
make[1]: Leaving directory `/home/USER/Development/DD-WRT/FMK/trunk/src/others'
make -C ./crcalc/
make[1]: Entering directory `/home/USER/Development/DD-WRT/FMK/trunk/src/crcalc'
make[1]: `crcalc' is up to date.
make[1]: Leaving directory `/home/USER/Development/DD-WRT/FMK/trunk/src/crcalc'
make -C ./webcomp-tools/
make[1]: Entering directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/webcomp-tools'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/USER/Development/DD-WRT/FMK/trunk/src/webcomp-tools'
make: Leaving directory `/home/USER/Development/DD-WRT/FMK/trunk/src'
untrx 0.54 beta - (c)2006-2010 Jeremy Collake
Opening dd-wrt.v24-13064_vint_std-nokaid.bin
read 3641344 bytes
Writing firmware/image_parts/segment1
size 2444 from offset 28 ...
Writing firmware/image_parts/segment2
size 620120 from offset 2472 ...
SQUASHFS magic: 0x74717368
SQUASHFS version: 3.0
SQUASHFS v3.0 image detected
Writing firmware/image_parts/squashfs_magic
Writing firmware/image_parts/squashfs-lzma-image-3_0
size 3018752 from offset 622592 ...
Done!
i have tried reinstallation several times. Any thoughts?
```
Original issue reported on code.google.com by `pmcefx` on 29 Apr 2012 at 7:41
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with extract-ng.sh and extract_firmware.sh using the listed DD-WRT image, then inspect the extraction output and extract.log. Start with the relevant extraction path and the squashfs-3.0-lzma-damn-small-variant and other squashfs tools under src; done means the firmware filesystem is extracted successfully without the reported compatibility error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, shell, ubuntu
- Domain
- reverse-engineering, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100