La version la plus moderne en informatique, avec les dernières technologies utilisés et les plus avancées.
OBJECTIF FINAL
- Chiffrement complet (LUKS2)
- Système de fichiers BTRFS avec sous-volumes
- Kernel Zen
- Bootloader : systemd-boot
- ZRAM
- Timeshift
- KDE Plasma (Wayland)
- Terminal Kitty + Prompt Starship + Zsh
- Navigateur Librewolf
- LLVM / Ruby
pre-check configuration
Charger le clavier français en tapant "loqdkeys fr"
loadkeys fr
Verifier boot mode
ls /sys/firmware/efi/efivars (Si le répertoire existe, l'ordinateur supporte l'efi)
Connexion au réseau
Vérifier le nom du reseau et si celui-ci est up
ip addr show
vérifier la connexion internet
ping -c 2 archlinux.org
Connexion au wifi
iwctl
affichage du prompt [IWD]#
[iwd]# device list
[iwd]# station device scan
[iwd]# station device get-networks
[iwd]# station device connect SSID
Mise a jour des paquets et installation de reflector
pacman -Syy
pacman -S reflector
Mise a jour des miroirs,tri par https
reflector --verbose --country 'France' -l 12 -p https --sort rate --save /etc/pacman.d/mirrorlist
Partionnement
Préparation du disque dur et destruction complète des données avec shred, cela peut prendre un peu de temps
fdisk -l
shred -v -n 1 /dev/nvme0n1
Outil de partionnement cgdisk, nouvelle table de partition GPT
cgdisk /dev/nvme0n1
- /dev/nvme0n1p1 EFI SYSTEM 512MB hex code ef00
- /dev/nvme0n1p2 CRYPTROOT LINUX 100%FREE hex code 8300
LUKS et BTRFS
Chiffre la partition root :
cryptsetup luksFormat \
--type luks2 \
--cipher aes-xts-plain64 \
--key-size 512 \
--hash sha512 \
--iter-time 5000 \
--pbkdf argon2id \
--pbkdf-memory 1048576 \
--pbkdf-parallel 4 \
/dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
Formate les partitions :
mkfs.fat -F32 /dev/nvme0n1p1
mkfs.btrfs /dev/mapper/cryptroot
Structure BTRFS
Créer les sous-volumes :
mount /dev/mapper/cryptroot /mnt
btrfs su cr /mnt/@
btrfs su cr /mnt/@home
btrfs su cr /mnt/@log
btrfs su cr /mnt/@cache
btrfs su cr /mnt/@snapshots
umount /mnt
Monter les sous-volumes :
mount -o noatime,compress=zstd,ssd,space_cache=v2,subvol=@ /dev/mapper/cryptroot /mnt
mkdir -p /mnt/{boot,home,var/log,var/cache,.snapshots}
mount -o noatime,compress=zstd,ssd,space_cache=v2,subvol=@home /dev/mapper/cryptroot /mnt/home
mount -o noatime,compress=zstd,ssd,space_cache=v2,subvol=@log /dev/mapper/cryptroot /mnt/var/log
mount -o noatime,compress=zstd,ssd,space_cache=v2,subvol=@cache /dev/mapper/cryptroot /mnt/var/cache
mount -o noatime,compress=zstd,ssd,space_cache=v2,subvol=@snapshots /dev/mapper/cryptroot /mnt/.snapshots
Installer ArchLinux et le système de base
Noyau Zen + systemd-boot
pacstrap -K /mnt base linux-zen linux-zen-headers linux-firmware btrfs-progs cryptsetup sudo nano networkmanager systemd-bootctl intel-ucode
NOTA: pour AMD microcode, il faut changer via amd-ucode
Configuration du système
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash
Hostname
echo "archzen" > /etc/hostname
Réseau
nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 archzen.localdomain archzen
Heures/fuseau
timedatectl set-timezone Europe/Paris
timedatectl set-ntp true
Langage par defaut
nano /etc/locale.gen
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
Exporter le langage actuel pour création dans initramfs
export LANG=fr_FR.UTF-8
Console, clavier
nano /etc/vconsole.conf
KEYMAP=fr-pc
FONT=
FONT_MAP=
Initrd avec LUKS + BTRFS + Systemd-boot
Editer: nano /etc/mkinitcpio.conf
HOOKS=(base systemd autodetect modconf block kms keyboard sd-vconsole block encrypt filesystems fsck)
Générer initramfs
mkinitcpio -p linux-zen
Paquets supplémentaires
Outil de base système
pacman -S man-db man-pages texinfo less
Administration et diagnostique
pacman -S bash-completion btop lsof strace time
Réseau
pacman -S network-manager-applet curl wget inetutils iproute2 net-tools dnsutils
Activation de Network Manager
systemctl enable NetworkManager
Gestion de paquets, outils de compilation, et outils auxiliaires
pacman -S pacman-contrib base-devel reflector yay openssh git wget syslog-ng ufw avahi nss-mdns
Activation de reflector et ufw
systemctl enable reflector.timer
systemctl enable ufw
systemctl enable avahi-daemon.service
Remarque: Pour les laptops installer l'utilitaire tlp
Systèmes de fichiers, montages, disques
pacman -S dosfstools e2fsprogs mtools gptfdisk udisks2
Console & TTY quality of life
pacman -S neofetch tree ncdu unzip zip tar rsync file which
Recherche et édition
pacman -S neovim ripgrep sed awk findutils fzf
Matériel et firmware
pacman -S usbutils pciutils dmidecode lshw smartmontools
Nettoyage et maintenance
pacman -S logrotate
Gestion du son
pacman -S pipewire pipewire-audio pipewire-alsa pipewire-pulse wireplumber
systemctl --user enable --now pipewire pipewire-pulse wireplumber
Controle du volume:
pacman -S alsa-utils pavucontrol
Imprimantes / Scanners
pacman -S cups system-config-printer sane hplip
systemctl enable --now cups
Résumer installation des drivers graphiques:
Intel / AMD (tout open source) :
pacman -S mesa vulkan-intel vulkan-radeon libva-mesa-driver
Résumé de l’installation sous Arch :
GPU | Kernel driver | Utilitaire Xorg | Vulkan & Accélération |
---|---|---|---|
Intel | i915 (kernel) | xf86-video-intel (optionnel) | mesa, vulkan-intel |
AMD | amdgpu / radeon | xf86-video-amdgpu (optionnel) | mesa, vulkan-radeon |
NVIDIA | nvidia / nouveau | nvidia (propriétaire) ou nouveau (libre) | nvidia-utils, vulkan |
Installer et configurer systemd-boot
bootctl --esp=/boot install
Trouver l'UUID de la partition chiffrée:
blkid /dev/nvme0n1p2
Note le UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Créer nano /boot/loader/loader.conf
default arch.conf
editor no
timeout 4
console-mode max
nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux-zen
initrd <amd/intel>-ucode.img
initrd /initramfs-linux-zen.img
options rd.luks.uuid=<UUID> root=/dev/mapper/cryptroot rootflags=subvol=@ rw
Créer un utilisateur
passwd # pour root
useradd -mG wheel trivial
passwd trivial
Ajout dans sudoers de l'utilisateur
echo "trivial ALL=(ALL) ALL" >> /etc/sudoers.d/trivial
Activer ZRAM
Installation
pacman -S zram-generator
Créer le fichier:
nano /etc/systemd/zram-generator.conf
[zram0]
zram-size = ram
compression-algorithm = zstd
Redémarrer systemd :
systemctl daemon-reexec
Installer Timeshift
Pour la gestion des snapshots BTRFS on utilise Timeshift
pacman -S timeshift
Première snapshot:
timeshift --create --comments "Initial Snapshot" --tags D
Vous pouvez aussi configurer avec 'autosnap' Timeshift pour automatiser
Finalisation
exit
umount -R /mnt
reboot
Post-install
Connexion au wifi via Networkmanager TUI
nmtui
Configuration de reflector
reflector --verbose --country 'France' -l 50 -p https --sort rate --save /etc/pacman.d/mirrorlist
sudo pacman -Syy
Choix du DE (Desktop Environment)
sudo pacman -S plasma kde-applications
Mise en place du gestionnaire de connexion
sudo pacman -S sddm
sudo systemctl enable sddm
Terminal
sudo pacman -S kitty zsh starship zsh-autosuggestions zsh-syntax-highlighting
chsh -s /bin/zsh
NOTA: Si tu utilises yay ou paru, tu peux aussi ajouter zsh-completions, zsh-history-substring-search, etc.
Configuration minimal de Zsh
nano ~/.zshrc
---
# Activer l'autosuggestion et le highlighting
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Activer Starship prompt
eval "$(starship init zsh)"
# Options utiles
HISTSIZE=10000
SAVEHIST=10000
setopt inc_append_history
setopt share_history
setopt autocd
setopt correct
# Alias utiles
alias ll='ls -lah'
alias gs='git status'
# Thème du terminal
export TERM="xterm-256color"
Configurer Kitty
nano ~/.config/kitty/kitty.conf
---
font_family FiraCode Nerd Font
font_size 11.0
confirm_os_window_close 0
# Couleurs
include themes/Dracula.conf
Navigateur internet
yay -S librewolf-bin
i.e: privacy test: https://privacytests.org/ en particulier fingerprinting.
Installation des fonts
sudo pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-dejavu ttf-liberation ttf-roboto ttf-fira-code ttf-jetbrains-mono
Et pour les icones terminal / powerline:
yay -S nerd-fonts-complete
Programmation
Installation de LLVM (C/C++)
sudo pacman -S llvm clang lld lldb
clang++ --version
Installation de Ruby avec RVM
sudo pacman -S libyaml openssl zlib gnupg
Installer GPG pour vérifier la signature RVM
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Installer via RVM
\curl -sSL https://get.rvm.io | bash -s stable
Charger RVM a la session Shell
Ajoute cette ligne à la fin de ton ~/.zshrc
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
source ~/.zshrc
Installer Ruby via RVM
rvm install ruby
ruby -v