Everything in Linux-based systems is a file. Everytime I install Ubuntu, I choose a root partition. Now, I want to create a root filesystem, but in a file, for example ~/ubuntu.img. I've got another Linux distro (based on Ubuntu) as the main OS. Is there a way to install (s)ubiquity and select ~/ubuntu.img as the root filesystem? As far as I know, the installer mounts the root filesystem at /target and uses chroot. Maybe I can mount my root filesystem there and install manually?
I want to do this because:
- I don't want to install more than 1 OS and dual boot.
- My main OS doesn't support some packages or has some dependency issues when I want to compile some projects.
If I'm able to install Ubuntu this way, I'll use chroot to install packages inside the root filesystem image.