This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Vmlinux" – news ·newspapers ·books ·scholar ·JSTOR(April 2012) (Learn how and when to remove this message) |

vmlinux is astatically linkedexecutable file that contains theLinux kernel in one of theobject file formats supported by Linux, which includesExecutable and Linkable Format (ELF) andCommon Object File Format (COFF). Thevmlinux file might be required for kerneldebugging,symbol table generation or other operations, but must be made bootable before being used as anoperating system kernel by adding amultiboot header,bootsector and setup routines.
Traditionally,UNIX platforms called the kernel image/unix. With the development ofvirtual memory, kernels that supported this feature were given thevm- prefix to differentiate them. The namevmlinux is a mutation ofvmunix, while invmlinuz the letterz at the end denotes that it is compressed (for examplegzipped).[1]
Traditionally, the kernel was located in theroot directory of the filesystem hierarchy; however, as thebootloader must useBIOS drivers to access thehard disk, limitations on somei386 systems meant only thefirst 1024 cylinders of the hard disk were addressable.
To overcome this, Linux distributors encouraged users to create apartition at the beginning of their drives specifically for storing bootloader and kernel-related files.GRUB,LILO andSYSLINUX are common bootloaders.
By convention, this partition ismounted on the filesystem hierarchy as/boot. This was later standardised by theFilesystem Hierarchy Standard (FHS), which now requires the Linux kernel image to be located in either/ or/boot, although there is no technical restriction enforcing this.[2]
Traditionally, when creating a bootablekernel image, the kernel is alsocompressed usinggzip, or, since Linux 2.6.30,[3] usingLZMA orbzip2, which requires a very smalldecompression stub to be included in the resulting image. The stub decompresses the kernel code, on some systems printing dots to the console to indicate progress, and then continues the boot process. Support forLZO,[4]xz,[5]LZ4[6] andzstd[7] compression was added later.
The decompression routine is a negligible factor in boot time, and prior to the development of thebzImage, the size constraints of some architectures, notably i386, were extremely limiting, making compression a necessity.
On theSPARC architecture, the vmlinux file is compressed using simplegzip, because theSILO boot loader transparently decompresses gzipped images.
The filename of the bootable image is not important, but many popular distributions usevmlinuz.

As the Linux kernel matured, the size of the kernels generated by users grew beyond the limits imposed by some architectures, where the space available to store the compressed kernel code is limited. The bzImage (big zImage) format was developed to overcome this limitation by splitting the kernel over non-contiguousmemory regions.[8]
The bzImage was compressed usinggzip until Linux 2.6.30,[3] whichintroduced more algorithms. Although thebzprefix may suggest thatbzip2 compression is used, this is not the case.[1] (The bzip2 package is often distributed with tools prefixed withbz, such asbzless,bzcat, etc.)
The bzImage file is in a specific format. It contains concatenatedbootsect.o +setup.o +misc.o +piggy.o.[9]piggy.o contains the gzipped vmlinux file in its data section. The scriptextract-vmlinux found underscripts/ in the kernel sources decompresses a kernel image. Some distributions (e.g.Red Hat and clones) may come with akernel-debuginfoRPM that contains thevmlinux file for the matching kernel RPM, and it typically gets installed under/usr/lib/debug/lib/modules/$(uname -r)/vmlinux or/usr/lib/debug/lib64/modules/$(uname -r)/vmlinux.
The operating system kernel must be located in either / or /boot.
The zImage contain bootsect.o + setup.o + misc.o + piggy.o
all special sections appearing in the Linux kernel end up packed in one of the segments defined in the vmlinux ELF header. Each special section fulfills a particular purpose.