Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What is the diffrence between bzImage & vmlinux.bin
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
hq4ever
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 167

PostPosted: Sat Feb 12, 2005 12:49 pm    Post subject: What is the diffrence between bzImage & vmlinux.bin Reply with quote

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
View user's profile Send private message
tetromino
Retired Dev
Retired Dev


Joined: 02 Dec 2003
Posts: 215

PostPosted: Sat Feb 12, 2005 6:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
hq4ever
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 167

PostPosted: Sat Feb 12, 2005 6:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
nightblade
Guru
Guru


Joined: 20 Jul 2004
Posts: 368
Location: back from SE Asia

PostPosted: Sat Feb 12, 2005 7:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
tetromino
Retired Dev
Retired Dev


Joined: 02 Dec 2003
Posts: 215

PostPosted: Sat Feb 12, 2005 7:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
hq4ever
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 167

PostPosted: Sat Feb 12, 2005 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
nightblade
Guru
Guru


Joined: 20 Jul 2004
Posts: 368
Location: back from SE Asia

PostPosted: Sat Feb 12, 2005 8:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
jimmywithtorch
n00b
n00b


Joined: 03 Sep 2004
Posts: 27

PostPosted: Sat Feb 12, 2005 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
tetromino
Retired Dev
Retired Dev


Joined: 02 Dec 2003
Posts: 215

PostPosted: Sun Feb 13, 2005 12:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum