#!/bin/bash
#
mkdir -p /mnt/ramdisk
#
mount -t tmpfs -o size=2G tmpfs /mnt/ramdisk
#
dd if=/dev/zero of=/mnt/ramdisk/cache_ram bs=1M count=2000
#
losetup /dev/loop2 /mnt/ramdisk/cache_ram
#
mkfs.ext4 /dev/loop2
#
mount /dev/loop2 /mnt/usb2/
#