chensiqia / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

Cannot extract DD-WRT firmware Ubuntu 11.10 32-bit #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Try an older DD-WRT build and see if it is successful. This will provide clues 
as to whether this is a new development. There has been at least one change to 
the DD-WRT web UI that will prevent it from being extracted. Other than that 
change, perhaps no applicable changes were made to more recent versions of 
DD-WRT. Nobody has gotten around to playing cat and mouse with their latest 
attempt to make their 'free open source' software as difficult as possible to 
change.

Original comment by jeremy.collake@gmail.com on 29 Apr 2012 at 8:56

GoogleCodeExporter commented 8 years ago
This particular firmware version is DD-WRT v24-sp2 (11/02/09) std-nokaid, and I 
have tried other versions as well, some dating back to 2008 with no luck, same 
results each time. Mainly I just want to insert a correct ssl certificate for 
my usage and some packages for IPv6 related.

Original comment by pmcefx on 29 Apr 2012 at 9:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Replacing previous comment. I'll look at it when I get a chance. I don't know 
what would cause the failure, especially when testing against older DD-WRT 
builds. Perhaps some errata was introduced into the FMK itself, I haven't tried 
extracting and rebuilding DD-WRT myself anytime recently. When I check up on 
it, I'll update this issue.

Original comment by jeremy.collake@gmail.com on 29 Apr 2012 at 9:34

GoogleCodeExporter commented 8 years ago
pmcefx, you'll have to provide the exact DD-WRT firmware image you are working 
with. I just successfully extracted and re-built a DD-WRT image for the WRT160N 
router (v24-SP2, build 14896) with the latest FMK trunk.

Original comment by heffne...@gmail.com on 8 Jul 2012 at 12:07

GoogleCodeExporter commented 8 years ago
First in question. I get errors with either image as described above.

Original comment by pmcefx on 12 Jul 2012 at 8:56

Attachments:

GoogleCodeExporter commented 8 years ago
Second in question.

Original comment by pmcefx on 12 Jul 2012 at 8:58

Attachments:

GoogleCodeExporter commented 8 years ago
Since Craig tested with build 14896 and you are using 13064, is there a reason 
you can't upgrade to 14896? Also, the issue may be your PC configuration or 
pre-requisites, as those older images should have worked.. though now the new 
images do too thanks to Craig.

Original comment by jeremy.collake@gmail.com on 12 Jul 2012 at 8:58

GoogleCodeExporter commented 8 years ago
Some features I use were lost in the newer builds. As far as testing with my 
setup, I resorted to sticking with what works best for features, speed of 
pass-thru, etc.

Original comment by pmcefx on 12 Jul 2012 at 9:02

GoogleCodeExporter commented 8 years ago
Also I tried with several downloads, all prerequisites were met for 
dependencies, on a dual-core 2.8G Dell, like I stated before, I am always using 
this unit for compiling.

Original comment by pmcefx on 12 Jul 2012 at 9:04

GoogleCodeExporter commented 8 years ago
Indeed, DD-WRT is prone to extreme ... variances .. between what works in any 
particular build, in my opinion. So, question answered ;).

Original comment by jeremy.collake@gmail.com on 12 Jul 2012 at 9:04