-
Notifications
You must be signed in to change notification settings - Fork 0
/
guide.txt
114 lines (87 loc) · 2.83 KB
/
guide.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
# Setup wireless using iwctl
station wlan0 scan
station wlan0 get-networks
station wlan0 connect <ssid>
station wlan0 show
exit
ping -c 3 google.com
# Update system clock
timedatectl set-ntp true
timedatectl set-timezone America/New_York
# List current disks and partitions
lsblk
# Partition disk :
# no swap partition will create swap file after install
# <disk> may be: sda or nvme0n1, check using lsblk
fdisk /dev/<disk>
/dev/nvmen1p1 -> 550M EFI
/dev/nvmen1p2 -> Linux Filesystem
# Format and mount partition
mkfs.fat -F32 /dev/nvmen1p1
mkfs.btrfs /dev/nvmen1p2
# Setup BTRFS SubVolumes
mount /dev/nvmen1p2 /mnt
cd /mnt
btrfs subvolume create @
btrfs subvolume create @home
cd
umount /mnt
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ /dev/nvmen1p2 /mnt
mkdir /mnt/{boot/efi,home}
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home /dev/nvmen1p2 /mnt/home
mount /dev/nvmen1p1 /mnt/boot/efi
# setup mirrors
pacman -Syy
pacman -S reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
# Install base and base development packages
pacstrap /mnt base linux linux-firmware base-devel linux-headers vim git amd-ucode
# Generate fstab file
genfstab -U /mnt >> /mnt/etc/fstab
# Change root into new system
arch-chroot /mnt
# Set time zone
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock --systohc
# Set locale
## Uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
# Create hostname
echo <hostname> > /etc/hostname
edit /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 <hostname>.localdomain <hostname>
# Set root password
passwd
# create user
useradd -G wheel,audio,video -m <user>
passwd <user>
pacman -S sudo
EDITOR=nano visudo
# Install and configure grub bootloader
pacman -S grub efibootmgr dosfstools mtools dialog wpa_supplicant dhcpcd ifplugd bluez bluez-utils cups alsa-utils pipewire pipewire-alsa pipewire-pulse pipewire-jack rsync reflector
grub-install --target=x86_64-efi –efi-directory=/efi/ –bootloader-id=Arch --recheck
grub-mkconfig -o /boot/grub/grub.cfg
vim /etc/mkinitcpio.conf # add btrfs to modules
exit
umount -R /mnt
reboot
# Post Install
# Setup WiFi
ip a # take note of wifi interface name like wlan0
vim /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ctrl_interface=/run/wpa_supplicant
su # switch to root user to run wpa_passphrase
wpa_passphrase <wifi name> <wifi password> >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
exit # exit root
# can edit the config to remove password
systemctl enable dhcpcd.service
systemctl start dhcpcd.service
systemctl enable [email protected]
systemctl start [email protected]
# should be able to ping archlinux now
ping -c 3 www.archlinux.org