You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Operating Systems/Arch Linux/Arch Linux.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,13 @@ tags:
32
32
33
33
This repository contains most of my dotfiles and notes that are used in my Arch Linux installation. You can use the [[Automatic Customization|auto-install script]] to automatically install Arch Linux and the dotfiles in your system. However, I don't guarantee that the installer covers all your needs. In such cases (or you probably do not want to start from scratch), this guide assumes that...
34
34
35
-
- You've successfully installed Arch Linux by following their [installation guide](https://wiki.archlinux.org/title/Installation_guide) which can be found in their [wiki](https://wiki.archlinux.org/). Otherwise, follow the [[System Installation|system installation guide]]] before proceeding.
36
-
- You have made a [[System Installation#Add A Non-Root User Account|non-root user]]] in your system and is currently active.
35
+
- You've successfully installed Arch Linux by following their [installation guide](https://wiki.archlinux.org/title/Installation_guide) which can be found in their [wiki](https://wiki.archlinux.org/). Otherwise, follow the [[System Installation|system installation guide]] before proceeding.
36
+
- You have made a [[System Installation#Add A Non-Root User Account|non-root user]] in your system and is currently active.
37
37
- You are currently connected to the internet.
38
38
39
39
Some, if not all of the dotfiles, can also be used in other operating systems/distributions, but it's up to you on how you will do it since I haven't tested it on other systems yet.
40
40
41
-
> [!NOTE]
41
+
> [!WARNING]
42
42
>
43
43
> This guide is currently under active development. Documentation might be outdated because the dotfiles/scripts are updated frequently.
If you haven't installed Arch Linux yet, continue reading. Otherwise, you might want to skip to the [[Manual Customization|manual]]] or [[Automatic Customization|automatic]] customization steps.
3
+
If you haven't installed Arch Linux yet, continue reading. Otherwise, you might want to skip to the [[Manual Customization|manual]] or [[Automatic Customization|automatic]] customization steps.
4
4
5
5
I recommend that you read the [Arch Linux Wiki](https://wiki.archlinux.org/)'s [installation guide](https://wiki.archlinux.org/title/Installation_guide) instead since it is more updated and accurate than a guide that is maintained by one hobbyist like me. I also recommend reading [arch.d3sox.me](https://arch.d3sox.me/) if you have trouble understanding the wiki.
6
6
@@ -36,7 +36,7 @@ station wlan0 connect <SSID>
36
36
exit
37
37
```
38
38
39
-
> If you are having problems turning on your wireless NIC, make sure that it is not being soft-blocked by `rfkill`.
39
+
> [!TIP]If you are having problems turning on your wireless NIC, make sure that it is not being soft-blocked by `rfkill`.
40
40
41
41
To make sure that you have an internet connection, ping the Arch Linux website.
42
42
@@ -76,19 +76,30 @@ In my case, my main storage device is located at `/dev/sda`. So we run the follo
76
76
fdisk /dev/sda
77
77
```
78
78
79
-
Partition the device following the structure shown in [[Environment#Disk Partitions|Environment > Disk Partitions]]]. If you have different needs, you can see more examples in the [Arch Linux Wiki](https://wiki.archlinux.org/title/Partitioning#Example_layouts) and [d3sox](https://arch.d3sox.me/installation/partitioning-formatting#size-recommendations)'s guide. After saving the changes made by `fdisk`, create the filesystems.
79
+
Partition the device following the structure shown in [[Environment#Disk Partitions|Environment > Disk Partitions]]. If you have different needs, you can see more examples in the [Arch Linux Wiki](https://wiki.archlinux.org/title/Partitioning#Example_layouts) and [d3sox](https://arch.d3sox.me/installation/partitioning-formatting#size-recommendations)'s guide. After saving the changes made by `fdisk`, create the filesystems.
80
80
81
81
```bash
82
-
mkfs.fat -F32 -n EFI /dev/sda1 # Create a FAT32 filesystem in `/dev/sda1` with label "EFI"
83
-
mkswap -L SWAP /dev/sda2 # Create a SWAP filesystem in `/dev/sda2` with label "SWAP"
84
-
mkfs.btrfs -L ROOT /dev/sda3 # Create a BTRFS filesystem in `/dev/sda3` with label "ROOT"
85
-
mkfs.ext4 -L HOME /dev.sda4 # Create an EXT4 filesystem in `/dev/sda4` with label "HOME"
82
+
mkfs.fat -F32 -n EFI /dev/sda1 # Create a FAT32 filesystem in `/dev/sda1` labeled "EFI"
83
+
mkfs.ext4 -L BOOT /dev/sda2 # Create an EXT4 filesystem in `/dev/sda2` labeled "BOOT"
84
+
mkfs.btrfs -L ARCH /dev/sda3 # Create a BTRFS filesystem in `/dev/sda3` labeled "ARCH"
85
+
86
+
# Mount /mnt to create Btrfs subvolumes.
87
+
mount --mkdir /dev/sda3 /mnt
88
+
89
+
# Create Btrfs subvolumes
90
+
btrfs subvolume create /mnt/@
91
+
btrfs subvolume create /mnt/@home
92
+
btrfs subvolume create /mnt/@snapshots
93
+
94
+
# Unmount /mnt
95
+
umount /mnt
86
96
87
97
# Mount the partitions in their respective mountpoints.
88
-
mount /dev/sda3 /mnt
89
-
mount --mkdir /dev/sda1 /mnt/boot
90
-
mount --mkdir /dev/sda4 /mnt/home
91
-
swapon /dev/sda2
98
+
mount --mkdir -o noatime,compress=zstd:1,subvol=@ /dev/sda3 /mnt
99
+
mount --mkdir -o noatime,compress=zstd:1,subvol=@home /dev/sda3 /mnt/home
100
+
mount --mkdir -o noatime,compress=zstd:1,subvol=@snapshots /dev/sda3 /mnt/snapshots
101
+
mount --mkdir /dev/sda2 /mnt/boot
102
+
mount --mkdir /dev/sda1 /mnt/boot/efi
92
103
```
93
104
94
105
## Installing Arch Linux
@@ -123,10 +134,11 @@ Use the `pacstrap` command to install Arch Linux into your system.
123
134
pacstrap -K /mnt \
124
135
base base-devel linux linux-firmware linux-headers \
genfstab -U /mnt >> /mnt/etc/fstab # Define by UUIDs
141
153
```
142
154
143
-
> **NOTE**: Check the `/mnt/etc/fstab` file for any errors.
155
+
> [!NOTE] Check the `/mnt/etc/fstab` file for any errors.
144
156
145
157
### Chroot into Your New Arch Linux System
146
158
147
159
```bash
148
160
arch-chroot /mnt
149
161
```
150
162
151
-
### Install Bootloader
163
+
### Configure Pacman
152
164
153
-
In this step, I assume that you are installing on a UEFI system. Otherwise, check [d3sox](https://arch.d3sox.me/installation/install-bootloader) for more information.
165
+
```bash
166
+
nano /etc/pacman.conf
167
+
```
168
+
169
+
#### Enable `multilib` Repository
170
+
171
+
Uncomment the following lines to make 32-bit libraries available to download.
172
+
173
+
```text
174
+
[multilib]
175
+
Include = /etc/pacman.d/mirrorlist
176
+
```
177
+
178
+
#### Enable Parallel Downloads
179
+
180
+
Uncomment the following line to enable parallel downloading of files. You can change the value to whatever you like.
181
+
182
+
```text
183
+
ParallelDownloads = 5
184
+
```
185
+
186
+
#### Other Stuff
187
+
188
+
Uncomment/Add the following lines under `Misc options`:
189
+
190
+
1.`Color`
191
+
2.`ILoveCandy`
192
+
3.`VerbosePkgLists`
193
+
194
+
#### Post-Configuration
195
+
196
+
After editing the configuration file, you may now save and close it. Run `pacman -Syu` to update the repositories.
197
+
198
+
### Add `zram`
199
+
200
+
Instead of having a swap partition, we are going to use zram instead.
Now, we need to edit our initial ram disk by running `nano /etc/mkinitcpio.conf`. Inside the parenthesis of `MODULES=()`, add the following (separated by a space):
237
+
238
+
-`btrfs` and `ext4`, since we are using Btrfs and EXT4 as our filesystems.
239
+
-`amdgpu` if you are running AMD GPU, `i915` if Intel, `nvidia nvidia_modeset nvidia_uvm nvidia_drm` if you use proprietary Nvidia drivers, or `nouveau` if you are using open-source Nvidia drivers.
240
+
241
+
As an example, my machine has a built-in Intel GPU so I have the following:
242
+
243
+
```bash
244
+
MODULES=(btrfs ext4 i915)
160
245
```
161
246
162
-
> [!TIP]
247
+
After editing, we run `mkinitcpio -P` to process all preset files.
248
+
249
+
### Install Bootloader
250
+
251
+
In this step, I assume that you are installing on a UEFI system. Otherwise, check [d3sox](https://arch.d3sox.me/installation/install-bootloader) for more information.
252
+
253
+
> [!TIP]+
163
254
>
164
255
> If you want to automatically detect other operating systems, run `nano /etc/default/grub` and add/uncomment the following line:
> If you forgot to perform `grub-mkconfig` and shut down/reboot the system instead (which I _totally_ did not do while installing Arch), just boot into your live USB again, mount the partitions, and `chroot` into your system.
Uncomment the following lines to make 32-bit libraries available to download.
221
-
222
-
```text
223
-
[multilib]
224
-
Include = /etc/pacman.d/mirrorlist
225
-
```
226
-
227
-
#### Enable Parallel Downloads
228
-
229
-
Uncomment the following line to enable parallel downloading of files. You can change the value to whatever you like.
230
-
231
-
```text
232
-
ParallelDownloads = 5
233
-
```
234
-
235
-
#### Other Stuff
236
-
237
-
Uncomment/Add the following lines under `Misc options`:
238
-
239
-
1. `Color`
240
-
2. `ILoveCandy`
241
-
3. `VerbosePkgLists`
242
-
243
-
#### Post-Configuration
244
-
245
-
After editing the configuration file, you may now save and close it. Run `pacman -Syu` to update the repositories.
246
-
247
309
### Setting Up Users
248
310
249
311
> [!TIP] It is recommended to use strong passwords for your user accounts.
@@ -256,12 +318,9 @@ passwd
256
318
257
319
#### Add A Non-Root User Account
258
320
259
-
A common security practice is that you should **not** use the root account
260
-
unless needed and you know that it is safe to run. To create a non-root
261
-
user, run the commands below and change the parameters to the values you desire.
321
+
A common security practice is that you should **not** use the root account unless needed and you know that it is safe to run. To create a non-root user, run the commands below and change the parameters to the values you desire.
0 commit comments