Add a comment. Active Oldest Votes. Improve this answer. Douglas Leeder Douglas Leeder Yes, you can boot a system without an initrd image. In the latter case, the. This "legacy" boot system is mostly not used in modern distributions. MarkR MarkR This is interesting, where can I find more details about that built-in image?
Pekka Takala Pekka Takala 11 1 1 bronze badge. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta. Now live: A fully responsive profile. For most distributions, kernel modules are the biggest reason to have an initramfs. In a general distribution, there are many unknowns such as file system types and disk layouts.
In a way, this is the opposite of LFS where the system capabilities and layout are known and a custom kernel is normally built. In this situation, an initramfs is rarely needed. There are only four primary reasons to have an initramfs in the LFS environment: loading the rootfs from a network, loading it from an LVM logical volume, having an encrypted rootfs where a password is required, or for the convenience of specifying the rootfs as a LABEL or UUID.
Anything else usually means that the kernel was not configured properly. If you do decide to build an initramfs, the following scripts will provide a basis to do it. Recent kernels have support for populating a ramdisk from a compressed cpio archive. The name is not relevant. If the root file system is created during the boot procedure i. If initrd will not be mounted in some cases, its content is still accessible if the following device has been created:. Also, at least all components needed to execute programs from initrd e.
Third, you have to create the RAM disk image. This is done by creating a file system on a block device, copying files to it as needed, and then copying the content of the block device to the initrd file. With recent kernels, at least three types of devices are suitable for that:. This is of course limited to initrds that do not interfere with the general system state e.
However the initial ram system allows bootstrapping of any possible configuration, without needing any special handling in the kernel. Writing kernel code is a Big Deal. The initial ram system is the correct solution. We can use lots of similar code to the main system, e. Booting from an encrypted filesystem is one great example of this. Kernel doesn't have to prompt for the passphrase. This is useful because otherwise your boot breaks when you remove an unrelated partition, because they're all renumbered.
Or when you move disks around or between computers. Or when the disk is a live CD. Why do we need a ram filesystem? It can just hand us the data as a block of memory, and we're done. We want to keep the boot process as simple we can.
Bootup is both critical, and a special case. We don't need a complex interface with other special-case software. Especially the firmware case. Firmware is such a special case, so we wouldn't care about it the rest of the time, it'll be riddled with bugs no-one noticed.
And firmware is so critical, that any fixes to it are very risky.
0コメント