lvm changes
This commit is contained in:
+18
-10
@@ -16,16 +16,16 @@ IMG_FILE="PBX-root.img.lz4"
|
||||
MOUNT_PATH="/mnt/debian"
|
||||
MOUNT_POINTS=("/dev" "/dev/pts" "/proc" "/sys" "/sys/firmware/efi/efivars" "/run")
|
||||
|
||||
BOOT_PART="null"
|
||||
EFI_PART="null"
|
||||
ROOT_PART="null"
|
||||
BOOT_PART="NULL"
|
||||
EFI_PART="NULL"
|
||||
ROOT_PART="NULL"
|
||||
|
||||
VGROUP="PBX-vg"
|
||||
VGROUP="SangomaPBX-vg"
|
||||
ROOT_LV="root"
|
||||
SWAP_LV="swap_1"
|
||||
VG_PATH="/dev/mapper/PBX--vg-"
|
||||
VG_PATH="/dev/mapper/SangomaPBX--vg-"
|
||||
|
||||
GRUB_CMD="export PATH=/usr/sbin:$PATH && update-initramfs -u -k all && grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian && update-grub"
|
||||
GRUB_CMD="export PATH=/usr/sbin:$PATH && update-initramfs -c -k all && grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian && update-grub"
|
||||
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
@@ -62,16 +62,15 @@ main() {
|
||||
|
||||
dialogue
|
||||
|
||||
trap 'echo "Status Code: $?"; cleanup;' EXIT
|
||||
assign_part_var
|
||||
|
||||
EFI_PART=$(get_partition $disk_name "1")
|
||||
BOOT_PART=$(get_partition $disk_name "2")
|
||||
ROOT_PART=$(get_partition $disk_name "3")
|
||||
trap 'echo "Status Code: $?"; cleanup;' EXIT
|
||||
|
||||
if [[ $NO_RETABLE == true ]]; then
|
||||
echo -e "${YELLOW}Option --noretable is specified. Tables will not be erased and no partitions will be created${RESET}"
|
||||
else
|
||||
rewrite_gpt_table
|
||||
assign_part_var
|
||||
lvm_init
|
||||
make_filesystem
|
||||
fi
|
||||
@@ -117,9 +116,18 @@ rewrite_gpt_table() {
|
||||
sgdisk -n 3:0:0 -t 3:8e00 -c 3:"Linux LVM" $disk_name
|
||||
|
||||
partprobe || true
|
||||
|
||||
lsblk $disk_name
|
||||
|
||||
echo -e "${GREEN}GPT table created. ${RESET}"
|
||||
}
|
||||
|
||||
assign_part_var() {
|
||||
EFI_PART=$(get_partition $disk_name "1")
|
||||
BOOT_PART=$(get_partition $disk_name "2")
|
||||
ROOT_PART=$(get_partition $disk_name "3")
|
||||
}
|
||||
|
||||
lvm_init() {
|
||||
pvcreate $ROOT_PART -ff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user