aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/2021-12-02-toying-with-virtio/build_ext2.sh
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2022-04-17 00:00:05 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2022-04-17 00:00:05 +0200
commit9bdc2b4fec2f5d11c9648916f362206d31ab6e0d (patch)
treefa06a961c280a0a40167efcf42f5c09ec4c59f45 /content/2021-12-02-toying-with-virtio/build_ext2.sh
parent0730e22f17dbbdcc8559d743494b20d5ca782b35 (diff)
downloadblog-9bdc2b4fec2f5d11c9648916f362206d31ab6e0d.tar.gz
blog-9bdc2b4fec2f5d11c9648916f362206d31ab6e0d.zip
virtio: add script and make target to build ext2 device
Diffstat (limited to 'content/2021-12-02-toying-with-virtio/build_ext2.sh')
-rwxr-xr-xcontent/2021-12-02-toying-with-virtio/build_ext2.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/2021-12-02-toying-with-virtio/build_ext2.sh b/content/2021-12-02-toying-with-virtio/build_ext2.sh
new file mode 100755
index 0000000..6e6bff8
--- /dev/null
+++ b/content/2021-12-02-toying-with-virtio/build_ext2.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+dd if=/dev/zero of=blk.ext2 bs=1M count=128
+mkfs.ext2 blk.ext2
+sudo mount -t ext2 -o loop blk.ext2 /mnt
+echo world | sudo tee /mnt/hello
+sudo umount /mnt