vmlinux
This article needs additional citations for verification. (April 2012) |
![](http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Linux-kernel-vmlinux.png/220px-Linux-kernel-vmlinux.png)
vmlinux
is a
Etymology
Traditionally,
vmlinuz
the letter z
at the end denotes that it is compressed (for example gzipped).[1]Location
Traditionally, the kernel was located in the
To overcome this, Linux distributors encouraged users to create a
By convention, this partition is mounted on the filesystem hierarchy as /boot
. This was later standardised by the Filesystem 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]
Compression
Traditionally, when creating a bootable
The decompression routine is a negligible factor in boot time, and prior to the development of the bzImage, the size constraints of some architectures, notably i386, were extremely limiting, making compression a necessity.
On the
The filename of the bootable image is not important, but many popular distributions use vmlinuz.
bzImage
![](http://upload.wikimedia.org/wikipedia/commons/thumb/9/97/Anatomy-of-bzimage.png/220px-Anatomy-of-bzimage.png)
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-contiguous
The bzImage was compressed using
bz
, such as bzless
, bzcat
, etc.)
The bzImage file is in a specific format. It contains concatenated bootsect.o
+ setup.o
+ misc.o
+ piggy.o
.[8] piggy.o
contains the gzipped vmlinux file in its data section. The script extract-vmlinux
found under scripts/
in the kernel sources decompresses a kernel image. Some distributions (e.g. Red Hat and clones) may come with a kernel-debuginfo
RPM that contains the vmlinux
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
.
See also
- Linux kernel
- Module (Linux)
- initrd
- System.map
- Object file
Notes and references
- ^ "vmlinuz Definition". www.linfo.org. Bellevue Linux. March 29, 2005. Retrieved 2015-06-21.
- ^ "Section 3.5.2 — /boot : Static files of the boot loader". FHS 2.3. 2004-01-29. Retrieved 2014-03-11.
The operating system kernel must be located in either / or /boot.
- ^ a b Linux 2.6.30, released the 9th of June 2009, added support to compress the kernel image with the LZMA and bzip2 algorithms [1]
- ^ Linux 2.6.33, released on February 24, 2010, added support to compress the kernel image with LZO [2]
- ^ Linux 2.6.38, released on March 14, 2011, added support to compress the kernel image with xz [3]
- ^ Linux 3.11, released on September 2, 2013, added support to compress the kernel image with LZ4 [4]
- initramfs with zstd [5]
- ^ Yann Droneaud (1999-09-28). "Re: bzImage decompression". LKML (Mailing list).
The zImage contain bootsect.o + setup.o + misc.o + piggy.o
Further reading
- Alavoor Vasudevan (2003-08-15). "10. Kernel Files Information". The Linux Kernel HOWTO. Archived from the original on 2017-10-10. Retrieved 2014-03-11.
- Daniel Pierre Bovet (2013-01-03). "Special sections in Linux binaries". LWN.net.
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.