View Single Post
Old 02-21-2013, 06:20 PM   #31
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
DX(G), 2.5.8 (only/both)

The search continues for dot-config files with a little bit of prep work.
Spoiler:

Code:
core2quad dxg $ cp -a mtd_1.bin ku-2.5.8.img

core2quad dxg $ od -A d -t x1 ku-2.5.8.img | grep '1f 8b 08 00'
0012960 1f 8b 08 00 42 b1 2f 4d 02 03 9c bd 0d 78 54 c5

core2quad dxg $ dd if=ku-2.5.8.img bs=1 skip=12960 of=ku-2.5.8-kimg.gz
3657056+0 records in
3657056+0 records out
3657056 bytes (3.7 MB) copied, 10.8856 s, 336 kB/s

core2quad dxg $ gzip -l -v ku-2.5.8-kimg.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla ffffffff Feb 21 16:22             3657056          4294967295  99.9% ku-2.5.8-kimg

core2quad dxg $ zcat ku-2.5.8-kimg.gz >ku-2.5.8-kimg
gzip: ku-2.5.8-kimg.gz: decompression OK, trailing garbage ignored

core2quad dxg $ od -A d -t x1 ku-2.5.8-kimg | grep '1f 8b 08 00'
0084448 1f 8b 08 00 3c b1 2f 4d 02 03 bc 5b 0d 4c 5c 57
2660048 00 00 00 00 49 4b 43 46 47 5f 53 54 1f 8b 08 00

core2quad dxg $ dd if=ku-2.5.8-kimg bs=1 skip=2660060 of=ku-2.5.8-dc.gz
689108+0 records in
689108+0 records out
689108 bytes (689 kB) copied, 2.64899 s, 260 kB/s

core2quad dxg $ gzip -l -v ku-2.5.8-dc.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla 00000000 Feb 21 16:30              689108                   0   0.0% ku-2.5.8-dc

core2quad dxg $ zcat ku-2.5.8-dc.gz >ku-2.5.8-dc
gzip: ku-2.5.8-dc.gz: decompression OK, trailing garbage ignored

core2quad dxg $ file ku-2.5.8-dc
ku-2.5.8-dc: ASCII text
core2quad dxg $ less ku-2.5.8-dc

So we have a config file in this "old school" style of a kernel image.
Code:
core2quad dxg $ mv ku-2.5.8-dc dot-config-2.5.8
core2quad dxg $ gzip dot-config-2.5.8
Strip the known dot-config off the end of the image.
Code:
core2quad dxg $ dd if=ku-2.5.8-kimg bs=1 count=2660060 of=ku-2.5.8-trim
2660060+0 records in
2660060+0 records out
2660060 bytes (2.7 MB) copied, 10.7579 s, 247 kB/s
See if any sense can be made of that earlier gzip signature in the file.
Code:
core2quad dxg $ dd if=ku-2.5.8-trim bs=1 skip=84448 of=ku-2.5.8-trim-unk.gz
2575612+0 records in
2575612+0 records out
2575612 bytes (2.6 MB) copied, 10.566 s, 244 kB/s

core2quad dxg $ gzip -l -v ku-2.5.8-trim-unk.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla 46434b49 Feb 21 17:01             2575612          1414750023  99.8% ku-2.5.8-trim-unk

core2quad dxg $ zcat ku-2.5.8-trim-unk.gz >ku-2.5.8-trim-uk
gzip: ku-2.5.8-trim-unk.gz: decompression OK, trailing garbage ignored

core2quad dxg $ file ku-2.5.8-trim-uk
ku-2.5.8-trim-uk: ASCII cpio archive (SVR4 with no CRC)
Ah, so - A compressed initramfs archive.
Keep a copy of that also.
Spoiler:

Code:
core2quad dxg $ mkdir ku-2.5.8-irfs

core2quad dxg $ zcat ku-2.5.8-trim-unk.gz >ku-2.5.8-irfs.cpio
gzip: ku-2.5.8-trim-unk.gz: decompression OK, trailing garbage ignored

core2quad dxg $ cd ku-2.5.8-irfs
core2quad ku-2.5.8-irfs $ sudo su

core2quad ku-2.5.8-irfs # cpio -i -d -m  --no-absolute-filenames -I ../ku-2.5.8-irfs.cpio
cpio: Removing leading `/' from member names
2051 blocks

core2quad ku-2.5.8-irfs # ls -l
total 28
drwxr-xr-x 2 61967  502 4096 2013-02-21 17:11 bin
drwxr-xr-x 7 root  root 4096 2013-02-21 17:11 dev
lrwxrwxrwx 1 root  root   18 2013-02-21 17:11 init -> /bin/recovery-util
drwxr-xr-x 3 61967  502 4096 2013-02-21 17:11 lib
drwxr-xr-x 2 root  root 4096 2011-01-13 20:13 proc
drwx------ 2 root  root 4096 2011-01-13 20:13 root
drwxr-xr-x 2 61967  502 4096 2011-01-13 20:13 sbin
drwxr-xr-x 2 root  root 4096 2011-01-13 20:13 sys

core2quad ku-2.5.8-irfs # cd ..
core2quad dxg # tar --create --gzip --file=main-2.5.8-irfs.tar.gz ku-2.5.8-irfs
core2quad dxg # exit


Both files are attached here.
A DX(G) has two copies of the same kernel image, so no distinction is made here between 'main' and 'diags'.
Attached Files
File Type: gz dot-config-2.5.8.gz (7.7 KB, 940 views)
File Type: gz main-2.5.8-irfs.tar.gz (530.3 KB, 931 views)
knc1 is offline   Reply With Quote