aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorawy <awy@tutamail.com>2024-08-01 01:22:37 +0300
committerawy <awy@tutamail.com>2024-08-01 01:22:37 +0300
commita378b03ea5bc8a3bb2481169c3b70c346fdfa7f6 (patch)
tree1ba0402a5280c636e321ce7c007ff2ec58cdca75 /install.sh
parentd66493711edd358f9c65572430b906913e8ff3dd (diff)
minimal
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh41
1 files changed, 22 insertions, 19 deletions
diff --git a/install.sh b/install.sh
index 18cc6e0..0f37c8e 100755
--- a/install.sh
+++ b/install.sh
@@ -1,23 +1,29 @@
-read -p "Enter disk label (e.g., sda): " disk_drive
-read -p "Enter comma-separated partition numbers (e.g., 5,6 for 5 boot 6 root): " partitions
+LIGHTGREEN='\033[1;32m'
+LIGHTRED='\033[1;91m'
+WHITE='\033[1;97m'
+MAGENTA='\033[1;35m'
+CYAN='\033[1;96m'
+NoColor='\033[0m'
+
+printf ${LIGHTGREEN}"Enter disk label (e.g. sda, nvme0n1p <- p is mandatory in nvme case):${NoColor}\n"
+read disk_drive
+printf ${LIGHTGREEN}"Enter comma-separated partition numbers (e.g., 5,6 for 5 boot 6 root):${NoColor}\n"
+read partitions
IFS=',' read -r -a partition_array <<< "$partitions"
-
root_drive="$disk_drive${partition_array[1]}"
-#swap_drive="$disk_drive${partition_array[1]}"
boot_drive="$disk_drive${partition_array[0]}"
-read -p "Hostname: " _hostname
-
-read -p "Username: " _username
-
-read -s -p "root password: " _rootpasswd
+printf ${LIGHTGREEN}"Enter the Hostname you want to use:${NoColor}\n"
+read _hostname
+printf ${LIGHTGREEN}"Enter the Username you want to use:${NoColor}\n"
+read _username
+printf ${LIGHTRED}"Enter the password for ROOT:${NoColor}\n"
+read -s _rootpasswd
+printf ${LIGHTGREEN}"Enter the password for $_username:${NoColor}\n"
+read -s _userpasswd
-read -s -p "user password: " _userpasswd
-
-mkfs.ext4 /dev/$root_drive
-#mkswap /dev/$swap_drive
-#swapon /dev/$swap_drive
-mkfs.fat -F 32 /dev/$boot_drive
+mkfs.fat -F32 /dev/$boot_drive
+mkfs.ext4 -F /dev/$root_drive
mount /dev/$root_drive /mnt
mkdir /mnt/boot
@@ -26,17 +32,14 @@ mkdir /mnt/boot/efi
mount /dev/$boot_drive /mnt/boot/efi
sv up ntpd
-
pacman -Sy --confirm
-basestrap /mnt base base-devel runit seatd-runit
-basestrap /mnt linux linux-firmware
+basestrap /mnt base runit seatd-runit linux-zen intel-ucode linux-zen-headers
fstabgen -U /mnt >> /mnt/etc/fstab
cp post_chroot.sh /mnt
export root_drive
-#export swap_drive
export boot_drive
export _hostname
export _username