- issue on virtualbox, efi was not enabled. Check with:
efivar-tester
- keyboard layout on boot: see default layout xorg keyboard config
setxkbmap -print -verbose 10
- (optional) modify font terminal: see console fonts
setfont ter-112n
- setup wifi connection: see iwd utility
- list available layouts
localectl list-keymaps | grep fr
- change keyboard layout
loadkeys fr-latin9
- set correct date through ntp
timedatectl set-ntp true
- use reflector to update pacman mirror list: see reflector
reflector -c France -a 6 --sort rate --save /etc/pacman.d/mirrorlist
# -c: Country
# -a: servers synchronized since 6 hours
# --sort: sort by some predicate (here rate but could be speed)
# --save: the file to save (already present in arch linux iso)
- resynchronize the servers
pacman -Syy
- list block devices to find the disk name
lsblk
Partitions will be created using gdisk
gdisk /dev/$DISK_NAME
Command: n
Partition number: # <default: press ENTER>
First sector: # <default: press ENTER>
Last sector: +512M # arch linux recommends 300MB or for early/buggy UEFI implementations 512M https://wiki.archlinux.org/title/EFI_system_partition
Hex code: ef00
Command: n
Partition number: # <default: press ENTER>
First sector: # <default: press ENTER>
Last sector: +4G # rule of thumb is to make twice of the RAM until 2G, otherwise create 4G
Hex code: 8200
Command: n
Partition number: # <default: press ENTER>
First sector: # <default: press ENTER>
Last sector: # <default: press ENTER>
Hex code: # <default: press ENTER> (8300)
Then we can write it:
Command: w
lsblk
EFI partition must be FAT 32
mkfs.fat -F32 /dev/$EFI_PARTITION
mkswap /dev/$SWAP_PARTITION
swapon /dev/$SWAP_PARTITION
- create the encryption and type passphrase
cryptsetup -y -v luksFormat /dev/$ROOT_PARTITION
- open the partition
cryptsetup open /dev/$ROOT_PARTITION cryptroot # cryptroot is a mapper to refer later
- format it
mkfs.ext4 /dev/mapper/cryptroot
- root
mount /dev/mapper/cryptroot /mnt
- efi
mkdir /mnt/boot
mount /dev/$EFI_PARTITION /mnt/boot
Using pacstrap
pacstrap /mnt base linux linux-firmware vim intel-ucode
Good documentation here
genfstab -U /mnt >> /mnt/etc/fstab # -U for UUID
see arch-chroot
arch-chroot /mnt
timedatectl list-timezones | grep Paris
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
hwclock --systohc # synchronize clocks
timedatectl status # to check if result is correct
- uncomment the desired line in the following file:
vim /etc/locale.gen
> en_US.UTF8 UTF-8
- synchronize the locale:
locale-gen
- write the locale in the conf file:
vim /etc/locale.conf
> LANG=en_US.UTF-8
Set the default keyboard layout:
vim /etc/vconsole.conf
KEYMAP=fr-latin9
- hostname called here
archcrypt
:
vim /etc/hostname
> archcrypt
- hosts
vim /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 archcrypt.localdomain archcrypt
passwd
pacman -S grub efibootmgr networkmanager network-manager-applet dialog wpa_supplicant mtools dosfstools base-devel linux-headers bluez bluez-utils cups xdg-utils xdg-user-dirs alsa-utils pulseaudio pulseaudio-bluetooth git reflector terminus-font
Because we are using encrypted partition, we need to modify the image loaded initially at startup, see mkinitcpio
- add keyboard, keymap and encrypt in the HOOKS section
vim /etc/mkinitcpio.conf
HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)
- recreate the image
mkinitcpio -p linux
see grub
- install it
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
- generate config and write it into /boot/grub/grub.cfg
grub-mkconfig -o /boot/grub/grub.cfg
- change configuration file because we use encryption: UUID of our root partition
blkid # find UUID_ROOT_PARTITION (the 8300 type)
vim /etc/default/grub
>> GRUB_CMDLINE_LINUX="cryptdevice=UUID=$UUID_ROOT_PARTITION:cryptroot root=/dev/mapper/cryptroot"
- regenerate config
grub-mkconfig -o /boot/grub/grub.cfg
- enable some services
systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable cups
- create user
useradd -mG wheel foobar
passwd foobar
- enable sudo priviledges for group wheel:
EDITOR=vim visudo
# uncomment line %wheel ALL=(ALL) ALL
- exit
exit
umount -a
reboot
nmcli device wifi # display available wifi networks
nmcli device wifi connect $WIFI_SSID --ask
Update archlinux-keyring
sudo pacman -S archlinux-keyring
timedatectl set-ntp true
sudo hwclock --systohc # synchronize clocks
sudo reflector -c France -a 6 --sort rate --save /etc/pacman.d/mirrorlist
sudo pacman -Syy
sudo pacman -S bash-completion
sudo systemctl enable --now reflector.timer
sudo systemctl enable --now fstrim.timer
- install graphic
sudo pacman -S xf86-video-intel xorg i3 dmenu lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings ttf-dejavu ttf-liberation noto-fonts firefox nitrogen picom lxappearance pcmanfm materia-gtk-theme papirus-icon-theme xfce4-terminal archlinux-wallpaper
- enable lightdm
sudo systemctl enable lightdm
Either:
- create /etc/X11/xorg.conf.d/00-keyboard.conf and change it according to previous config for
XkbModel
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "fr"
Option "XkbModel" "pc105"
EndSection
Or: (to test)
localectl set-x11-keymap fr