What is Vmlinuz and initrd?

What is Vmlinuz and initrd?

vmlinuz is the name of the Linux kernel executable. vmlinux is generally just an intermediate step to producing vmlinuz. initrd: The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real rootfile system is available.

What is initrd used for?

In computing (specifically as regards Linux computing), initrd (initial ramdisk) is a scheme for loading a temporary root file system into memory, which may be used as part of the Linux startup process.

What are loads initramfs?

The initramfs is a complete set of directories that you would find on a normal root filesystem. At boot time, the boot loader loads the kernel and the initramfs image into memory and starts the kernel. The kernel checks for the presence of the initramfs and, if found, mounts it as / and runs /init.

What is difference between Vmlinux and vmlinuz?

The vmlinux is the uncompressed built kernel, vmlinuz is the compressed one, that has been made bootable. (Note both names vmlinux and vmlinuz look same except for last letter z). Generally, you don’t need to worry about vmlinux, it is just an intermediate step.

Why do we need initramfs and initrd?

When kernel is compiled we can select different modules to be included into kernel image (one single file) Now kernel can mount reiserfs it mounts and than unloads (frees) memory occupied by ramfs

How does the kernel free memory when using initrd?

When using initrd, the system typically boots as follows: the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change mechanism” section below.

What are the objects in the initrd file?

The above should be self-explanatory — your default initramfs will contain all of two objects — a /root directory and a /dev/console special device file. That’s not terribly exciting, which means that if you don’t design a usable initramfs for your kernel, you’d better have a practical initrd file to pick up the slack.

What’s the difference between initrd and ramfs?

Both initrd and ramfs are zipped at compile time, but the difference is, initrd is a block device unpacked to be mounted by the kernel at booting, while ramfs is unpacked via cpio into memory. Am I correct? Or is ramfs a very minimal file system? Finally, up until this day, the initrd image is still presented in the latest kernel.