Live ISO, VFS, and mount points
Posted: Wed Mar 15, 2023 6:29 pm
I am booting from an ISO for my OSdev and I've implemented the Joliet ISO filesystem.
Since the block device shows up as CD-ROM, the root filesystem also becomes read-only by my design.
I also don't have a separate VFS. I just select the appropriate FS as / and let each FS implementation switch to another FS whenever a mount point is encountered during path traversal.
Now, when I want to mount other filesystems at some mount point say /fs/<GUID>, I'm unable to create the directory /fs.
I was thinking of adding a flag isVirtual to my makeDirectory function which will essentially mean this is a memory-only directory entry and must not be committed to the underlying device. But that seems hackish to me.
I have 2 questions.
1. Is there a better way to create "virtual" directories?
2. How does Live Ubuntu ISO or any other live distro handle this? Assuming the same CD-ROM constraints.
Since the block device shows up as CD-ROM, the root filesystem also becomes read-only by my design.
I also don't have a separate VFS. I just select the appropriate FS as / and let each FS implementation switch to another FS whenever a mount point is encountered during path traversal.
Now, when I want to mount other filesystems at some mount point say /fs/<GUID>, I'm unable to create the directory /fs.
I was thinking of adding a flag isVirtual to my makeDirectory function which will essentially mean this is a memory-only directory entry and must not be committed to the underlying device. But that seems hackish to me.
I have 2 questions.
1. Is there a better way to create "virtual" directories?
2. How does Live Ubuntu ISO or any other live distro handle this? Assuming the same CD-ROM constraints.