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.
debootstrap
on it. But I don't see the point - you could pretty much get the same result with Docker or LXC containers with less hassle. – muru Mar 15 '21 at 07:34chroot
because I'm used to it... I also need to access USB devices from the chroot environment and I thought it's the easiest way. – adazem009 Mar 15 '21 at 07:36