#! /bin/bash

if [[ $# -ne 1 ]] || [[ ! -b "$@" ]]; then
    echo "Usage: [sudo] $0 PARTITION

Prepares PARTITION to use Linux Unified Key Setup (LUKS).

You will probably need to run this with sudo.

Use this script at your own risk: it will destroy anything on PARTITION!

This script will not prepare the new LUKS partition for use. You will need to run the open_luks script and then create a filesystem before mounting." | fmt -w66
    exit
fi

dd if=/dev/urandom of="$@" bs=16M
cryptsetup luksFormat "$@"

