diskimage-builder/tests/elements/fake-os/root.d/10-fake-os

17 lines
417 B
Plaintext
Raw Normal View History

#!/bin/bash
set -eux
set -o pipefail
sudo touch $TARGET_ROOT/fake-os
sudo mkdir -p $TARGET_ROOT/etc
sudo mkdir -p $TARGET_ROOT/mnt
sudo mkdir -p $TARGET_ROOT/proc
sudo mkdir -p $TARGET_ROOT/dev
sudo mkdir -p $TARGET_ROOT/sys
# We need some size so the mkfs does not fail when making an fs of size 0
# We also need to account for the journal size on the FS
dd if=/dev/zero of=$TARGET_ROOT/fake-data bs=1M count=42