Skip to content

Instantly share code, notes, and snippets.

@klingtnet
Created November 6, 2019 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klingtnet/641c34de7aa4c258e11734f1288171ae to your computer and use it in GitHub Desktop.
Save klingtnet/641c34de7aa4c258e11734f1288171ae to your computer and use it in GitHub Desktop.
Use a file as blockdevice (experiment with filesystem options)
#!/bin/bash
dd if=/dev/zero of=/tmp/blockdevicefile bs=1M count=2K oflag=sync status=progress
mkfs.ext4 /tmp/blockdevicefile
mkdir /tmp/mountpath && sudo mount -o loop /tmp/blockdevicefile /tmp/mountpath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment