# Create directories in the filesystem
echo "Creating directories in the filesystem"
for NEW_DIR in bin boot dev etc lib media mnt opt proc sbin tmp usr var root srv home sys; do
mkdir tempfs/$NEW_DIR
done
mkdir tempfs/etc/init.d
mkdir tempfs/usr/bin
mkdir tempfs/usr/sbin
for NEW_DIR in cdrom floppy usb; do
for MNT_DIR in mnt media; do
mkdir tempfs/$MNT_DIR/$NEW_DIR
done
done

My new empty filesystem is mounted as "tempfs", so I create all the directories in it that a Linux distribution might need. Directories are small, but a missing one causes big problems, so create anything you think you might ever need.