-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patha.sh
71 lines (54 loc) · 1.41 KB
/
a.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
#!/bin/sh
# Arch Installer
# Part 1: Before chroot
# Does: partition [UEFI], pacstrap, chroot with 'a2.sh'
# To start:
# curl -L nils.tk/tia > a.sh
# chmod +x a.sh
# ./a.sh
# set font and colors
setfont ter-118n
printf %b '\e]P011161c' '\e]P7fafafa'
clear
# make a statement
echo -n $'this is art'
sleep 5
clear
sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf
timedatectl set-ntp true
# select drive
lsblk
echo -n $'\nEnter the drive (/dev/sda): '
read drv
drv=${drv:-/dev/sda} # set default value if empty
cfdisk $drv
clear
lsblk
echo -n $'\nEnter the linux partition: '
read lnx_part
mkfs.ext4 $lnx_part
read -p $'\nDid you also create EFI partition? [y/N] ' efi_ans
if [[ $efi_ans = y ]] ; then
read -p $'Enter EFI partition: ' efi_part
mkfs.vfat -F 32 $efi_part
fi
read -p $'\nDid you also create swap partition? [y/N] ' swap_ans
if [[ $swap_ans = y ]] ; then
echo -n $'\nEnter swap partition: '
read swap_part
mkswap $swap_part
swapon $swap_part
fi
mount $lnx_part /mnt
pacstrap /mnt base base-devel linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
# this fixes an error about 'fstab changed but systemd uses old version' later on
systemctl daemon-reload
curl https://raw.githubusercontent.com/nils-trubkin/tia/main/a2.sh > /mnt/a2.sh
chmod +x /mnt/a2.sh
arch-chroot /mnt ./a2.sh
umount -l /mnt
# unmount iso [VM Optical]
umount -l /dev/sr0
eject -F /dev/sr0
reboot now