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
echo -e "\nCreating Filesystems...\n$HR"
if [[ ${DISK} =~ "nvme" && ${FS} == "btrfs" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.btrfs -L "ROOT" "${DISK}p3" -f
mount -t btrfs "${DISK}p3" /mnt
elif [[ ${DISK} =~ "sd" && ${FS} == "btrfs"]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2"
mkfs.btrfs -L "ROOT" "${DISK}3" -f
mount -t btrfs "${DISK}3" /mnt
elif [[ ${DISK} =~ "nvme" && ${FS} == "ext4" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.ext4 -L "ROOT" "${DISK}p3"
mount -t ext4 "${DISK}p3" /mnt
else
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2"
mkfs.ext4 -L "ROOT" "${DISK}3"
mount -t ext4 "${DISK}3" /mnt
if [[ ${DISK} =~ "nvme"]]; then
if [[ ${FS} == "btrfs" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.btrfs -L "ROOT" "${DISK}p3" -f
mount -t btrfs "${DISK}p3" /mnt
else
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.ext4 -L "ROOT" "${DISK}p3"
mount -t ext4 "${DISK}p3" /mnt
else [[ ${DISK} =~ "sd"]]; then
if [[ ${FS} == "btrfs" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2"
mkfs.btrfs -L "ROOT" "${DISK}3" -f
mount -t btrfs "${DISK}3" /mnt
else
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.ext4 -L "ROOT" "${DISK}p3"
mount -t ext4 "${DISK}p3" /mnt
fi
if [[ ${FS} =~ "btrfs" ]]; then
ls /mnt | xargs btrfs subvolume delete