On Mon, 29 Nov 2004, Dan Kaspi wrote: > I have a bzImage. It was built with 2.6.* kernel. I do not know the > configuarion > ( More rpecisely :I'm not sure I have the .config file it was built with ). > I want to know if the ext3 was build into this kernel image or as a module.
question: on my old redhat 7.3 system, the installed kernel comes in two flavors - the compressed file and the non-compressed file. can you check if you have the non-compressed version of the kernel file too? if you do, run 'nm filename | egrep ext3' and see if you get any ext3 symbols. if you only have the compressed file, you'll have to start working: (note: i'm reading the info for a 2.4-based kernel - perhaps this changed in 2.6): the compressed kernel is made of 3 sections: 1. a boot sector - 512 bytes. 2. the setup code - made of a number of sectors which is written in the boot sector (the first 512 bytes mentioned in #1). 3. the (copressed) kernel itself. look in /usr/src/linux/arch/i386/boot/Makefile for the command-line used to create the bzImage file from these 3. then look at /usr/src/linux/arch/i386/boot/tools/build.c for the (rather simple) C program that builds the bzImage file from those 3 files. in the program you'll see both how the file is constructed, as well as which byte in the boot sector contains the number of sectors which the setup code occupies. reading this number from the boot sector (with 'od') will tell you which sector in the bzImage file is the beginning of the kernel binary itself. then you can extract that from the bzImage using dd, and then you just need to uncompress it - if it is compressed at all (i suppose that running 'file' on the resulting file will tell you if it's compressed, or it is an ELF file). finally, run the 'strings' command on the resulting file (it's not an ELF file, it seems, but something else) and grep for ext3. grep for more fundamental symbols, too, to make sure you got the right kernel image file. note: there is a howto called Linux-i386-Boot-Code-HOWTO, which contains a short-cut for this process, by scanning the bzImage file for the signature of gzip - see http://distributions.linux.com/howtos/Linux-i386-Boot-Code-HOWTO/compressed_head.shtml for details ;) may the source be with you ;) -- guy "For world domination - press 1, or dial 0, and please hold, for the creator." -- nob o. dy ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]