Zend certified PHP/Magento developer

Is this possible to boot an OS from some kind of a file?

First of all, I want to say that this quesiton is purely theoretical. But if it’s possible, I would be really glad to learn its possible use cases, and overall drawbacks.

Is this possible to boot an OS, let’s say a Linux, from a file, rather then a drive? Like a file that has read/write access on a micro-USB. Imagine that you plugged in your USB. And chose the option that makes you boot from it. Now, there is a tiny-OS-like-software on this USB that controls booting, like grub. There are two primary partitions. The first one is for this micro-OS, and the second partition is like FAT, for data storage. And also, the latter one has multiple files as operating systems.

When system boots, this tiny-booting-OS reads the contents of one of those files, loads the kernel into the memory, and the kernel accesses the file, like it was accessing a drive. This file has different segments as directories and files, and stuff.

In practice, I guess I am thinking of something like a file-based filesystem. Do such a thing exist? If so, I think that it is either an ancient tech or a really unpractical one. Or maybe not? Would like to learn more about it.