Mounting a loopback device through stdin.
I'm experimenting with creating "virtual" filesystems. What I"ve done so far is simply made an ext2 filesystem in a file called "filesystem" that fits onto my 128 mb thumbdrive.
Now, I'm doing this to experiment mounting this filesystem through an encryption program of mine. It's pretty easy to simply store the decrypted version of the file somewhere, but right now I'm trying to find a way to simply load the decrypted data from memory.
The first thing I tried was making a named pipe with mkfifo. I would decrypt the file to that named pipe, and then try to mount that named pipe with
However, when I tried mounting that named pipe, I got the following error
mount -o loop -t ext2 named_pipe mount_point
I haven't really been able to decipher what this means, but I"m assuming I probably just can't do it in the way that I'm wanting to do it.
ioctl: LOOP_SET_FD: Invalid argumen
So my question is: What is the reason that this won't work, and how might I accomplish what I"m trying to do? I thought about making a RAM disk and decrypted the data to that, and mounting that, but I don't know how to do that at all, and I"m still wanting to experiment with stdin and stdout.
Just to clarify what I"m doing here...
I have an encrypted 128 mb ext2 filesystem that I want to mount. I don't want to have to decrypt the whole file to another location on the disk first, and would like to find a way to to send the decrypted data to memory, mount that data, without having to have the decrypted data ever sent to disk.