mount
is used for sharing a file system for user usage. That 'sharing' ( connection between file/thing containing the filesystem and user accessible directory and file structure) is done by a module
in kernel (program running inside the kernel). That 'program' translates user request (ex. create file) to operations on the filesystem.
What we need is a filesystem program which runs in userspace and does not call mount
. Userspace filesystems implementations are called fuse and i know there are fuse implementation of popular filesystems.
Anyway, i am not aware of any popular program, that will for example create a file in a filesystem on a file without 'mounting' it to a directory. You may browse examples on wiki, maybe you will find such program.
I would go with writing such program myself.
You may write your own filesystem or choose to use existing one and write a program to modify the content of a file (or ramdisk image, on linux it's a file) and then use this program to create and modify the content of this filesystem, without executing linux mount
call.
For example you may use fat_fs library, used in many embedded systems, implement fat_fs callbacks functions ex. disc_read() disc_write() to read and write from your file/ramdisc, and then call fat_fs functions to modify the content of the ramdisc/file. Such embedded libraries shouldn't do any calls to mount
or any linux syscalls, as these calls are missing on embedded systems.
PS. On my university there are such classes, that students must write a simple filesystem program that opens a file and supports files creation, modification and deletion in the filesystem in this file.