-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·130 lines (90 loc) · 2.2 KB
/
install
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
#Choice root password
echo "Choice root Password."
passwd
bios () {
lsblk -do NAME,MODEL,SIZE
echo Enter driveletter /dev/sdx as a for x or b for x
read part
#install grub
echo Installing grub
grub-install --target=i386-pc ${part}
}
efi () {
lsblk -do NAME,MODEL,SIZE
echo Installing efiboot
pacman -S efibootmgr
grub-install --target=x86_64-efi --efi-directory=boot/efi --bootloader-id=GRUB
}
if [ -d "/sys/firmware/efi/efivars" ]
then
efi
else
bios
fi
#set localtime
echo set localtime
echo "Enter your timezone as a town?"
read town
timedatectl list-timezones | grep $town
echo "if it is correct use y to set it to $town"
read answer
if [ $answer = y ]
then
ln -sf /usr/share/zoneinfo/$town /etc/localtime
else
echo "run the install script again."
break
fi
#locale gen
echo add Locale gen
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "en_US ISO-8859-1" >> /etc/locale.gen
# run locale-gen
echo run locale-gen
locale-gen
#set language in locale.conf
echo Set Language in locale.conf
echo "LANG=en_US.UTF-8" > /etc/locale.conf
#set keymap
#KEYMAP=de-latin1
echo set keymap in vconsole
echo "KEYMAP=en_US" > /etc/vconsole.conf
# set location in reflector
echo set loavation in reflector
reflector --protocol https --country 'USA'
# enable parralel download in pacman.conf
echo Enable parralel download in pacman
sed -i 's/#ParallelDownloads/ParallelDownloads/g' /etc/pacman.conf
# install packages
echo install packages
pacman -Sy
pacman -S networkmanager pulseaudio pavucontrol sudo
#set hostname
echo set Hostname
echo Enter Hostname?
read hostname
echo ${hostname} > /etc/hostname
#create Hostfile
echo create hostfile
echo "127.0.0.1 localhost" > /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts
# enable services
echo Enable Services
# systemctl enable lightdm
systemctl enable NetworkManager
# systemctl enable cups
#mkgrub-config
echo mkgrub-config
grub-mkconfig -o /boot/grub/grub.cfg
#config mkinitcpio -P
echo config intiran
mkinitcpio -P
# set username
echo Enter a Username for the user
read user
useradd -m -G wheel -s /bin/bash ${user}
passwd ${user}
sed -i 's/# %wheel/%wheel/g' /etc/sudoers
#demenu for select DE
./demenu.sh