summaryrefslogtreecommitdiff
path: root/scripts/zerodisk.sh
diff options
context:
space:
mode:
authorJack Pearkes <jackpearkes@gmail.com>2015-04-15 16:09:08 -0700
committerJack Pearkes <jackpearkes@gmail.com>2015-04-15 16:11:25 -0700
commiteac1d1a6d1c638602dc696d4101c11a3f80cbc1e (patch)
tree54f558caadcc82978cd398bc59857f033e296a66 /scripts/zerodisk.sh
initial commit
Diffstat (limited to 'scripts/zerodisk.sh')
-rw-r--r--scripts/zerodisk.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/zerodisk.sh b/scripts/zerodisk.sh
new file mode 100644
index 0000000..35370d6
--- /dev/null
+++ b/scripts/zerodisk.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Zero out the free space to save space in the final image:
+dd if=/dev/zero of=/EMPTY bs=1M
+rm -f /EMPTY
+
+# Sync to ensure that the delete completes before this moves on.
+sync
+sync
+sync