-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.txt
164 lines (105 loc) · 3.01 KB
/
setup.txt
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
///// Setup
# https://www.youtube.com/watch?v=ybvwikNlx9I&t=946s
# https://wiki.archlinux.org/title/Installation_guide
//// Base
cat /sys/firmware/efi/fw_platform_size (should return 64-bit)
iwtcl wlan0 connet-hidden <ssid>
timedatctl set-ntp true
fdisk /dev/<disk>
# Boot
n
FirstSector: <empty>
LastSector: +256M
t
1 (EFI)
# Core
n
FirstSector: <empty>
LastSector: <empty>
t
44
w
cryptsetup luksFormat --type luks2 -y -v --use-random --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 /dev/<core_partition>
# cryptsetup luksDump /dev/vga/lva1
# cryptsetup benchmark
pvcreate /dev/mapper/core
vg create vg /dev/mapper/core
lvcreate -L 8G -n swap vg
lvcreate -l +100%FREE -n core vg
mkfs.ext4 /dev/<boot_partition>
mkfs.ext4 /dev/vg/core
mkswap /dev/vg/swap
swapon /dev/vg/swap
mount /dev/vg/core /mnt
mount --mkdir /dev/<boot_partition> /mnt/boot
mount --mkdir /dev/<efi_partition> /mnt/boot/efi
# Packages
#vim /etc/pacman.d/mirrorlist
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector --sort rate --country 'Iran,' --protocl https --latest 10 --age 168 --save /etc/pacman.d/mirrorlist
vim /etc/pacman.conf
ParallelDownloads = 6
pacstrap /mnt linux linux-firmware base base-devel grub efibootmgr amd-ucode man-pages man-db netoworkmanager lvm2 os-prober git vim tmux firefox openssh (dhcpcd)
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
# Configs
systemctl enable NetworkManager
ln -sf /usr/share/zoneinfo/Asia/Tehran /etc/localtime
hwclock --systohc
vim /etc/locale.gen
!# en_US.UTF-8 UTF-8
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "<host_name>" >> /etc/hostname
vim /etc/hosts
127.0.0.1 localhost
::1 localhost
# Initramfs
vim /etc/mkinitcpio.conf
HOOKS=(base udev autodetect keyboard modconf block encrypt lvm2 filesystems fsck)
mkinitcpio -P
# Grub
blkid -o value -s UUID </dev/core_partition> >> /etc/default/grub
vim /etc/default/grub
GRUB_TIMEOUT=1
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=</dev/core_partition_UUID>:core root=/dev/vg/root"
grub-install (--bootloader-id=Arch)
grub-mkconfig -o /boot/grub/grub.cfg
#os-prober
passwd
useradd -m -G wheel <username> (-s /bin/bash)
passwd <username>
vim /etc/sudoers (wheel)
exit
umount -R /mnt
reboot
//// GUI
/// Display Servers
// Xorg
pacmna -S xorg
// Wayland
/// Display Drivers
// Amd
pacman -S mesa libva-mesa-driver
// Intel
pacman -S mesa intel-media-driver
// Nvidia
# https://wiki.archlinux.org/title/NVIDIA
pacman -S nvidia nvidia-utils (nvidia-lts)
lspci -k | grep -A 2 -E "(VGA|3D)"
//// Desktop Environment
/// KDE
pacman -S sddm plasma kde-applications kscreen
systemctl enable sddm --now
/// Xfce
pacman -S xorg xfce4 xfce4-goodies (lightdm ,lightdm-gtk-greeter ,lightdm.service)
/// Hyperland
# https://www.youtube.com/watch?v=iE99GrcZzhs
//// Troubleshoot
wifi-menu
cryptsetup luksOpen /dev/<core_partition> core
mount /dev/mapper/core /mnt
mount /dev/<boot_partition> /mnt/boot
mount /dev/<efi_partition> /mnt/boot/efi
arch-chroot /mnt
unmount -R /mnt