User:Erus Iluvatar/Install
List of thing I do to each of my Arch installations
Initial setup and checks
# loadkeys fr-latin1 # setfont ter-114n # if [ -d /sys/firmware/efi/efivars ] ; then echo "UEFI!" ; else echo "BIOS/CSM?" ; fi # ping -c3 archlinux.fr # timedatectl set-ntp true
Install with archinstall
Preferred disk layout
Partition | Partition type | Size | File System | Mount point |
---|---|---|---|---|
/dev/efi_system_partition
|
EFI system partition | 512 MiB up to 2GiB | FAT32 | /mnt/boot
|
/dev/root_partition
|
Linux x86-64 root (/) | All the disk except if memory is ≤ 4GiB | ext4 | /mnt
|
/dev/swap_partition
|
Linux swap | Two times the system memory if ≤ 4GiB | swap | # swapon
|
Packages
use the gnome
profile in archinstall
, add :
arch-audit archlinux-contrib base-devel bash-completion elinks firefox fff gnome-extra gpm htop intel-ucode meld mlocate mpv nano ncdu ntp openssh pacman-contrib pkgfile smartmontools systemd-swap terminus-font tmux <insert more packages here>
but remove :
gnome-software gnome-software-packagekit-plugin orca <insert the other packages to remove here>
Files to check the content of
Boot process
mkinitcpio -P
after this/etc/mkinitcpio.conf
# The i915 or corresponding module can be added here for early KMS MODULES=() BINARIES=() FILES=() # Use of systemd instead of base speeds up boot # needs ro on the kernel cmdline to have systemd fsck it before remounting HOOKS=(systemd autodetect sd-vconsole modconf block filesystems) # Using lz4 usually is faster than zstd COMPRESSION="lz4"
/etc/systemd/swap.conf
zswap_enabled=1 zswap_compressor=zstd zswap_max_pool_percent=25 zswap_zpool=z3fold
systemd-boot
/boot/loader/entries/arch.conf
title Arch Linux linux /vmlinuz-linux # See Microcode initrd /intel-ucode.img initrd /initramfs-linux.img # See Persistent block device naming#by-partuuid and Suspend and hibernate#Hibernation for details options root=PARTUUID=1234abcd-1234-1234-1234-123456abcdef resume=UUID=4321dcba-4321-4321-4321-654321fedcba resume_offset=123456789 ro quiet
GRUB
Go see GRUB when needed, changing the config the blessed way is a pain.
Locales and Console config
/etc/locale.gen
en_US.UTF-8 UTF-8 fr_FR.UTF-8 UTF-8
/etc/locale.conf
LANG=en_US.UTF-8 LC_NUMERIC=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8
/etc/vconsole.conf
KEYMAP=fr-latin1 FONT=ter-114n
Misc
/etc/sysctl.d/sysrq.conf
Enable the use of REISUB :
/etc/sysctl.d/sysrq.conf
kernel.sysrq=244
/etc/environment
Set nano
as the main editor, force the GTK theme and enable Wayland variables for Firefox and QT with a fix for the cursor size on Qt applications with GNOME on Wayland.
/etc/environment
VISUAL=nano GTK_THEME=Arc-Darker MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XCURSOR_SIZE=24
/etc/ntp.conf
Use the French NTP pool
/etc/ntp.conf
server 0.fr.pool.ntp.org server 1.fr.pool.ntp.org server 2.fr.pool.ntp.org server 3.fr.pool.ntp.org
/etc/pacman.conf
Use color, an easter egg, a clearer list of what will be done and enable parallel downloads of packages.
/etc/pacman.conf
Color ILoveCandy VerbosePkgLists ParallelDownloads = 5
/etc/pacman.d/mirrorlist
To avoid encountering errors when installing a package without having the time for a full system upgrade, add as the last line to the mirror list:
Server = https://europe.archive.pkgbuild.com/packages/.all/
See Arch Linux Archive#/packages.
/etc/makepkg.conf
Use a more parallel MAKEFLAG
(see make(1)), define the packager name on locally built packages and disable compression on the packages since most of them will be installed right away.
The absence of compression should not be a problem even if serving them on a local mirror since my LAN is 1Gbps.
/etc/makepkg.conf
MAKEFLAGS="-j -l8" PACKAGER="LAVALLADE Vladimir <erus.iluvatar@gmail.com>" PKGEXT='.pkg.tar'
/etc/nanorc
Use colors, syntax coloring and always show the cursor position in the {status|mini}bar
/etc/nanorc
set constantshow set titlecolor bold,white,blue set promptcolor lightwhite,grey set statuscolor bold,white,green set errorcolor bold,white,red set spotlightcolor black,lightyellow set selectedcolor lightwhite,magenta set stripecolor ,yellow set scrollercolor cyan set numbercolor cyan set keycolor cyan set functioncolor green include "/usr/share/nano/*.nanorc"
/etc/conf.d/wireless-regdom
For laptops, enable the regional regulatory domain:
/etc/conf.d/wireless-regdom
WIRELESS_REGDOM="FR"
QT fonts
To get emojis to render properly in Quassel (and probably most other Qt applications), I have shamelessly adapted the config file found at https://gist.github.com/IgnoredAmbience/7c99b6cf9a8b73c9312a71d1209d9bbb
Make sure the 50-user.conf
preset is enabled, refer to Font configuration#Fontconfig configuration for more details.
~/.config/fontconfig/conf.d/69-noto-mono-color-emoji.conf
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="pattern"> <test qual="any" name="family"><string>Noto Sans Mono</string></test> <edit name="family" mode="append" binding="weak"><string>Noto Color Emoji</string></edit> </match> </fontconfig>
Keyboard setup for the graphical environment
$ localectl set-x11-keymap fr pc105 oss_latin9
On Wayland, use GNOME GUI settings to have "French (alt.)" as the default, the command above does not work.
Avoid long GNOME configuration
On a previously setup system, do :
$ dconf dump / > dconf.ini
On the new machine, do :
$ dconf load / < dconf.ini
Monitors order in GDM
After having set monitors order within GNOME preferences, the resulting configuration file can be copied to get used by GDM
# cp /home/erus/.config/monitors.xml /var/lib/gdm/.config/
Enable and start all daemons and timers
# systemctl enable --now gpm ntpd sshd fstrim.timer pkgfile-update.timer systemd-boot-update.service
The plocate-updatedb.timer
should be enabled by default.
Disable GNOME's file indexing
$ systemctl --user mask tracker-miner-fs-3.service tracker-miner-fs-control-3.service tracker-miner-rss-3.service tracker-writeback-3.service tracker-xdg-portal-3.service
AUR
PKGBUILD
, any .install
files, and any other files in the package's git repository for malicious or dangerous commands. If in doubt, do not build the package, and seek advice on the forums or mailing list. Malicious code has been found in packages before. [1]$ mkdir -p /home/erus/.cache/yay/yay/ $ cd /home/erus/.cache/yay/yay/ $ git clone https://aur.archlinux.org/yay.git $ makepkg -sri # add the -f flag if the package is already built but you need to rebuild $ cd ~ ; yay -Syu inxi-git neofetch-git yt-dlp-git yt-dlp-drop-in systemd-numlockontty
Emojis
To have an emoji picker on X11 mimicking the Windows one, install emoteAUR and add a new custom shortcut in the GNOME Settings > Keyboard > Keyboard Shortcuts > Custom Shortcuts, named "Emoji Picker" for example, calling the emote command, with the Super+;
keybinding.
This also works on Wayland, but the selected (with a right click) emoji needs to be pasted afterwards instead of behaving like a virtual keyboard.
System maintenance
First of all, re-read System maintenance
Once a week, do a full system upgrade and make the necessary changes with .pacnew files, restart updated services, reboot if needed :
# pacman -Syu # DIFFPROG=meld checkservices $ if [ "$(file /boot/vmlinuz-linux | sed 's/.*version //;s/ .*//')" == "$(uname -r)" ] ; then echo "No reboot required" ; else echo "Kernel has been updated, reboot asap" ; fi
The output of arch-audit
should be looked at too for known high or remote severity risks.
Once a month, check the output of pacman -Qdt
. It will list all the packages that were installed as a dependency but do not have any packages that depend on them anymore :
- remove unneeded packages and change the install reason with
pacman -D --asexplicit
for those who should not be removed. - The output of
pacman -Qdtt
shows the packages which are only an optional dependency, check if they still are useful.
Remove all packages from cache for the uninstalled packages but keep one past version for the installed packages :
# paccache -rk1 # paccache -ruk0
Things I do not mess with
- kernel : supposedly linux-zen has some benefits but how would I benchmark random day to day use
- swappiness : default are there for a reason and again how should I benchmark it
- journalctl maximum size : the default 4GiB is OK
- Improving performance#Turn off CPU exploit mitigations
- SSD lifespan mitigation measures : see Improving performance#Reduce disk reads/writes for rationale
TODO
- shellcheck ?
- list of "cool" software ?
- use of a local mirror ?
- quassel-client config ? firefox (fonts) config ?
- laptop specific : powertop, etc... ?
- Hardware video acceleration#Comparison tables too ?
- Evaluate XFS? F2FS has felt right on the µSD with the Steam Deck, too.
- Reflector ?