-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathi.sh
More file actions
103 lines (74 loc) · 2.76 KB
/
i.sh
File metadata and controls
103 lines (74 loc) · 2.76 KB
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
i#!/usr/bin/env bash
echo "Please enter EFI paritition: (example /dev/sda1 or /dev/nvme0n1p1)"
read EFI
echo "Please enter SWAP paritition: (example /dev/sda2)"
read SWAP
echo "Please enter Root(/) paritition: (example /dev/sda3)"
read ROOT
echo "Please enter your username"
read USER
echo "Please enter your password"
read PASSWORD
# make filesystems
echo -e "\nCreating Filesystems...\n"
mkfs.fat -F32 "${EFI}"
mkswap "${SWAP}"
swapon "${SWAP}"
mkfs.ext4 "${ROOT}"
# mount target
#mount -t ext4 "${ROOT}" /mnt
#mkdir /mnt/boot
#mount -t vfat "${EFI}" /mnt/boot/
#mount "${ROOT}" /mnt
echo "--------------------------------------"
echo "-- INSTALLING Arch Linux BASE on Main Drive --"
echo "--------------------------------------"
mount "${ROOT}" /mnt
# pacstrap /mnt base base-devel --noconfirm --needed
# kernel
pacstrap -K /mnt base linux linux-firmware nano sudo vim --noconfirm --needed
echo "--------------------------------------"
echo "-- Setup Dependencies --"
echo "--------------------------------------"
pacman -S nvidia nvidia-utils networkmanager network-manager-applet wireless_tools wpa_supplicant dialog base-devel linux-headers bluez bluez-utils cups openssh blueman git e nano vim neovim --noconfirm --needed
# fstab
genfstab -U /mnt >> /mnt/etc/fstab
echo "--------------------------------------"
echo "-- Bootloader Installation --"
echo "--------------------------------------"
pacman -S grub efibootmgr os-prober mtools
mkdir /boot/efi
mount "${EFI}" /boot/efi
grub-install --target=x86_64-efi --bootloader-id=grub_uefi
grub-mkconfig -o /boot/grub/grub.cfg
cat <<REALEND > /mnt/next.sh
useradd -m $USER
usermod -aG wheel,storage,power,audio $USER
echo $USER:$PASSWORD | chpasswd
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
echo "-------------------------------------------------"
echo "Setup Language to US and set locale"
echo "-------------------------------------------------"
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
ln -sf /usr/share/zoneinfo/Asia/Manila /etc/localtime
hwclock --systohc
echo "archpc" > /etc/hostname
cat <<EOF > /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 archpc.localdomain archpc
EOF
echo "-------------------------------------------------"
echo "Display and Audio Drivers"
echo "-------------------------------------------------"
pacman -S pulseaudio networkmanager bluez bluez-utils openssh cups iwd --noconfirm
systemctl enable NetworkManager bluetooth cups sshd iwd
exit
umount -R /mnt
echo "-------------------------------------------------"
echo "Install Complete, You can reboot now"
echo "-------------------------------------------------"
REALEND
arch-chroot /mnt sh next.sh