Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

vmlinux

From Wikipedia, the free encyclopedia
Executable file containing the Linux kernel
icon
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)
Linux kernel boot and decompression process

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.

Etymology

[edit]

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]

Location

[edit]

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]

Compression

[edit]

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.

bzImage

[edit]
Anatomy of a bzImage

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.

See also

[edit]

Notes and references

[edit]
  1. ^ab"vmlinuz Definition".www.linfo.org. Bellevue Linux. March 29, 2005. Retrieved2015-06-21.
  2. ^"Section 3.5.2 — /boot : Static files of the boot loader".FHS 2.3. 2004-01-29. Retrieved2014-03-11.The operating system kernel must be located in either / or /boot.
  3. ^abLinux 2.6.30, released the 9th of June 2009, added support to compress the kernel image with the LZMA and bzip2 algorithms[1]
  4. ^Linux 2.6.33, released on February 24, 2010, added support to compress the kernel image with LZO[2]
  5. ^Linux 2.6.38, released on March 14, 2011, added support to compress the kernel image with xz[3]
  6. ^Linux 3.11, released on September 2, 2013, added support to compress the kernel image with LZ4[4]
  7. ^Linux 5.9, released on October 11, 2020, added support to compress the kernel image,initrd andinitramfs with zstd[5]
  8. ^Rubini, Alessandro (June 1997)."Booting the Kernel".www.linux.it. Retrieved2025-08-26.
  9. ^Yann Droneaud (1999-09-28)."Re: bzImage decompression".LKML (Mailing list).The zImage contain bootsect.o + setup.o + misc.o + piggy.o

Further reading

[edit]
  • Alavoor Vasudevan (2003-08-15). "10. Kernel Files Information".The Linux Kernel HOWTO. Archived fromthe original on 2017-10-10. Retrieved2014-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.

External links

[edit]
Organization
Kernel
Support
People
Technical
Debugging
Startup
ABIs
APIs
Kernel
System Call
Interface
In-kernel
Userspace
Daemons,
File systems
Wrapper
libraries
Components
Variants
Virtualization
Adoption
Range
of use
Adopters
Retrieved from "https://en.wikipedia.org/w/index.php?title=Vmlinux&oldid=1307996810"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp