progress
This commit is contained in:
parent
01197c190e
commit
ed5bc28ec5
13
main.sh
13
main.sh
|
@ -58,7 +58,6 @@ use_efi() {
|
|||
|
||||
encryption_style() {
|
||||
header "Choose encryption style"
|
||||
echo "implemented:"
|
||||
echo "a)keyfile in initramfs" #bios: 1 uefi: 2
|
||||
echo "b)no encryption" #bios: 2 uefi: 2
|
||||
#echo "not implemented:"
|
||||
|
@ -118,10 +117,14 @@ do_partition() {
|
|||
sleep 2
|
||||
TARGETNAME=$(basename ${TARGET_PHY_WWN}-part${TARGET_PART})
|
||||
TARGETNAME_UNDERSCORE=${TARGETNAME//-/_}
|
||||
echo -n $pass | cryptsetup luksFormat ${TARGET_PHY_WWN}-part${TARGET_PART} -d -
|
||||
#echo -n $pass | sudo cryptsetup luksOpen /dev/sdc1 sdc1 -d -
|
||||
echo -n $pass | cryptsetup luksOpen ${TARGET_PHY_WWN}-part${TARGET_PART} "luks_${TARGETNAME_UNDERSCORE}" -d -
|
||||
vgcreate vg_${TARGETNAME_UNDERSCORE} /dev/mapper/luks_${TARGETNAME_UNDERSCORE}
|
||||
T=/dev/disk/by-id/${TARGET_PHY_WWN}-part${TARGET_PART}
|
||||
if [ "$ENCRYPTION_STYLE" == "a" ]; then
|
||||
T=/dev/mapper/luks_${TARGETNAME_UNDERSCORE}
|
||||
echo -n $pass | cryptsetup luksFormat ${TARGET_PHY_WWN}-part${TARGET_PART} -d -
|
||||
#echo -n $pass | sudo cryptsetup luksOpen /dev/sdc1 sdc1 -d -
|
||||
echo -n $pass | cryptsetup luksOpen ${TARGET_PHY_WWN}-part${TARGET_PART} "luks_${TARGETNAME_UNDERSCORE}" -d -
|
||||
fi
|
||||
vgcreate vg_${TARGETNAME_UNDERSCORE} $T
|
||||
lvcreate --name swap -L ${SWAPSIZE}G vg_${TARGETNAME_UNDERSCORE}
|
||||
lvcreate --name root -l 100%FREE vg_${TARGETNAME_UNDERSCORE}
|
||||
mkswap -f /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap
|
||||
|
|
Loading…
Reference in New Issue
Block a user