I'm working on designing a group of Java programs that I hope to turn into a Java-based OS someday. Until I get a kernel working, I want to just run them on top of Ubuntu. Because of this, I need all filesystem calls directed to a different directory in my home folder, so accessing
/ from within Java would actually access
I've looked at the community documentation for using
chroot, but it says to set up a basic installation of Ubuntu in it. Is this really necessary? All I want is to run Java applications inside it so the app thinks it is in its own fake filesystem. I don't want all the extra Ubuntu stuff.
According to the aforesaid docs:
In many ways, a chroot is like installing another operating system inside your existing operating system.
But I don't want this. All I want is to hide most of the real filesystem from the app so it sees only one directory.
I've also seen the manpage for the
chroot function. Will this do what I want?
Is there any simple way to run a Java application in its own fake filesystem using
chroot (without all the extra Ubuntu stuff), and if so, how?