I've played around with running systems from RAM in virtual machines.
It may help to understand part of the boot process. Here is a simplified version:
1. The bootloader loads the kernel into RAM, along with an initramfs image (actually a (optionally compressed) cpio archive in the newc format)
2. The kernel then extracts the initramfs image into RAM, then runs /init from it (if it's executable).
3. /init in the initramfs will then mount the real filesystem, and then chance to that root.
Note that the initramfs can do anything that userspace can do. For example, instead of simply mounting the disk, it could do one of these:
* Mount a filesystem over the network, and make that the root filesystem.
* Find a .tar.gz archive from a physical device, extract it into RAM (a tempfs filesystem), and make that the root filesystem.
* Mount a squashfs filesystem somewhere, create an overlay with the changes stored in tmpfs, and then make the overlay the root filesystem. (It's quite common for live CDs to do this.)
* Just be the root filesystem; the init program is the final init, and everything is run from this image in RAM. No need to switch root filesystems when doing this. (Tiny Core does this, as does Alpine when run from CD/USB.)