summaryrefslogtreecommitdiff
path: root/static/artix-install.md
blob: ed2d467fae68a52d7bc126855e7cd3ff822f22ae (plain)
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
# wifi wireless connection
ip a
ip link set wlan0 up
rfkill unblock wifi
ip link set wlan0 up
connmanctl
scan wifi
services
agent on
connect wifi_181dea9eaba1_66...
quit

# UEFI vs legacy
ls /sys/firmware/efi/efivars

# partition
lsblk
fdisk /dev/sdX
# mkfs.ext4 /dev/sdX1
# mkfs.exfat /dev/sdX1
dd if=/dev/urandom of=/dev/sdX2 bs=1M status=progress
cryptsetup luksFormat /dev/sdX2
cryptsetup open /dev/sdX2 luks
mkfs.btrfs /dev/mapper/luks
mount /dev/mapper/luks /mnt
mkfs.fat -F32 /dev/sdX1
mkdir /mnt/boot && mount /dev/sdX1 /mnt/boot # UEFI: mkdir /mnt/boot/efi && mount /dev/sdX1 /mnt/boot/efi
vi /etc/pacman.d/mirrowlist

# programs
basestrap -i /mnt base base-devel runit elogind-runit linux linux-firmware grub networkmanager networkmanager-runit cryptsetup lvm2 lvm2-runit neovim vim os-prober
# UEFI: efibootmgr

# installation
artix-chroot /mnt bash

# Timezone & Location
ln -s /usr/share/zoneinfo/Continent/TimeZone /etc/localtime
hwclock --systohc
vim /etc/locale.conf
export LANG="en_US.UTF-8"
export LC_COLLATE="C"
vim /etc/locale.gen
#en_US.UTF-8
#ko_KR.UTF-8
locale-gen

# Host
vim /etc/hostname
vim /etc/hosts
127.0.0.1   localhost
::1         localhost
127.0.1.1   hostname.localdomin hostname

# Networkmanager
ln -s /etc/runit/sv/Networkmanager /etc/runit/runsvdir/current

# Password and Users
passwd
useradd -G(-g) wheel -m username
passwd username

# (Optional) auto-login
vim /etc/runit/sv/agetty-tty1/conf
--autologin username

# Hook
vim /etc/mkinitcpio.conf
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block 'encrypt' 'lvm2' filesystems fsck)
mkinitcpio -p linux

# Decryption and Boot
exit
lsblk -f >> /mnt/etc/default/grub
fstabgen -U /mnt >> /mnt/etc/fstab
artix-chroot /mnt bash
vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="... cryptdevice=UUID=/dev/sdX2's UUID:luks root=UUID=/dev/mapper/luks's UUID"

# Grub Installation
grub-install /dev/sdX
# UEFI: grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg

# (Optional) Check root UUID
vim /boot/grub/grub.cfg
# Search 'root=UUID' 

# Finish
exit
reboot
detach booting USB


=====================

# List nearby Wi-Fi networks:
nmcli device wifi list

# Connect to a Wi-Fi network:
nmcli device wifi connect SSID_or_BSSID password password

# Connect to a hidden Wi-Fi network:
nmcli device wifi connect SSID_or_BSSID password password hidden yes

# Connect to a Wi-Fi on the wlan1 interface:
nmcli device wifi connect SSID_or_BSSID password password ifname wlan1 profile_name

# Disconnect an interface:
nmcli device disconnect ifname eth0

# Get a list of connections with their names, UUIDs, types and backing devices:
nmcli connection show

# Activate a connection (i.e. connect to a network with an existing profile):
nmcli connection up name_or_uuid

# Delete a connection:
nmcli connection delete name_or_uuid

# See a list of network devices and their state:
nmcli device

# Turn off Wi-Fi:
nmcli radio wifi off