dd if=/dev/urandom of="$device"1
fi
+# Setup mountpoint and make sure it's not mounted due to a failed install.
+mkdir -p /tmp/debootstrap
+umount /tmp/debootstrap/proc &> /dev/null
+umount /tmp/debootstrap/dev &> /dev/null
+
# Create root device.
if [ "$encrypt" == "y" ]; then
echo "Creating encrypted root device..."
install_device="/dev/vg/root"
fi
-# Setup mountpoint and make sure it's not mounted due to a failed install.
-mkdir -p /tmp/debootstrap
-umount /tmp/debootstrap/proc &> /dev/null
-umount /tmp/debootstrap/dev &> /dev/null
-
# Initial system install.
echo "Installing base system..."
mount $install_device /tmp/debootstrap/