i have a Linux system (that currently boots via EFISTUB). i want to install a second operating system but not add any storage devices or repartition my existing setup.
is there a way i can have an img file that contains the entire partition table and filesystem for a second OS, and then boot the machine from it? I’m not talking about a RAMdisk like live session images use. i want to actually make changes while the OS inside the img is booted, and have those changes actually write to the image.
i know some motherboard firmwares can emulate a block device from an image file. unfortunately mine is not one of them.
ideally, i want to pick whether to boot my Linux system or my img file by selecting different .efi files for my motherboard to load. if that’s not feasible, i have grub2 installed if there’s a way to accomplish my goal with that.