removing errors and fine tuning

This commit is contained in:
farhan 2021-11-12 20:05:04 +00:00
parent 56afc4e544
commit 1c23c706e1
1 changed files with 18 additions and 16 deletions

View File

@ -65,22 +65,24 @@ fi
# make filesystems # make filesystems
echo -e "\nCreating Filesystems...\n$HR" echo -e "\nCreating Filesystems...\n$HR"
if [[ ${DISK} =~ "nvme" && ${FS} == "btrfs" ]]; then if [[ ${DISK} =~ "nvme"]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2" if [[ ${FS} == "btrfs" ]]; then
mkfs.btrfs -L "ROOT" "${DISK}p3" -f mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mount -t btrfs "${DISK}p3" /mnt mkfs.btrfs -L "ROOT" "${DISK}p3" -f
elif [[ ${DISK} =~ "sd" && ${FS} == "btrfs"]]; then mount -t btrfs "${DISK}p3" /mnt
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2" else
mkfs.btrfs -L "ROOT" "${DISK}3" -f mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mount -t btrfs "${DISK}3" /mnt mkfs.ext4 -L "ROOT" "${DISK}p3"
elif [[ ${DISK} =~ "nvme" && ${FS} == "ext4" ]]; then mount -t ext4 "${DISK}p3" /mnt
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2" else [[ ${DISK} =~ "sd"]]; then
mkfs.ext4 -L "ROOT" "${DISK}p3" if [[ ${FS} == "btrfs" ]]; then
mount -t ext4 "${DISK}p3" /mnt mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2"
else mkfs.btrfs -L "ROOT" "${DISK}3" -f
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2" mount -t btrfs "${DISK}3" /mnt
mkfs.ext4 -L "ROOT" "${DISK}3" else
mount -t ext4 "${DISK}3" /mnt mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.ext4 -L "ROOT" "${DISK}p3"
mount -t ext4 "${DISK}p3" /mnt
fi fi
if [[ ${FS} =~ "btrfs" ]]; then if [[ ${FS} =~ "btrfs" ]]; then
ls /mnt | xargs btrfs subvolume delete ls /mnt | xargs btrfs subvolume delete