Do you need initrd to boot Linux kernel?

Do you need initrd to boot Linux kernel?

For experimenting with initrd, you may want to take a rescue floppy and only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you can try the experimental newlib environment [2] to create a small initrd. Finally, you have to boot the kernel and load initrd. Almost all Linux boot loaders support initrd.

What does init do to the root device?

Now you can boot and enjoy using initrd. When finished with its duties, init typically changes the root device and proceeds with starting the Linux system on the “real” root device. Mounting the new root file system is easy: it just needs to be mounted on a directory under the current root.

Can a Linux kernel be compressed into an initrd?

Optionally, it can now be compressed: For experimenting with initrd, you may want to take a rescue floppy and only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you can try the experimental newlib environment [2] to create a small initrd. Finally, you have to boot the kernel and load initrd.

Where does the initrd data go when using Lilo?

When using LILO, you have to specify the RAM disk image file in /etc/lilo.conf, using the INITRD configuration variable. noinitrd initrd data is preserved but it is not converted to a RAM disk and the “normal” root file system is mounted. initrd data can be read from /dev/initrd.

For experimenting with initrd, you may want to take a rescue floppy and only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you can try the experimental newlib environment 2 to create a small initrd. Finally, you have to boot the kernel and load initrd. Almost all Linux boot loaders support initrd.

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.

How to write to the initrd file system?

(rw is only necessary if writing to the initrd file system.) With LILO, you add the option INITRD= to either the global section or to the section of the respective kernel in /etc/lilo.conf, and pass the options using APPEND, e.g.: For other boot loaders, please refer to the respective documentation.

Is it possible to boot Linux kernel without creating.cpio?

In the latter case, the .cpio is expanded into a filesystem called initramfs. If the .cpio image isn’t present, the kernel uses a built-in image instead, which contains just a few special files (such as /dev/console, /dev/null and a few directories), but no binaries.