removing errors and fine tuning

This commit is contained in:
farhan 2021-11-12 20:32:46 +00:00
parent 1c23c706e1
commit 8c896a0a13
1 changed files with 16 additions and 13 deletions

View File

@ -65,7 +65,8 @@ fi
# make filesystems # make filesystems
echo -e "\nCreating Filesystems...\n$HR" echo -e "\nCreating Filesystems...\n$HR"
if [[ ${DISK} =~ "nvme"]]; then if [[ ${DISK} =~ "nvme" ]]; then
if [[ ${FS} == "btrfs" ]]; then if [[ ${FS} == "btrfs" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2" mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.btrfs -L "ROOT" "${DISK}p3" -f mkfs.btrfs -L "ROOT" "${DISK}p3" -f
@ -74,15 +75,17 @@ if [[ ${DISK} =~ "nvme"]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2" mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2"
mkfs.ext4 -L "ROOT" "${DISK}p3" mkfs.ext4 -L "ROOT" "${DISK}p3"
mount -t ext4 "${DISK}p3" /mnt mount -t ext4 "${DISK}p3" /mnt
else [[ ${DISK} =~ "sd"]]; then fi
elif [[ ${DISK =~ "sd" }]]; then
if [[ ${FS} == "btrfs" ]]; then if [[ ${FS} == "btrfs" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2" mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2"
mkfs.btrfs -L "ROOT" "${DISK}3" -f mkfs.btrfs -L "ROOT" "${DISK}3" -f
mount -t btrfs "${DISK}3" /mnt mount -t btrfs "${DISK}3" /mnt
else else
mkfs.vfat -F32 -n "EFIBOOT" "${DISK}p2" mkfs.vfat -F32 -n "EFIBOOT" "${DISK}2"
mkfs.ext4 -L "ROOT" "${DISK}p3" mkfs.ext4 -L "ROOT" "${DISK}3"
mount -t ext4 "${DISK}p3" /mnt mount -t ext4 "${DISK}3" /mnt
fi
fi fi
if [[ ${FS} =~ "btrfs" ]]; then if [[ ${FS} =~ "btrfs" ]]; then
ls /mnt | xargs btrfs subvolume delete ls /mnt | xargs btrfs subvolume delete
@ -90,14 +93,14 @@ btrfs subvolume create /mnt/@
umount /mnt umount /mnt
mount -t btrfs -o subvol=@ -L ROOT /mnt mount -t btrfs -o subvol=@ -L ROOT /mnt
fi fi
;; # ;;
*) # *)
echo "Rebooting in 3 Seconds ..." && sleep 1 # echo "Rebooting in 3 Seconds ..." && sleep 1
echo "Rebooting in 2 Seconds ..." && sleep 1 # echo "Rebooting in 2 Seconds ..." && sleep 1
echo "Rebooting in 1 Second ..." && sleep 1 # echo "Rebooting in 1 Second ..." && sleep 1
reboot now # reboot now
;; # ;;
esac # esac
# mount target # mount target
mkdir /mnt/boot mkdir /mnt/boot