[中英对照]vmlinuz Definition | vmlinuz的定义

vmlinuz Definition | vmlinuz的定义

vmlinuz is the name of the Linux kernel executable.
vmlinuz是Linux内核可执行文件的名字。

A kernel is a program that constitutes the central core of a computer operating system. It is the first thing that is loaded into memory (which physically consists of RAM chips) when a computer is booted up (i.e., started), and it remains in memory for the entire time that the computer is in operation. An executable, also called an executable file, is a file that can be run as a program.
内核是构成计算机操作系统核心的程序。当计算机启动的时候,内核是一个被加载到内存(物理上由RAM芯片构成)中的,然后在计算机被使用的过程中常驻内存。 "executable"是可执行文件的意思,它是一个可以用来运行的程序。

vmlinuz is a compressed Linux kernel, and it is bootable. Bootable means that it is capable of loading the operating system into memory so that the computer becomes usable and application programs can be run.
vmlinuz是一个压缩的Linux内核,而且它是可以用来启动计算机的。 "Bootable"的意思是它有能力将操作系统加载到内存中去,因此计算机就可以使用了,应用程序就可以跑起来了。

vmlinuz should not be confused with vmlinux, which is the kernel in a non-compressed and non-bootable form. vmlinux is generally just an intermediate step to producing vmlinuz.
不要把vmlinuzvmlinux搞混淆了。 vmlinux是未经过压缩也不能用来启动计算机的内核。vmlinux一般作为中间步骤用来创建vmlinuz

vmlinuz is located in the /boot directory, which is the directory that contains the files needed to begin booting the system. The file named vmlinuz might be the actual kernel executable itself, or it could be a link to the kernel executable, which might bear a name such as /boot/vmlinuz-2.4.18-19.8.0 (i.e., the name of the specific version of the kernel). This can be easily determined by using the ls command (whose purpose is to list the contents of a specified directory) with its -l option (which tells ls to provide detailed information about each object in the specified directory) as follows:
vmlinz的位置在/boot目录,该目录包括了启动系统需要的文件。 叫做vmlinuz的文件可能是实际的启动内核可执行文件,或者是指向启动内核可执行文件(例如:/boot/vmlinuz-2.4.18-19.8.0)的一个软链接。用带-l参数的ls命令可以很容易地探测出来,如下所示:

ls -l /boot

If vmlinuz is an ordinary file (including an executable), the information about it in the first column will begin with a hyphen. If it is a link, it will begin with the letter l.
如果vmlinuz是一个普通文件(包括可执行文件),在显示的信息中的第一列以连字符('-')开始。如果为链接文件,则以字符'l'开始。

The Linux kernel is compiled by issuing the following command:
使用下列命令编译Linux内核:

make bzImage

This results in the creation of a file named bzImage in a directory such as /usr/src/linux/arch/i386/linux/boot/.
编译的结果就是在一个特定的目录(例如:/usr/src/linux/arch/i386/linux/boot/)下面创建一个名字为bzImage的文件。

Compilation is the conversion the kernel's source code (i.e., the original form in which the kernel is written by a human) into object code (which is understandable directly by a computer's processor). It is performed by a specialized program called a compiler, usually one in the GCC (GNU Compiler Collection).
编译是将内核的源代码(即内核是由人类编写的原始形式)转换为目标代码(即可为计算机处理器直接理解)。它由一个被称之为编译器的专门程序执行,通常是GCC。

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命令将文件bzImage拷贝到目录/boot下面,与此同时重新命名为vmlinuz, 例如:

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

vmlinuz is not merely a compressed image. It also has gzip decompressor code built into it. gzip is one of the most popular compression utilities on Unix-like operating systems.
vmlinuz不仅仅是一个压缩镜像。 它还包含了解压缩工具gzip。gizp是在类Unix平台上最流行的压缩压缩/解压缩工具之一。

A compiled kernel named zImage file is created on some older systems and is retained on newer ones for backward compatibility. Both zImage and bzImage are compressed with gzip. The difference is that zImage decompresses into low memory (i.e., the first 640kB), and bzImage decompresses into high memory (more than 1MB). There is a common misconception that bzImage is compressed with the bzip2 utility; actually, the b just stands for big.
在老的系统上,编译后的内核文件名为zImage。这一名字新的系统上仍旧可见,出于向后兼容的原因。 无论是zImage还是bzImage都是使用gzip工具压缩。不同的是,zImage被解压缩到低内存空间(也就是第一个640KB空间), 而bzImage被解压缩到高内存空间(大于1MB)。有一个普遍的误解是bzImage是使用bzip2工具压缩的,而实际上,'b'代表的是"big"(大)。

The name vmlinuz is largely an accident of history. The kernel binary on the original UNIX as developed at Bell Labs was called unix. When a new kernel containing support for virtual memory was subsequently written at the University of California at Berkeley (UCB), the kernel binary was renamed vmunix.
vmlinuz这一名称在很大程度上是一个历史的意外。在贝尔实验室开发的原始的UNIX上的内核二进制被称为unix。支持虚拟内存的新内核后来在加州大学伯克利分校(UCB)被开发出来,内核二进制被更名为vmunix。

Virtual memory is the use of space on a hard disk drive (HDD) to simulate additional RAM (random access memory) capacity. It was supported by the Linux kernel almost from Linux's inception, in contrast to some other popular operating systems in use at the time, such as MS-DOS.
虚拟内存是利用硬盘驱动器(HDD)上的空间来模拟额外的RAM(随机存取存储器)的能力。Linux几乎从创立以来就支持虚拟内存,而其他一些流行的操作系统则不然,例如MS-DOS。

Thus, it was a natural progression for the Linux kernel to be called vmlinux. And because the Linux kernel executable was made into a compressed file and compressed files typically have a z or gz extension on Unix-like systems, the name of the compressed kernel executable became vmlinuz.
因此,对Linux内核来说,这是一个自然的进化,于是被称为vmlinux。由于Linux内核可执行文件被压缩成一个文件,而且在类Unix系统上典型的压缩文件的扩展名为z或者gz,压缩的Linux内核可执行文件的名字也因此就成为了vmlinuz。

扩展阅读:

小结:

vmlinux: A non-compressed and non-bootable Linux kernel file format, just an
         intermediate step to producing vmlinuz.
vmlinuz: A compressed and bootable Linux kernel file. It is actually zImage
         or bzImage file.
zImage:  For old kernels, just fit 640k ram size.
bzImage: Big zImage, no 640k ram size limit, can much larger.
原文地址:https://www.cnblogs.com/idorax/p/7825132.html