progress
This commit is contained in:
parent
47cf364476
commit
0a4a340471
16
main.sh
16
main.sh
|
@ -112,17 +112,17 @@ do_partition() {
|
|||
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}" -d -
|
||||
vgcreate vg-${TARGETNAME} /dev/mapper/luks-${TARGETNAME}
|
||||
lvcreate --name swap -L ${SWAPSIZE}G vg-${TARGETNAME}
|
||||
lvcreate --name root -l 100%FREE vg-${TARGETNAME}
|
||||
mkswap -f /dev/mapper/vg-${TARGETNAME}-swap
|
||||
mkfs.btrfs -f /dev/mapper/vg-${TARGETNAME}-root
|
||||
mount /dev/mapper/vg-${TARGETNAME}-root $target
|
||||
echo -n $pass | cryptsetup luksOpen ${TARGET_PHY_WWN}-part${TARGET_PART} "luks-${TARGETNAME_UNDERSCORE}" -d -
|
||||
vgcreate vg_${TARGETNAME_UNDERSCORE} /dev/mapper/luks-${TARGETNAME_UNDERSCORE}
|
||||
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
|
||||
mkfs.btrfs -f /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root
|
||||
mount /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root $target
|
||||
btrfs subvol create ${target}/root
|
||||
btrfs subvol create ${target}/home
|
||||
umount $target
|
||||
mount /dev/mapper/vg-${TARGETNAME}-root $target -o subvol=root
|
||||
mount /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root $target -o subvol=root
|
||||
if [ "$EFI" == "1" ]; then
|
||||
mkdir -p ${target}/boot/efi
|
||||
mount ${TARGET_PHY_WWN}-part1 ${target}/boot/efi
|
||||
|
|
Loading…
Reference in New Issue
Block a user