-
Notifications
You must be signed in to change notification settings - Fork 0
/
script1.sh
36 lines (29 loc) · 925 Bytes
/
script1.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
#!/bin/bash
## Variables
EFI_PART="sda1"
SWAP_PART="sda2"
ROOT_PART="sda3"
#TIMEZONE="Asia/Kolkata"
#HOSTNAME="arch"
#ADDITIONAL_PKGS="networkmanager efibootmgr git neovim lxde-common lxsession openbox alacritty xorg"
## Format and turn on swap partition
echo "Formatting partitions, mounting partitions and installing base..."
mkswap /dev/$SWAP_PART
swapon /dev/$SWAP_PART
## Format and mount root partition
mkfs.ext4 /dev/$ROOT_PART
mount /dev/$ROOT_PART /mnt
## Changing pacman ParallelDownloads from 1 to 5
sed -i -e "s/#ParallelDown/ParallelDown/g" /etc/pacman.conf
## Installing the base
pacstrap /mnt base linux linux-firmware git
## Format and mount efi partition
mkfs.fat -F32 /dev/$EFI_PART
mkdir /mnt/boot/EFI
mount /dev/sda1 /mnt/boot/EFI
## Generate filesystem tab
echo "Generating filesystem tab..."
genfstab -U /mnt >> /mnt/etc/fstab
## Chroot into mnt
echo "Chrooting into install..."
arch-chroot /mnt