This is just how I set up my Arch system with the Plasma Desktop Environment and the Xorg Display Server.
I'm installing the System on a nvme alongside with a Windows 10 Installation.
Therefore, there are already nvme0n1p1 - nvmen0n1p4 on the system, created by the windows setup. One of them is the ESP partition that will be reused as /boot/efi.
This setup will use an unencrypted /boot and an encrypted lvm container containing / and /home as well as a swap for hibernate.
When in doubt, always refer (and listen) to the Arch Linux Installation Guide.
- Download the monthly iso
- Create a bootable usb stick
- Disable Secureboot
- Boot the Live Stick
# loadkeys de-latin1
With a german keyboard, type
# loadkezs deßlatin1
Using Ethernet, the inetrnet connection should work out of the box. Check it with
# ip link
# ping archlinux.org
If using wifi, make sure your wifi is not blocked with rfkill
, unblock it if needed and connect wifi via iwctl.
# timedatectl set-ntp true
# date
The Installation Guide suggest using fdisk -l
but using cfdisk
is much more intuitive and just easier.
# cfdisk /dev/nvme0n1
Since we want to encrypt swap, / and /home and just leave /boot unencrypted, we will use the layout explained in the LVM on LUKS article.
So we create one partition with 1-2G and change the type to Linux swap (should be nvme0n1p5) as well as one partition with type Linux LVM (should be nvme0n1p6), with will contain swap, / and /home.
Don't forget to write the changes before exit from cfdisk.
Create and open the LUKS container
# cryptsetup luksFormat /dev/nvme0n1p6
# cryptsetup open /dev/nvme0n1p6 cryptlvm
Create a physical volume, a volume group and the 3 logical volumes.
Make sure that swap is bigger than your RAM to ensure easy hibernation. It is possible to hibernate with smaller swaps, but I guess that's advanced stuff with what I don't want to deal right now.
# pvcreate /dev/mapper/cryptlvm
# vgcreate ArchLvmGroup /dev/mapper/cryptlvm
# lvcreate -L 12G ArchLvmGroup -n swap
# lvcreate -L 85G ArchLvmGroup -n root
# lvcreate -l 100%FREE ArchLvmGroup -n home
Note that the used btrfs is not marked as stable, but a lot of people say it is basically stable and some distros start to use it by default. We use btrfs because I hope we can utilities the backup features.
# mkfs.btrfs /dev/ArchLvmGroup/root
# mkfs.btrfs /dev/ArchLvmGroup/home
# mkswap /dev/ArchLvmGroup/swap
# mount /dev/ArchLvmGroup/root /mnt
# mkdir /mnt/home
# mount /dev/ArchLvmGroup/home /mnt/home
# swapon /dev/ArchLvmGroup/swap
For /boot we use a stable file system. Since we use the ESP created by windows, we don't need FAT32 for /boot.
mkfs.ext4 /dev/nvme0n1p5
mkdir /mnt/boot
mount /dev/nvme0n1p5 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
We use the default kernel 'linux'. It is possible to add different kernels here, like the linux zen kernel etc.
# pacstrap /mnt base base-devel linux linux-firmware
Since Arch Linux is minimal, we need a bunch of additional packages like sudo
, man
, a text editor and a network manager.
# pacstrap /mnt git vi neovim sudo man man-db man-pages texinfo networkmanager btrf-progs
# genfstab -U /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
# ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
# hwclock --systohc
Uncomment en_US.UTF-8 UTF-8
in /etc/locale.gen
.
Since a german linux system is a pain in every orifice, just stay with US!
Run:
# locale-gen
# echo "LANG=en_US.UTF-8" >> /etc/locale.conf
# echo "KEYMAP=de-latin1" >> /etc/vconsole.conf
# echo "<hostname>" >> /etc/hostname
# pacman -S lvm2
Make sure the keyboard
, keymap
, encrypt
and lvm2
hooks are set in /etc/mkinitcpio.conf
.
HOOKS=(base udev autodetect modconf keyboard keymap block encrypt lvm2 filesystems fsck)
# mkinitcpio -P
# pacman -S grub efibootmgr
Add the cryptdevice to the kernel parameters in /etc/default/grub
.
Since we will need the UUID of our crpytlvm, we can find it with
# blkid
The UUID we are looking for is the one from /dev/nvme0n1p6
.
GRUB_CMDLINE_LINUX_DEFAULT="... cryptdevice=UUID=<device-UUID>:cryptlvm root=/dev/ArchLvmGroup/root"
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArchGrub
# grub-mkconfig -o /boot/grub/grub.cfg
# passwd
# exit
# umount -R /mnt
# poweroff
Remove the Live Stick and cross your fingers while booting the new system.
# systemctl start NetworkManager.service
# systemctl enable NetworkManager.service
# ping archlinux.org
At least for Ethernet, that's all what it needs.
Maybe it makes sense to have a look on this: https://wiki.archlinux.org/title/General_recommendations
I use XOrg instead of Wayland to avoid screensharing issues with Microsoft Teams.
# pacman -S xorg
Refer to the Arch Wiki.
Find the Graphic Device and install the correct graphics driver (for me intel)
# lspci -v | grep -A1 -e VGA -e 3D
# pacman -Ss xf86-video
# pacman -S xf86-video-intel
We use the plasma meta package to get all the plasma stuff that is available.
# pacman -S plasma-meta
Choose the font you want. It is recommended to use vlc over gstreamer.
Choose your Apps from the kde-applications package. Typical apps like dolphin, ark, konsole, kate, partitionmanager, yakuake, etc. are recommended. You probably will never use all 172 packages...
# pacman -S kde-applications
<Choose your apps here>
SDDM is the recommended display manager for KDE Plasma.
# pacman -S sddm
# systemctl enable sddm.service
And give him permission to sudo
# useradd -m -G wheel <user>
# passwd <user>
# sudoedit /etc/sudoers
// Uncomment the line %wheel ALL=(ALL) ALL
// :wq to save and quit from vi
# reboot
You should be able to log in via SDDM into Plasma with your user.
You can setup the wifi connection now via the Plasma Network Widget (bottom right).
Add the resume kernel parameter in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="... resume=/dev/ArchLvmGroup/swap"
and regenerate the config
# grub-mkconfig -o /boot/grub/grub.cfg
Add the resume hook after the lvm2 hook in /etc/mkinitcpio.conf
HOOKS=(... lvm2 resume filesystems ...)
And regenerate the initramfs
# mkinitcpio -P
As with Manjaro, we can use pamac to manage the official repos as well as AUR, flatpaks and snaps inclusive updates in a simple GUI.
# pacman -S flatpak
#
# git clone https://aur.archlinux.org/snapd.git
# cd snapd
# mkpkg -si
# cd ..
# rm -rf snapd
#
# git clone https://aur.archlinux.org/snapd-glib.git
# cd snapd-glib
# makepkg -si
# cd ..
# rm -rf snapd-glib
#
# git clone https://aur.archlinux.org/archlinux-appstream-data-pamac.git
# cd archlinux-appstream-data-pamac
# makepkg -si
# cd ..
# rm -rf archlinux-appstream-data-pamac
#
# git clone https://aur.archlinux.org/libpamac-full.git
# cd libpamac-full
# makepkg -si
# cd ..
# rm -rf libpamac-full
#
# git clone https://aur.archlinux.org/pamac-all.git
# cd pamac-all
# makepkg -si
# cd ..
# rm -rf pamac-all
TODO!
- Remove us keyboard and add de keyboard
- Install xf86-input-synaptics and configure the toiuchpad
- Don't restore auto saved session
- TBC