flinux icon indicating copy to clipboard operation
flinux copied to clipboard

Redesign root directory handling and implement chroot.

Open wishstudio opened this issue 10 years ago • 4 comments

Currently the root directory handling in flinux is simplistic. We use "GetCurrentDirectoryW()" to get the current directory and append our paths to it. This causes issues like #58 .

We need to redesign this root directory handling to allow user to choose the directory from the command line and support chroot properly.

wishstudio avatar Sep 04 '15 03:09 wishstudio

I think filesystems should be implemented in terms of mount/umount, which would make a few things easier and better. For example, a single winfs filesystem could be used to mount any part of a windows filesystem to any mount point. Of course, / would be mounted in the flinux startup code as is now, but later you could do something like mkdir /c && mount -t winfs "C:\" /cor whatever.

Sh4rK avatar Sep 20 '15 16:09 Sh4rK

But mount/umount have their own difficulties such that I don't want to introduce them too quickly.

Consider you have one flinux session which mounted "C:" to /c, the first question is when this session is ended, should this mount table be saved to disk and reloaded on later use?

Another issue is, when the session is active, what if the user opens another flinux session at a different root directory? It obviously cannot share that mount item.

wishstudio avatar Sep 20 '15 18:09 wishstudio

Ok, I see, it's not as easy as I thought.

Sh4rK avatar Sep 20 '15 18:09 Sh4rK

Yeah, let's discuss it carefully sometime before rushing into to an implementation.

wishstudio avatar Sep 21 '15 12:09 wishstudio