-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstallPt1.sh
executable file
·138 lines (88 loc) · 3.19 KB
/
InstallPt1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/env bash
# File : InstallPt1.sh
echo "Wifi "
sleep 2
wifi-menu
echo ping to google.com
sleep 7
ping -c 4 google.com
echo "--------------------------------------------------------------------------"
echo ""
echo " UPDATE THE SYSTEM CLOCK "
echo ""
echo "---------------------------------------------------------------------------"
timedatectl set-ntp true
echo "Service Status"
sleep 4
timedatectl status
echo "TO CHANGE SYSTEM CLOCK"
sleep 3
timedatectl set-timezone Asia/Kolkata
timedatectl status
echo "-----------------------------------------------------------------------"
echo ""
echo " FORMAT THE PARTITION "
echo ""
echo "------------------------------------------------------------------------"
cfdisk
fdisk -l
echo -e "\n\n"
read -p "Enter Name Of Boot Partition [for example /dev/sda7 ] : " boot_part
echo -e "\n\n"
read -p "Enter Name of Root Partition [for example /dev/sda8 ] : " root_part
echo ""
read -p "Enter Name of Home Partition [for exmple /dev/sda9 ] : " home_part
echo ""
read -p "Enter Name Of Swap Partition [for example /dev/sda10] : " swap_part
mkfs.ext4 $root_part
mkfs.ext4 $home_part
mkswap $swap_part
swapon $swap_part
mkfs.fat -F32 $boot_part
echo "------------------------------------------------------------------------"
echo ""
echo " MOUNT THE FILESYSTEM "
echo ""
echo "---------------------------------------------------------------------------"
mount $root_part /mnt
mkdir /mnt/home
mkdir /mnt/boot
mount $boot_part /mnt/boot
mount $home_part /mnt/home
echo "------------------------------------------------------------------------------"
echo""
echo " INSTALLATION "
echo ""
echo "------------------------------------------------------------------------------"
echo "Edit Mirrorlist file /etc/pacman.d/mirrorlist"
sleep 5
vim /etc/pacman.d/mirrorlist
echo "------------------------------------------------------------------------------------------------------------------------------------------------------"
echo ""
echo " Downloading Essential Packages "
echo ""
echo "-------------------------------------------------------------------------------------------------------------------------------------------------------"
pacstrap /mnt base linux linux-firmware vim man-db man-pages networkmanager
echo "---------------------------------------------------------------------------------"
echo ""
echo " CONFIGURE THE SYSTEM "
echo ""
echo "------------------------------------------------------------------------------------"
echo " Generate an Fstab File "
genfstab -U /mnt >> /mnt/etc/fstab
sleep 3
echo To Check the result of the Fstab File
sleep 3
cat /mnt/etc/fstab
sleep 2
echo ""
echo ""
sleep 2
echo "--------------------------------------------------------------------------------------------------------------------------"
echo ""
echo " ARCH CHROOT "
echo ""
echo "---------------------------------------------------------------------------------------------------------------------------"
cp applications.sh hostname hosts InstallPt1.sh InstallPt2.sh locale.conf recommend.sh client.conf locale.gen /mnt/root
echo "Now Check What Should be done "
arch-chroot /mnt