I just stumbled upon this page, which says that bzImage and vmlinuz are identical.

bzImage is then copied using the cp (i.e., copy) command to the /boot directory and simultaneously renamed vmlinuz with a command such as

cp /usr/src/linux/arch/i386/linux/boot/bzImage /boot/vmlinuz

This is worrying me, as up to now my understanding was as follows:

  • vmlinux: Plain linux ELF file just the way it was created by the linker, including symbols and everything.
  • vmlinuz: gzipped vmlinux file which got stripped of all its symbols
  • zImage: bootsect.o + setup.o + misc.o + piggy.o (piggy.o contains the piggy-backed vmlinuz). zImage is bootable because it can decompress and run the kernel it contains.
  • bzImage: same as zImage except that it is built slightly differently which enables it to carry bigger kernels.

Can you tell me who is correct?

I am aware of this Stack Exchange answer, but it doesn't answer my question explicitely. Implicitely, however, I feel that it is backing my understanding.

Bonus question

Which of the files above does uImage contain?


“vmlinuz” as a format name does mean “gzipped vmlinux file which got stripped of all its symbols”. However, as a file name, vmlinuz is often used for any kernel image which is in a compressed format that a bootloader supports, such as the zimage format or the bzimage format. The name vmlinuz is popular on x86 distributions, regardless of the actual format of the file (usually bzimage). The name uImage generally indicates yet another format, used by the U-Boot bootloader which is popular on embedded systems; a uImage file contains a U-Boot-specific header followed by a kernel image which can be in several formats (see sawdust's answer on Stack Overflow for more information).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.