16 lines
320 B
Bash
Executable File
16 lines
320 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "~> Setting up $blockdevice with:"
|
|
echo " * 300M EFI (FAT32) partition"
|
|
echo " * <full> crypted (LUKS) root (EXT4) partition"
|
|
|
|
echo -e "g\nn\n1\n2048\n+300M\nn\n2\n\n\np\nw" | fdisk $blockdevice
|
|
|
|
if [ "$?" -eq 0 ]; then
|
|
echo "~> Seems to have worked. Yay!"
|
|
exit 0
|
|
else
|
|
echo "~> Failed. :("
|
|
exit 1
|
|
fi
|