Don't know if this qualifies as "sage advice", but the boot process works like this:
- A boot loader loads the Linux kernel file into memory. It may also load an initrd/initramfs image, depending on the configuration.
- The boot loader executes the kernel file, possibly also passing on some boot parameters.
- The kernel file decompresses itself, and initializes the hardware. Devices are served by built-in drivers, if available.
- The kernel attempts to mount the root file system. The name of the root device may have been given as a parameter by the boot loader. If not, defaults given at compile time are used. The root device may be a physical disk or the file system from step 1. The file system driver must be compiled into the kernel for this to work.
- Assuming the previous step succeded, /sbin/init is executed. I've heard rumours that some systems with initrds start /linuxrc instead, but my Slackware initrd uses the standard /sbin/init.
And yes, using a statically compiled "Hello world" executable as
/sbin/init should work (for very small quantities of "work").
Initramfs is just a (compressed) cpio archive that gets copied to a tempfs file system in RAM and then used as a root file system. It's an alternative to the older initrd concept, where a (compressed) image file containing a file system is used. Since initramfs is the more recent of the two, it's not likely to be deprecated any time soon (but then neither is initrd).