feat: latest archlinux

main
sudo pacman -Syu 2024-07-23 02:43:33 +07:00
parent 1f96f5322a
commit 8fd013450b
2 changed files with 147 additions and 168 deletions

View File

@ -109,7 +109,9 @@
</div> </div>
<p>Check UEFI mode:</p> <p>Check UEFI mode:</p>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre>ls /sys/firmware/efi/efivars</pre> <pre>cat /sys/firmware/efi/fw_platform_size
<span class="pl-c"><span class="pl-c">#</span> 64 or 32 is UEFI</span>
<span class="pl-c"><span class="pl-c">#</span> File not found is BIOS</span></pre>
</div> </div>
<div class="markdown-heading"> <div class="markdown-heading">
<h4 class="heading-element">Connect to the internet</h4> <h4 class="heading-element">Connect to the internet</h4>
@ -143,13 +145,22 @@
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre>cgdisk /dev/sdx</pre> <pre>cgdisk /dev/sdx</pre>
</div> </div>
<p> <ul>
<a <li>
href="https://wiki.archlinux.org/index.php/Partitioning#Partition_scheme" <a
rel="nofollow" href="https://wiki.archlinux.org/index.php/Partitioning#Partition_scheme"
>Partition scheme</a rel="nofollow"
> >Partition scheme</a
</p> >
</li>
<li>
<a
href="https://wiki.archlinux.org/title/EFI_system_partition"
rel="nofollow"
>EFI system partition</a
>
</li>
</ul>
<p>UEFI/GPT layout:</p> <p>UEFI/GPT layout:</p>
<table> <table>
<thead> <thead>
@ -158,6 +169,7 @@
<th>Partition</th> <th>Partition</th>
<th>Partition type</th> <th>Partition type</th>
<th>Suggested size</th> <th>Suggested size</th>
<th>gdisk code</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -166,18 +178,21 @@
<td><code>/dev/efi_system_partition</code></td> <td><code>/dev/efi_system_partition</code></td>
<td>EFI System Partition</td> <td>EFI System Partition</td>
<td>512 MiB</td> <td>512 MiB</td>
<td>EF00</td>
</tr> </tr>
<tr> <tr>
<td><code>/mnt/boot</code></td> <td><code>/mnt/boot</code></td>
<td><code>/dev/extended_boot_loader_partition</code></td> <td><code>/dev/extended_boot_loader_partition</code></td>
<td>Extended Boot Loader Partition</td> <td>Extended Boot Loader Partition (XBOOTLDR)</td>
<td>1 GiB</td> <td>1 GiB</td>
<td>EA00</td>
</tr> </tr>
<tr> <tr>
<td><code>/mnt</code></td> <td><code>/mnt</code></td>
<td><code>/dev/root_partition</code></td> <td><code>/dev/root_partition</code></td>
<td>Root Partition</td> <td>Root Partition</td>
<td></td> <td></td>
<td>8300</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -196,6 +211,7 @@
<th>Partition</th> <th>Partition</th>
<th>Partition type</th> <th>Partition type</th>
<th>Suggested size</th> <th>Suggested size</th>
<th>gdisk code</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -204,16 +220,18 @@
<td></td> <td></td>
<td>BIOS boot partition</td> <td>BIOS boot partition</td>
<td>1 MiB</td> <td>1 MiB</td>
<td>EF02</td>
</tr> </tr>
<tr> <tr>
<td><code>/mnt</code></td> <td><code>/mnt</code></td>
<td><code>/dev/root_partition</code></td> <td><code>/dev/root_partition</code></td>
<td>Root Partition</td> <td>Root Partition</td>
<td></td> <td></td>
<td>8300</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>LVM:</p> <p>LVM (optional):</p>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre><span class="pl-c"><span class="pl-c">#</span> Create physical volumes</span> <pre><span class="pl-c"><span class="pl-c">#</span> Create physical volumes</span>
pvcreate /dev/sdaX pvcreate /dev/sdaX
@ -235,10 +253,10 @@ mkfs.fat -F32 /dev/extended_boot_loader_partition
<span class="pl-c"><span class="pl-c">#</span> root</span> <span class="pl-c"><span class="pl-c">#</span> root</span>
mkfs.ext4 -L ROOT /dev/root_partition mkfs.ext4 -L ROOT /dev/root_partition
<span class="pl-c"><span class="pl-c">#</span> root with btrfs</span> <span class="pl-c"><span class="pl-c">#</span> root with btrfs (optional)</span>
mkfs.btrfs -L ROOT /dev/root_partition mkfs.btrfs -L ROOT /dev/root_partition
<span class="pl-c"><span class="pl-c">#</span> root on lvm</span> <span class="pl-c"><span class="pl-c">#</span> root on lvm (optional)</span>
mkfs.ext4 /dev/RootGroup/rootvol</pre> mkfs.ext4 /dev/RootGroup/rootvol</pre>
</div> </div>
<p>Mount:</p> <p>Mount:</p>
@ -246,10 +264,10 @@ mkfs.ext4 /dev/RootGroup/rootvol</pre>
<pre><span class="pl-c"><span class="pl-c">#</span> root</span> <pre><span class="pl-c"><span class="pl-c">#</span> root</span>
mount /dev/root_partition /mnt mount /dev/root_partition /mnt
<span class="pl-c"><span class="pl-c">#</span> root with btrfs</span> <span class="pl-c"><span class="pl-c">#</span> root with btrfs (optional)</span>
mount -o compress=zstd /dev/root_partition /mnt mount -o compress=zstd /dev/root_partition /mnt
<span class="pl-c"><span class="pl-c">#</span> root on lvm</span> <span class="pl-c"><span class="pl-c">#</span> root on lvm (optional)</span>
mount /dev/RootGroup/rootvol /mnt mount /dev/RootGroup/rootvol /mnt
<span class="pl-c"><span class="pl-c">#</span> efi</span> <span class="pl-c"><span class="pl-c">#</span> efi</span>
@ -268,19 +286,26 @@ mount --mkdir /dev/extended_boot_loader_partition /mnt/boot</pre>
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>
<p>
Please check
<a href="https://wiki.archlinux.org/title/Mirrors" rel="nofollow"
>Mirrors</a
>
if you have slow Internet.
</p>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre>pacstrap -K /mnt base linux linux-firmware <pre>pacstrap -K /mnt base linux linux-firmware
<span class="pl-c"><span class="pl-c">#</span> AMD</span> <span class="pl-c"><span class="pl-c">#</span> AMD (optional)</span>
pacstrap -K /mnt amd-ucode pacstrap -K /mnt amd-ucode
<span class="pl-c"><span class="pl-c">#</span> Intel</span> <span class="pl-c"><span class="pl-c">#</span> Intel (optional)</span>
pacstrap -K /mnt intel-ucode pacstrap -K /mnt intel-ucode
<span class="pl-c"><span class="pl-c">#</span> Btrfs</span> <span class="pl-c"><span class="pl-c">#</span> Btrfs (optional)</span>
pacstrap -K /mnt btrfs-progs pacstrap -K /mnt btrfs-progs
<span class="pl-c"><span class="pl-c">#</span> LVM</span> <span class="pl-c"><span class="pl-c">#</span> LVM (optional)</span>
pacstrap -K /mnt lvm2 pacstrap -K /mnt lvm2
<span class="pl-c"><span class="pl-c">#</span> Text editor</span> <span class="pl-c"><span class="pl-c">#</span> Text editor</span>
@ -337,11 +362,10 @@ pacstrap -K /mnt neovim</pre>
></a> ></a>
</div> </div>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre> <pre><span class="pl-c"><span class="pl-c">#</span> Change Region/City to your location</span>
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc</pre hwclock --systohc</pre>
>
</div> </div>
<div class="markdown-heading"> <div class="markdown-heading">
<h4 class="heading-element">Localization:</h4> <h4 class="heading-element">Localization:</h4>
@ -353,10 +377,11 @@ hwclock --systohc</pre
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>
<p>Edit <code>/etc/locale.gen</code>:</p> <p>
<div class="highlight highlight-text-adblock"> Edit <code>/etc/locale.gen</code> then uncomment
<pre><span class="pl-c"># Uncomment en_US.UTF-8 UTF-8</span></pre> <code># en_US.UTF-8 UTF-8</code> by removing <code>#</code> at the
</div> beginning.
</p>
<p>Generate locales:</p> <p>Generate locales:</p>
<div class="highlight highlight-source-shell"><pre>locale-gen</pre></div> <div class="highlight highlight-source-shell"><pre>locale-gen</pre></div>
<p>Edit <code>/etc/locale.conf</code>:</p> <p>Edit <code>/etc/locale.conf</code>:</p>
@ -387,12 +412,12 @@ hwclock --systohc</pre
</div> </div>
<p>Edit <code>/etc/mkinitcpio.conf</code>:</p> <p>Edit <code>/etc/mkinitcpio.conf</code>:</p>
<div class="highlight highlight-text-adblock"> <div class="highlight highlight-text-adblock">
<pre><span class="pl-c"># LVM</span> <pre><span class="pl-c"># LVM (optional)</span>
<span class="pl-c"># https://wiki.archlinux.org/title/Install_Arch_Linux_on_LVM#Adding_mkinitcpio_hooks</span> <span class="pl-c"># https://wiki.archlinux.org/title/Install_Arch_Linux_on_LVM#Adding_mkinitcpio_hooks</span>
HOOKS=(base udev ... block lvm2 filesystems)
<span class="pl-c"># https://wiki.archlinux.org/title/mkinitcpio#Common_hooks</span> <span class="pl-c"># https://wiki.archlinux.org/title/mkinitcpio#Common_hooks</span>
<span class="pl-c"># Replace udev with systemd</span></pre> <span class="pl-c"># Replace udev with systemd</span>
<span class="pl-c"># Add lvm2 between block and filesystems</span>
HOOKS=(base systemd ... block lvm2 filesystems)</pre>
</div> </div>
<div class="highlight highlight-source-shell"><pre>mkinitcpio -P</pre></div> <div class="highlight highlight-source-shell"><pre>mkinitcpio -P</pre></div>
<div class="markdown-heading"> <div class="markdown-heading">
@ -407,26 +432,16 @@ HOOKS=(base udev ... block lvm2 filesystems)
</div> </div>
<div class="highlight highlight-source-shell"><pre>passwd</pre></div> <div class="highlight highlight-source-shell"><pre>passwd</pre></div>
<div class="markdown-heading"> <div class="markdown-heading">
<h4 class="heading-element">Addition</h4> <h4 class="heading-element">
<a
id="user-content-addition"
class="anchor"
aria-label="Permalink: Addition"
href="#addition"
><span aria-hidden="true" class="octicon octicon-link"></span
></a>
</div>
<div class="markdown-heading">
<h5 class="heading-element">
<a href="https://wiki.archlinux.org/title/NetworkManager" rel="nofollow" <a href="https://wiki.archlinux.org/title/NetworkManager" rel="nofollow"
>NetworkManager (WIP)</a >NetworkManager</a
> >
</h5> </h4>
<a <a
id="user-content-networkmanager-wip" id="user-content-networkmanager"
class="anchor" class="anchor"
aria-label="Permalink: NetworkManager (WIP)" aria-label="Permalink: NetworkManager"
href="#networkmanager-wip" href="#networkmanager"
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>
@ -434,37 +449,18 @@ HOOKS=(base udev ... block lvm2 filesystems)
<pre>pacman -Syu networkmanager dhcpcd iwd <pre>pacman -Syu networkmanager dhcpcd iwd
systemctl <span class="pl-c1">enable</span> NetworkManager.service systemctl <span class="pl-c1">enable</span> NetworkManager.service
systemctl <span class="pl-c1">enable</span> systemd-resolved.service</pre> systemctl <span class="pl-c1">enable</span> systemd-resolved.service</pre>
</div>
<p>Edit <code>/etc/NetworkManager/conf.d/dns.conf</code>:</p>
<div class="highlight highlight-text-adblock">
<pre>[<span class="pl-ii">main</span>]
dns=systemd-resolved</pre>
</div>
<p>Edit <code>/etc/NetworkManager/conf.d/dhcp-client.conf</code>:</p>
<div class="highlight highlight-text-adblock">
<pre>[<span class="pl-ii">main</span>]
dhcp=dhcpcd</pre>
</div> </div>
<p>Edit <code>/etc/NetworkManager/conf.d/wifi_backend.conf</code>:</p> <p>Edit <code>/etc/NetworkManager/conf.d/wifi_backend.conf</code>:</p>
<div class="highlight highlight-text-adblock"> <div class="highlight highlight-text-adblock">
<pre>[<span class="pl-ii">device</span>] <pre>[<span class="pl-ii">device</span>]
wifi.backend=iwd</pre> wifi.backend=iwd</pre>
</div> </div>
<p>
See
<a href="https://wiki.archlinux.org/title/Dhcpcd" rel="nofollow"
>dhcpcd</a
>
</p>
<p>Append <code>/etc/dhcpcd.conf</code></p>
<div class="highlight highlight-text-adblock">
<pre>
noarp
nohook resolv.conf</pre
>
</div>
<div class="markdown-heading"> <div class="markdown-heading">
<h5 class="heading-element">Bluetooth</h5> <h4 class="heading-element">
<a href="https://wiki.archlinux.org/title/Bluetooth" rel="nofollow"
>Bluetooth</a
>
</h4>
<a <a
id="user-content-bluetooth" id="user-content-bluetooth"
class="anchor" class="anchor"
@ -478,7 +474,7 @@ nohook resolv.conf</pre
systemctl <span class="pl-c1">enable</span> bluetooth.service</pre> systemctl <span class="pl-c1">enable</span> bluetooth.service</pre>
</div> </div>
<div class="markdown-heading"> <div class="markdown-heading">
<h5 class="heading-element">Clock</h5> <h4 class="heading-element">Clock</h4>
<a <a
id="user-content-clock" id="user-content-clock"
class="anchor" class="anchor"
@ -487,8 +483,18 @@ systemctl <span class="pl-c1">enable</span> bluetooth.service</pre>
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>
<p>
Use
<a
href="https://wiki.archlinux.org/title/Systemd-timesyncd"
rel="nofollow"
>systemd-timesyncd</a
>
</p>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre>timedatectl set-ntp <span class="pl-c1">true</span></pre> <pre>timedatectl set-ntp <span class="pl-c1">true</span>
timedatectl status</pre>
</div> </div>
<div class="markdown-heading"> <div class="markdown-heading">
<h4 class="heading-element">Boot loader</h4> <h4 class="heading-element">Boot loader</h4>
@ -500,22 +506,12 @@ systemctl <span class="pl-c1">enable</span> bluetooth.service</pre>
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>
<div class="markdown-heading"> <p>
<h5 class="heading-element"> Use
<a <a href="https://wiki.archlinux.org/index.php/Systemd-boot" rel="nofollow"
href="https://wiki.archlinux.org/index.php/Systemd-boot" >systemd-boot</a
rel="nofollow" >
>systemd-boot</a </p>
>
</h5>
<a
id="user-content-systemd-boot"
class="anchor"
aria-label="Permalink: systemd-boot"
href="#systemd-boot"
><span aria-hidden="true" class="octicon octicon-link"></span
></a>
</div>
<p>Install using XBOOTLDR:</p> <p>Install using XBOOTLDR:</p>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
<pre>bootctl --esp-path=/efi --boot-path=/boot install <pre>bootctl --esp-path=/efi --boot-path=/boot install
@ -543,15 +539,15 @@ console-mode max</pre
<pre>title Arch Linux <pre>title Arch Linux
linux /vmlinuz-linux linux /vmlinuz-linux
<span class="pl-c"># Intel</span> <span class="pl-c"># Intel (optional)</span>
initrd /intel-ucode.img initrd /intel-ucode.img
<span class="pl-c"># AMD</span> <span class="pl-c"># AMD (optional)</span>
initrd /amd-ucode.img initrd /amd-ucode.img
initrd /initramfs-linux.img initrd /initramfs-linux.img
<span class="pl-c"># Kernel parameters</span> <span class="pl-c"># Kernel parameters (optional)</span>
<span class="pl-c">#</span> <span class="pl-c">#</span>
<span class="pl-c"># Acer Nitro AN515-45</span> <span class="pl-c"># Acer Nitro AN515-45</span>
<span class="pl-c"># https://wiki.archlinux.org/title/backlight#Kernel_command-line_options</span> <span class="pl-c"># https://wiki.archlinux.org/title/backlight#Kernel_command-line_options</span>
@ -600,12 +596,12 @@ options root="LABEL=ROOT" rw</pre>
<pre>pacman -Syu sudo <pre>pacman -Syu sudo
EDITOR=nvim visudo EDITOR=nvim visudo
<span class="pl-c"><span class="pl-c">#</span> Uncomment group wheel</span> <span class="pl-c"><span class="pl-c">#</span> Uncomment group wheel by removing % at the beginning of %wheel ...</span>
<span class="pl-c"><span class="pl-c">#</span> Add user if don't want to use systemd-homed</span> <span class="pl-c"><span class="pl-c">#</span> Add user if don't want to use systemd-homed</span>
useradd -m -G wheel -c <span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> joker useradd -m -G wheel -c <span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> joker
<span class="pl-c"><span class="pl-c">#</span> Or using zsh</span> <span class="pl-c"><span class="pl-c">#</span> Or using zsh (optional)</span>
useradd -m -G wheel -s /usr/bin/zsh -c <span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> joker useradd -m -G wheel -s /usr/bin/zsh -c <span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> joker
<span class="pl-c"><span class="pl-c">#</span> Set password</span> <span class="pl-c"><span class="pl-c">#</span> Set password</span>
@ -615,7 +611,7 @@ passwd joker</pre>
<a <a
href="https://wiki.archlinux.org/index.php/Systemd-homed" href="https://wiki.archlinux.org/index.php/Systemd-homed"
rel="nofollow" rel="nofollow"
>systemd-homed (WIP)</a >systemd-homed (optional if no useradd before)</a
>: >:
</p> </p>
<div class="highlight highlight-source-shell"> <div class="highlight highlight-source-shell">
@ -623,7 +619,7 @@ passwd joker</pre>
homectl create joker --real-name=<span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> --member-of=wheel homectl create joker --real-name=<span class="pl-s"><span class="pl-pds">"</span>The Joker<span class="pl-pds">"</span></span> --member-of=wheel
<span class="pl-c"><span class="pl-c">#</span> Using zsh</span> <span class="pl-c"><span class="pl-c">#</span> Using zsh (optional)</span>
homectl update joker --shell=/usr/bin/zsh</pre> homectl update joker --shell=/usr/bin/zsh</pre>
</div> </div>
<p> <p>
@ -722,14 +718,14 @@ ParallelDownloads</pre>
<div class="markdown-heading"> <div class="markdown-heading">
<h3 class="heading-element"> <h3 class="heading-element">
<a href="https://wiki.archlinux.org/title/PipeWire" rel="nofollow" <a href="https://wiki.archlinux.org/title/PipeWire" rel="nofollow"
>Pipewire (WIP)</a >Pipewire</a
> >
</h3> </h3>
<a <a
id="user-content-pipewire-wip" id="user-content-pipewire"
class="anchor" class="anchor"
aria-label="Permalink: Pipewire (WIP)" aria-label="Permalink: Pipewire"
href="#pipewire-wip" href="#pipewire"
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>
@ -754,14 +750,14 @@ pacman -Syu pipewire wireplumber \
<div class="markdown-heading"> <div class="markdown-heading">
<h3 class="heading-element"> <h3 class="heading-element">
<a href="https://wiki.archlinux.org/title/Flatpak" rel="nofollow" <a href="https://wiki.archlinux.org/title/Flatpak" rel="nofollow"
>Flatpak (WIP)</a >Flatpak</a
> >
</h3> </h3>
<a <a
id="user-content-flatpak-wip" id="user-content-flatpak"
class="anchor" class="anchor"
aria-label="Permalink: Flatpak (WIP)" aria-label="Permalink: Flatpak"
href="#flatpak-wip" href="#flatpak"
><span aria-hidden="true" class="octicon octicon-link"></span ><span aria-hidden="true" class="octicon octicon-link"></span
></a> ></a>
</div> </div>

View File

@ -23,7 +23,9 @@ lsblk
Check UEFI mode: Check UEFI mode:
```sh ```sh
ls /sys/firmware/efi/efivars cat /sys/firmware/efi/fw_platform_size
# 64 or 32 is UEFI
# File not found is BIOS
``` ```
#### Connect to the internet #### Connect to the internet
@ -38,27 +40,28 @@ For wifi, use [iwd](https://wiki.archlinux.org/index.php/Iwd).
cgdisk /dev/sdx cgdisk /dev/sdx
``` ```
[Partition scheme](https://wiki.archlinux.org/index.php/Partitioning#Partition_scheme) - [Partition scheme](https://wiki.archlinux.org/index.php/Partitioning#Partition_scheme)
- [EFI system partition](https://wiki.archlinux.org/title/EFI_system_partition)
UEFI/GPT layout: UEFI/GPT layout:
| Mount point | Partition | Partition type | Suggested size | | Mount point | Partition | Partition type | Suggested size | gdisk code |
| ----------- | ------------------------------------- | ------------------------------ | -------------- | | ----------- | ------------------------------------- | ----------------------------------------- | -------------- | ---------- |
| `/mnt/efi` | `/dev/efi_system_partition` | EFI System Partition | 512 MiB | | `/mnt/efi` | `/dev/efi_system_partition` | EFI System Partition | 512 MiB | EF00 |
| `/mnt/boot` | `/dev/extended_boot_loader_partition` | Extended Boot Loader Partition | 1 GiB | | `/mnt/boot` | `/dev/extended_boot_loader_partition` | Extended Boot Loader Partition (XBOOTLDR) | 1 GiB | EA00 |
| `/mnt` | `/dev/root_partition` | Root Partition | | | `/mnt` | `/dev/root_partition` | Root Partition | | 8300 |
Why not `/boot/efi`? See Why not `/boot/efi`? See
[Lennart Poettering comment](https://github.com/systemd/systemd/pull/3757#issuecomment-234290236). [Lennart Poettering comment](https://github.com/systemd/systemd/pull/3757#issuecomment-234290236).
BIOS/GPT layout: BIOS/GPT layout:
| Mount point | Partition | Partition type | Suggested size | | Mount point | Partition | Partition type | Suggested size | gdisk code |
| ----------- | --------------------- | ------------------- | -------------- | | ----------- | --------------------- | ------------------- | -------------- | ---------- |
| | | BIOS boot partition | 1 MiB | | | | BIOS boot partition | 1 MiB | EF02 |
| `/mnt` | `/dev/root_partition` | Root Partition | | | `/mnt` | `/dev/root_partition` | Root Partition | | 8300 |
LVM: LVM (optional):
```sh ```sh
# Create physical volumes # Create physical volumes
@ -83,10 +86,10 @@ mkfs.fat -F32 /dev/extended_boot_loader_partition
# root # root
mkfs.ext4 -L ROOT /dev/root_partition mkfs.ext4 -L ROOT /dev/root_partition
# root with btrfs # root with btrfs (optional)
mkfs.btrfs -L ROOT /dev/root_partition mkfs.btrfs -L ROOT /dev/root_partition
# root on lvm # root on lvm (optional)
mkfs.ext4 /dev/RootGroup/rootvol mkfs.ext4 /dev/RootGroup/rootvol
``` ```
@ -96,10 +99,10 @@ Mount:
# root # root
mount /dev/root_partition /mnt mount /dev/root_partition /mnt
# root with btrfs # root with btrfs (optional)
mount -o compress=zstd /dev/root_partition /mnt mount -o compress=zstd /dev/root_partition /mnt
# root on lvm # root on lvm (optional)
mount /dev/RootGroup/rootvol /mnt mount /dev/RootGroup/rootvol /mnt
# efi # efi
@ -111,19 +114,22 @@ mount --mkdir /dev/extended_boot_loader_partition /mnt/boot
### Installation ### Installation
Please check [Mirrors](https://wiki.archlinux.org/title/Mirrors) if you have
slow Internet.
```sh ```sh
pacstrap -K /mnt base linux linux-firmware pacstrap -K /mnt base linux linux-firmware
# AMD # AMD (optional)
pacstrap -K /mnt amd-ucode pacstrap -K /mnt amd-ucode
# Intel # Intel (optional)
pacstrap -K /mnt intel-ucode pacstrap -K /mnt intel-ucode
# Btrfs # Btrfs (optional)
pacstrap -K /mnt btrfs-progs pacstrap -K /mnt btrfs-progs
# LVM # LVM (optional)
pacstrap -K /mnt lvm2 pacstrap -K /mnt lvm2
# Text editor # Text editor
@ -147,6 +153,7 @@ arch-chroot /mnt
#### Time zone #### Time zone
```sh ```sh
# Change Region/City to your location
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc hwclock --systohc
@ -154,11 +161,8 @@ hwclock --systohc
#### Localization: #### Localization:
Edit `/etc/locale.gen`: Edit `/etc/locale.gen` then uncomment `# en_US.UTF-8 UTF-8` by removing `#` at
the beginning.
```txt
# Uncomment en_US.UTF-8 UTF-8
```
Generate locales: Generate locales:
@ -185,12 +189,12 @@ myhostname
Edit `/etc/mkinitcpio.conf`: Edit `/etc/mkinitcpio.conf`:
```txt ```txt
# LVM # LVM (optional)
# https://wiki.archlinux.org/title/Install_Arch_Linux_on_LVM#Adding_mkinitcpio_hooks # https://wiki.archlinux.org/title/Install_Arch_Linux_on_LVM#Adding_mkinitcpio_hooks
HOOKS=(base udev ... block lvm2 filesystems)
# https://wiki.archlinux.org/title/mkinitcpio#Common_hooks # https://wiki.archlinux.org/title/mkinitcpio#Common_hooks
# Replace udev with systemd # Replace udev with systemd
# Add lvm2 between block and filesystems
HOOKS=(base systemd ... block lvm2 filesystems)
``` ```
```sh ```sh
@ -203,9 +207,7 @@ mkinitcpio -P
passwd passwd
``` ```
#### Addition #### [NetworkManager](https://wiki.archlinux.org/title/NetworkManager)
##### [NetworkManager (WIP)](https://wiki.archlinux.org/title/NetworkManager)
```sh ```sh
pacman -Syu networkmanager dhcpcd iwd pacman -Syu networkmanager dhcpcd iwd
@ -213,20 +215,6 @@ systemctl enable NetworkManager.service
systemctl enable systemd-resolved.service systemctl enable systemd-resolved.service
``` ```
Edit `/etc/NetworkManager/conf.d/dns.conf`:
```txt
[main]
dns=systemd-resolved
```
Edit `/etc/NetworkManager/conf.d/dhcp-client.conf`:
```txt
[main]
dhcp=dhcpcd
```
Edit `/etc/NetworkManager/conf.d/wifi_backend.conf`: Edit `/etc/NetworkManager/conf.d/wifi_backend.conf`:
```txt ```txt
@ -234,31 +222,26 @@ Edit `/etc/NetworkManager/conf.d/wifi_backend.conf`:
wifi.backend=iwd wifi.backend=iwd
``` ```
See [dhcpcd](https://wiki.archlinux.org/title/Dhcpcd) #### [Bluetooth](https://wiki.archlinux.org/title/Bluetooth)
Append `/etc/dhcpcd.conf`
```txt
noarp
nohook resolv.conf
```
##### Bluetooth
```sh ```sh
pacman -Syu bluez pacman -Syu bluez
systemctl enable bluetooth.service systemctl enable bluetooth.service
``` ```
##### Clock #### Clock
Use [systemd-timesyncd](https://wiki.archlinux.org/title/Systemd-timesyncd)
```sh ```sh
timedatectl set-ntp true timedatectl set-ntp true
timedatectl status
``` ```
#### Boot loader #### Boot loader
##### [systemd-boot](https://wiki.archlinux.org/index.php/Systemd-boot) Use [systemd-boot](https://wiki.archlinux.org/index.php/Systemd-boot)
Install using XBOOTLDR: Install using XBOOTLDR:
@ -285,15 +268,15 @@ Edit `/boot/loader/entries/archlinux.conf`:
title Arch Linux title Arch Linux
linux /vmlinuz-linux linux /vmlinuz-linux
# Intel # Intel (optional)
initrd /intel-ucode.img initrd /intel-ucode.img
# AMD # AMD (optional)
initrd /amd-ucode.img initrd /amd-ucode.img
initrd /initramfs-linux.img initrd /initramfs-linux.img
# Kernel parameters # Kernel parameters (optional)
# #
# Acer Nitro AN515-45 # Acer Nitro AN515-45
# https://wiki.archlinux.org/title/backlight#Kernel_command-line_options # https://wiki.archlinux.org/title/backlight#Kernel_command-line_options
@ -317,26 +300,26 @@ Always remember to check **dependencies** when install packages.
pacman -Syu sudo pacman -Syu sudo
EDITOR=nvim visudo EDITOR=nvim visudo
# Uncomment group wheel # Uncomment group wheel by removing % at the beginning of %wheel ...
# Add user if don't want to use systemd-homed # Add user if don't want to use systemd-homed
useradd -m -G wheel -c "The Joker" joker useradd -m -G wheel -c "The Joker" joker
# Or using zsh # Or using zsh (optional)
useradd -m -G wheel -s /usr/bin/zsh -c "The Joker" joker useradd -m -G wheel -s /usr/bin/zsh -c "The Joker" joker
# Set password # Set password
passwd joker passwd joker
``` ```
[systemd-homed (WIP)](https://wiki.archlinux.org/index.php/Systemd-homed): [systemd-homed (optional if no useradd before)](https://wiki.archlinux.org/index.php/Systemd-homed):
```sh ```sh
systemctl enable systemd-homed.service systemctl enable systemd-homed.service
homectl create joker --real-name="The Joker" --member-of=wheel homectl create joker --real-name="The Joker" --member-of=wheel
# Using zsh # Using zsh (optional)
homectl update joker --shell=/usr/bin/zsh homectl update joker --shell=/usr/bin/zsh
``` ```
@ -382,7 +365,7 @@ Color
ParallelDownloads ParallelDownloads
``` ```
### [Pipewire (WIP)](https://wiki.archlinux.org/title/PipeWire) ### [Pipewire](https://wiki.archlinux.org/title/PipeWire)
```sh ```sh
pacman -Syu pipewire wireplumber \ pacman -Syu pipewire wireplumber \
@ -397,7 +380,7 @@ See
pacman -Syu sof-firmware pacman -Syu sof-firmware
``` ```
### [Flatpak (WIP)](https://wiki.archlinux.org/title/Flatpak) ### [Flatpak](https://wiki.archlinux.org/title/Flatpak)
```sh ```sh
pacman -Syu flatpak pacman -Syu flatpak