-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.sh
60 lines (54 loc) · 1.07 KB
/
1.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
#!/bin/bash
# set time
timedatectl set-ntp true
sleep 0.5
clear
# partitions
cmd=(whiptail --title Partitions --separate-output --menu "Select options:" 22 76 16)
options=(1 "Clean install"
2 "Keep efi"
3 "Skip")
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
cfdisk
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
;;
2)
cfdisk
#/dev/sda2
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
;;
3)
break
;;
esac
done
sleep 1.5
clear
# install base
pacstrap /mnt base
pacstrap /mnt base-devel
pacstrap /mnt linux
pacstrap /mnt linux-firmware
pacstrap /mnt linux-headers
pacstrap /mnt nano
clear
# generate fstab
genfstab -p -U /mnt >> /mnt/etc/fstab
clear
# copy script
cp 2.sh /mnt
sleep 0.5
# change root
arch-chroot /mnt
clear