Quantcast
Channel: Extracting init script from bult-in intrfs into Linux bzImage - Super User
Viewing all articles
Browse latest Browse all 2

Answer by Maciej Piechotka for Extracting init script from bult-in intrfs into Linux bzImage

$
0
0

After unpacking by:

HDR=`binoffset bzImage 0x1f 0x8b 0x08 0x0`
dd if=bzImage bs=1 skip=$HDR | zcat - > kernel.unpack

(binoffset.c is in sources of Linux).

strings kernel.unpack | grep 070701

Gives the listing of archive. Just after the entry for /init in

strings kernel.unpack | less

Is the contents of script.

It is not perfect solution but at least it seems to work. Please answer if you know 'correct' way (for binaries) easy (not writing long program) - I'm not marking it as solution.


Viewing all articles
Browse latest Browse all 2

Trending Articles