# create mount folder:
mkdir /tmp/my10mbvirtualdisk
# create file system (filename=filesyst in current folder) (10Mb):
dd if=/dev/zero of=./filesyst bs=10485760 count=1
sudo losetup /dev/loop0 ./filesyst
sudo mkfs.ext3 /dev/loop0
sudo mount /dev/loop0 /tmp/my10mbvirtualdisk
# now you can use /tmp/my10mbvirtualdisk as disk
# destroy:
sudo umount /tmp/my10mbvirtualdisk
sudo losetup -d /dev/loop0
sudo rm ./filesyst
Create and mount a virtual disk
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.