Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Etymology  





2 Location  





3 Compression  





4 bzImage  





5 See also  





6 Notes and references  





7 Further reading  





8 External links  














vmlinux






Čeština
Español


Norsk bokmål

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Linux kernel boot and decompression process

vmlinux is a statically linked executable file that contains the Linux kernel in one of the object file formats supported by Linux, which includes Executable and Linkable Format (ELF) and Common Object File Format (COFF). The vmlinux file might be required for kernel debugging, symbol table generation or other operations, but must be made bootable before being used as an operating system kernel by adding a multiboot header, bootsector and setup routines.

Etymology[edit]

Traditionally, UNIX platforms called the kernel image /unix. With the development of virtual memory, kernels that supported this feature were given the vm- prefix to differentiate them. The name vmlinux is a mutation of vmunix, while in vmlinuz the letter z at the end denotes that it is compressed (for example gzipped).[1]

Location[edit]

Traditionally, the kernel was located in the root directory of the filesystem hierarchy; however, as the bootloader must use BIOS drivers to access the hard disk, limitations on some i386 systems meant only the first 1024 cylinders of the hard disk were addressable.

To overcome this, Linux distributors encouraged users to create a partition at the beginning of their drives specifically for storing bootloader and kernel-related files. GRUB, LILO and SYSLINUX are common bootloaders.

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[edit]

Traditionally, when creating a bootable kernel image, the kernel is also compressed using gzip, or, since Linux 2.6.30,[3] using LZMAorbzip2, which requires a very small decompression 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 for LZO,[4] xz,[5] LZ4[6] and zstd[7] compression was added later.

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 SPARC architecture, the vmlinux file is compressed using simple gzip, because the SILO boot loader transparently decompresses gzipped images.

The filename of the bootable image is not important, but many popular distributions use vmlinuz.

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-contiguous memory regions.[citation needed]

The bzImage was compressed using gzip until Linux 2.6.30,[3] which introduced more algorithms. Although the bz prefix may suggest that bzip2 compression is used, this is not the case.[citation needed] (The bzip2 package is often distributed with tools prefixed with 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`/vmlinuxor/usr/lib/debug/lib64/modules/`uname -r`/vmlinux.

See also[edit]

Notes and references[edit]

  1. ^ "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]
  • ^ Linux 5.9, released on October 11, 2020, added support to compress the kernel image, initrd and 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[edit]

    External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Vmlinux&oldid=1222499066"

    Category: 
    Linux kernel
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Articles needing additional references from April 2012
    All articles needing additional references
    All articles with unsourced statements
    Articles with unsourced statements from October 2018
    Articles with unsourced statements from November 2020
     



    This page was last edited on 6 May 2024, at 08:48 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki