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

Code:

mount -o loop -t ext2 named_pipe mount_point

However, when I tried mounting that named pipe, I got the following error

Code:

ioctl: LOOP_SET_FD: Invalid argumen

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.

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.

06-26-2008

i92guboj

Don't take my word as the truth, but it would surprise me if there's a way to mount a fifo. Filesystems are entities whose access model is completely random, where fifos are queues, and don't permit random access, they can only be read on a secuential fashion and when you read something the data is consumed.