2017-07-30 21:33:59 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "~> Setting up $blockdevice with:"
|
|
|
|
echo " * 300M EFI (FAT32) partition"
|
|
|
|
echo " * <full> crypted (LUKS) root (EXT4) partition"
|
|
|
|
|
2017-07-30 22:20:13 +00:00
|
|
|
echo -e "g\nn\n1\n2048\n+300M\nn\n2\n\n\np\nw" | fdisk $blockdevice
|
2017-07-30 21:33:59 +00:00
|
|
|
|
|
|
|
if [ "$?" -eq 0 ]; then
|
|
|
|
echo "~> Seems to have worked. Yay!"
|
2017-08-31 14:27:55 +00:00
|
|
|
amf_return=0
|
2017-07-30 21:33:59 +00:00
|
|
|
else
|
|
|
|
echo "~> Failed. :("
|
2017-08-31 14:27:55 +00:00
|
|
|
amf_return=1
|
2017-07-30 21:33:59 +00:00
|
|
|
fi
|
2018-03-05 13:22:08 +00:00
|
|
|
return $amf_return
|