You must create a minimal root filesystem. Tools like Buildroot or Yocto are standard for this. They compile a Linux kernel and a userspace (using busybox for utilities) into a single compressed archive, usually cpio.gz .
A (initial RAM disk, initrd or initramfs ) is a temporary root file system loaded into memory by the bootloader during the Linux (or other Unix-like OS) startup process. Its primary role is to bridge the gap between the minimal boot environment and the final, full root file system. boot ramdisk
In a ramdisk boot, the process diverges at the final step. The bootloader loads the kernel and an initial filesystem image directly into Random Access Memory (RAM). The kernel is instructed to use this memory region as the root filesystem. You must create a minimal root filesystem
In the modern computing landscape, we often take the persistent storage of our operating system for granted. We turn on a PC, the hard drive spins up (or the SSD powers on), and the OS loads. However, there is a distinct and powerful method of operation where the operating system exists entirely within the volatile memory of the computer: the . A (initial RAM disk, initrd or initramfs )