Introduction to kernel boot file vmlinuz
Vmlinuz is a bootable and compressed kernel. "VM" represents "Virtual Memory ". Linux supports Virtual Memory. Unlike earlier operating systems such as DOS, there is a limit of KB memory. Linux can use hard disk space as virtual memory, so it is named "VM ". Vmlinuz is an executable Linux kernel located in/boot/vmlinuz, which is generally a soft link than a soft link in the vmlinuz-2.4.7-10.
There are two ways to establish vmlinuz. First, when compiling the kernel, use "make zimage" to create it, and then run the following command:
"CP/usr/src/linux-2.4/ARCH/i386/Linux/boot/zimage/boot/vmlinuz" is generated. Zimage is suitable for small kernels. It exists for backward compatibility. The second is when the kernel is compiled by the command make bzimage to create, and then through: "CP/usr/src/linux-2.4/ARCH/i386/Linux/boot/bzimage/boot/vmlinuz" generated. Bzimage is a compressed kernel image. It should be noted that bzimage is not compressed with Bzip2, and BZ in bzimage is easy to misunderstand. BZ indicates "Big zimage ". B In bzimage means "big.
Both zimage (vmlinuz) and bzimage (vmlinuz) are compressed using gzip. They are not only a compressed file, but are embedded with gzip decompression code at the beginning of the two files. Therefore, you cannot use gunzip or gzip-DC to unpackage vmlinuz.
The inner-core file contains a micro gzip used to extract the kernel and boot it. The difference between the two is that the old zimage decompress the kernel to the low-end memory (the first 640 K), and The bzimage decompress the kernel to the high-end memory (more than 1 MB ). If the kernel is small, zimage or bzimage can be used. The two methods guide the same system runtime. Bzimage is used for large kernels, and zimage cannot be used.
Vmlinux is an uncompressed kernel and vmlinuz is a compressed file of vmlinux.
1. during GRUB boot, you need to use the kernel command to specify the kernel file, that is, vmlinuz "VM" indicates virtual memory, virtual memory, and Z indicates zip (compression). Note that it is a soft link, there are two ways to establish to the vmlinuz-2.4.20-8vmlinuz. First, create the kernel by using "make zimage" and then run the following command: "CP
/Usr/src/linux-2.4/ARCH/i386/Linux/boot/zimage/boot/vmlinuz "is generated. Zimage applies
In the case of a small kernel, it exists for backward compatibility. Second, run the make command during kernel compilation.
Bzimage created and then passed: "CP/usr/src/linux-2.4/ARCH/i386/Linux/boot/bzimage
/Boot/vmlinuz. Bzimage is a compressed kernel image. It should be noted that bzimage is not compressed with Bzip2, and BZ in bzimage is prone
Misunderstanding: Bz indicates "Big zimage ". B In bzimage means "big.
Both zimage (vmlinuz) and bzimage (vmlinuz) are compressed using gzip. They are not only a compressed file, but also embedded at the beginning of the two files
Decompress the gzip code. Therefore, you cannot use gunzip or gzip-DC to unpackage vmlinuz. The kernel file contains a miniature GZIP file for decompression.
Shrink the kernel and boot it. The difference between the two is that the old zimage decompress the kernel to the low-end memory (the first 640 K), and The bzimage decompress the kernel to the high-end memory (more than 1 MB ). If
The kernel is relatively small, so zimage or bzimage can be used. The two methods guide the same system runtime. Bzimage is used for large kernels, and zimage cannot be used.
Vmlinux is an uncompressed kernel and vmlinuz is a compressed file of vmlinux. 2. initrd is short for "Initial ramdisk. Initrd is generally used to temporarily boot the hardware to the State where the actual kernel vmlinuz can take over and continue to boot. The initrd-2.4.7-10. IMG in the figure is mainly used to load file systems and SCSI device drivers such as ext3.
For example, if a SCSI hard disk is used and the kernel vmlinuz does not have the SCSI hardware driver, the kernel cannot load the root file system before the SCSI module is loaded, but the SCSI
The module is stored in/lib/modules of the root file system. To solve this problem, we can guide an initrd kernel that can read the actual kernel and use initrd to correct SCSI Boot.
Problem. Initrd-2.4.7-10.img is compressed with gzip files, initrd to load some modules and install file systems and other functions.
The initrd image file is created using mkinitrd. The mkinitrd utility can create an initrd image file. This command is proprietary to RedHat. Others
The Linux release may have corresponding commands. This is a very convenient utility. For more information, see help: run the following command under man mkinitrd to create an initrd image file.