The
vmlinuz
file contains other things besides the gzipped content, so you need to find out where the gzipped content starts. To do that, use:od -A d -t x1 vmlinuz | grep '1f 8b 08 00'
What this does is to show you where in that file you can find the gzip header. The output looks like:
0024576 24 26 27 00 ae 21 16 00 1f 8b 08 00 7f 2f 6b 45
This means that at
0024576
(at least for the author of the post, yours might be somewhere completely different) in thevmlinuz
file, you will find the binary values "24 26 27 00 ae 21 16 00 1f 8b 08 00 7f 2f 6b 45
". You're looking for1f 8b 08 00
, which can be found from character 9 onwards, or, at0024576 + 8
(start counting from 0)= 24584
.Now that you know where the gzipped content starts (at position
24584
) you can usedd
to extract that gzipped content and ungzip it. To do that, use:dd if=vmlinuz bs=1 skip=24584 | zcat > vmlinux
The first command will seek to that position and copy everything to stdout.
zcat
then will uncompress everything it gets from stdin and will output the uncompressed string to stdout. Then the>
will redirectzcat
's output to a new file namedvmlinux
.
'내밥줄 > 리눅스' 카테고리의 다른 글
[펌] 강제 umount 방법 (umount : device is busy 발생시) (0) | 2013.01.23 |
---|---|
[펌]잘못푼 압축파일(tar.gz) 지우는 방법 (0) | 2013.01.23 |
[펌][Linux] samba 설치하기 (0) | 2012.11.14 |
[펌] Intel 80386 Protected Mode (0) | 2012.11.14 |
리눅스 보안 프로그램들... (0) | 2012.10.23 |