Add partitioning

This commit is contained in:
Bob Mottram 2015-11-04 22:36:52 +00:00
parent e96f2aea05
commit 96d6fea7ab
1 changed files with 18 additions and 1 deletions

View File

@ -34,7 +34,24 @@ if [ ! $1 ]; then
exit 1
fi
USB_DRIVE=/dev/${1}
USB_DRIVE=/dev/${1}1
LABEL='Freedombone'
echo 'Partitioning drive'
echo "o
d
2
d
1
n
p
1
a
1
w
" | fdisk /dev/${1};mkfs.ext4 -L "$LABEL" /dev/${1}1
echo "Formatting $USB_DRIVE as LUKS"
cryptsetup -y -v luksFormat ${USB_DRIVE}