#!/bin/bash set -e cd / mkdir -p /mnt/tmp mount -t tmpfs none /mnt/tmp mkdir -p /mnt/tmp/upper mkdir -p /mnt/tmp/work mount -t overlay overlay -o lowerdir=/opt/root,upperdir=/mnt/tmp/upper,workdir=/mnt/tmp/work /root cd /root