First, I have create the directory that I will want to mount to.
Now, I could easily turn this into a ramdisk using ramfs or tmpfs via
mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk
I've found a tutorial on how to create a ramdisk which breaks this syntax down as:
mount -t [TYPE] -o size=[SIZE] [FSTYPE] [MOUNTPOINT]
The tutorial indicates that I can replace [FSTYPE] with ext4 to change the FS to ext4. However, I am not convinced this method is correct and that the author has misjudged what changing the [FSTYPE] argument actually does.
UPDATE: For those interested, G-Man and Johan Myréen have weighed in on my speculations about [FSTYPE]. Essentially, the [FSTYPE] argument acts as a necessary (but ignored) placeholder used by
mount. See this post's comments for more details.
I would like to know the proper way to create an ext4 ramdisk. That is, I want a temporary directory in memory that uses the ext4 file system. How can this be achieved?