View previous topic :: View next topic |
Author |
Message |
hq4ever Apprentice


Joined: 15 Aug 2004 Posts: 167
|
Posted: Sat Feb 12, 2005 12:49 pm Post subject: What is the diffrence between bzImage & vmlinux.bin |
|
|
What are the diffrences between bzImage & vmlinux.bin please ?
I've compiled 2.6.11-rc3-nitro0 using make && make modules_install but now when I need to copy the kernel itself I see 2 big files that seem to fit.
file gives
# file bzImage
bzImage: x86 boot sector
$ file vmlinux.bin
vmilnux.bin: data
yes I know I can just do make install but could you please explain to me what is the usage of those 2 files & when should I use which one ?
Thank you very much,
"In the lookout for knowladge" max. _________________ "God doesn't play dice with the universe",
Albert Einstein.
sig: http://www.jr.co.il/humor/signatur.txt
avatar: david lanham, http://www.dlanham.com/goodies.htm |
|
Back to top |
|
 |
tetromino Retired Dev


Joined: 02 Dec 2003 Posts: 215
|
Posted: Sat Feb 12, 2005 6:16 pm Post subject: |
|
|
If I remember this right (note: I might remember this wrong...)
vmlinux = the kernel, uncompressed, in ELF format. Generally not used.
vmlinux.bin = the kernel, uncompressed, and all the ELF information stripped out of it (i.e. what's left is the raw machine code). Used in some embedded applications I think.
vmlinuz = the kernel, compressed with gzip and then some extra stuff added, used for booting in the olden days.
bzImage = the kernel, compressed with bzip2 and then some extra stuff added, used for booting. This is probably what you want. Use "make bzImage" to create it. |
|
Back to top |
|
 |
hq4ever Apprentice


Joined: 15 Aug 2004 Posts: 167
|
Posted: Sat Feb 12, 2005 6:56 pm Post subject: |
|
|
Say, how can the kenrel itself be in ELF (executable) format if the kernel is the one responsible for all the low level memory allocation thearding & stuff ?
I mean who knows to run ELF besides the kernel ? how can it be that the kernel runs it self ?
also in my /boot I have all the kernels in vmlinuz-*, thats why I'm asking, because even on the fedora2 I was using the kernel was bzImage. Did i do something wrong with the gentoo install to have this behavior or is this normal ?
thanx, max. _________________ "God doesn't play dice with the universe",
Albert Einstein.
sig: http://www.jr.co.il/humor/signatur.txt
avatar: david lanham, http://www.dlanham.com/goodies.htm |
|
Back to top |
|
 |
nightblade Guru


Joined: 20 Jul 2004 Posts: 368 Location: back from SE Asia
|
Posted: Sat Feb 12, 2005 7:06 pm Post subject: |
|
|
shurik wrote: | Use "make bzImage" to create it. |
"make" creates bzImage already....  _________________ In God we trust. All the others must provide a valid X.509 certificate |
|
Back to top |
|
 |
tetromino Retired Dev


Joined: 02 Dec 2003 Posts: 215
|
Posted: Sat Feb 12, 2005 7:20 pm Post subject: |
|
|
hq4ever wrote: | Say, how can the kenrel itself be in ELF (executable) format if the kernel is the one responsible for all the low level memory allocation thearding & stuff ?
I mean who knows to run ELF besides the kernel ? how can it be that the kernel runs it self ? |
It's because gcc outputs ELF format. You use gcc to make the ELF file vmlinux, then strip out the ELF parts (making it into vmlinux.bin) and after a few more manipulations get bzImage or vmlinuz compressed images.
hq4ever wrote: | also in my /boot I have all the kernels in vmlinuz-*, thats why I'm asking, because even on the fedora2 I was using the kernel was bzImage. Did i do something wrong with the gentoo install to have this behavior or is this normal ? |
I know Debian still uses the old vmlinuz format for all of its kernel images. Maybe genkernel (or whatever method you used to create your kernels) does that also. I've always just compiled kernel manually and used bzImage.
nightblade wrote: | "make" creates bzImage already.... |
Hm... I guess they must have tweaked the build process a bit since the last time I read /usr/src/linux/README |
|
Back to top |
|
 |
hq4ever Apprentice


Joined: 15 Aug 2004 Posts: 167
|
Posted: Sat Feb 12, 2005 8:28 pm Post subject: |
|
|
Well I did too, that is if you call "menuconfig" manually.
ie make menuconfig && make & make install
and all I got in my /boot is vmlinuz-* and System.map-* _________________ "God doesn't play dice with the universe",
Albert Einstein.
sig: http://www.jr.co.il/humor/signatur.txt
avatar: david lanham, http://www.dlanham.com/goodies.htm |
|
Back to top |
|
 |
nightblade Guru


Joined: 20 Jul 2004 Posts: 368 Location: back from SE Asia
|
Posted: Sat Feb 12, 2005 8:39 pm Post subject: |
|
|
shurik wrote: |
nightblade wrote: | "make" creates bzImage already.... |
Hm... I guess they must have tweaked the build process a bit since the last time I read /usr/src/linux/README |
actually I forgot to mention that bzImage is created by "make" only in 2.6 kernels.... so your mileage may vary....  _________________ In God we trust. All the others must provide a valid X.509 certificate |
|
Back to top |
|
 |
jimmywithtorch n00b


Joined: 03 Sep 2004 Posts: 27
|
Posted: Sat Feb 12, 2005 11:05 pm Post subject: |
|
|
According to gentoo hand-book you first do 'make && make modules_insall' (for kernel 2.6), and that makes bzImage by default in case of kernel 2.6.
Then you have to copy bzImage and System.map to /boot using manual copy commands 'cp'
So far I haven't read about 'make install' anywhere in gentoo documentations. I know they have it for Redhat, but I have never used 'make install' for gentoo.
So after compiling just manually copy bzImage and System.map to /boot and add extra entry for your new kernel in grub or lilo. |
|
Back to top |
|
 |
tetromino Retired Dev


Joined: 02 Dec 2003 Posts: 215
|
Posted: Sun Feb 13, 2005 12:53 am Post subject: |
|
|
hq4ever wrote: | Well I did too, that is if you call "menuconfig" manually.
ie make menuconfig && make & make install
and all I got in my /boot is vmlinuz-* and System.map-* |
You need to manually copy /usr/src/linux/arch/YOUR_ARCH/boot/bzImage to /boot/bzImage-VERSION, and then configure your grub or lilo to use the new kernel image. This process is explained in detail in the Gentoo handbook, in /usr/src/linux/README, and in many other places. Also, AFAIK there is not "make install" for the standard kernel (at least, there doesn't seem to be an "install" target in the makefile). That is because every distro has its own way of installing kernel images (e.g. lilo vs. grub, images in /boot vs. images in /, initrd vs. no initrd, /boot on a separate partition vs. /boot in the same partition as /, etc etc). On the other hand, installing modules is standardized (put them in /lib/modules/VERSION and generate the appropriate *map, *dep, and *symbols files) which is why "make modules_install" exists. |
|
Back to top |
|
 |
|