Installation media
Instructions for creating installation media are for Linux . If you are creating installation media from Windows , simply use Rufus .
- Open the following page .
- Download the latest ISO and its SIG signature.
- Check the signature of the ISO file using the following command:
gpg --keyserver-options auto-key-retrieve --verify archlinux-*.iso.sig
- Insert the USB disk into the PC.
- Find out its identifier.
lsblk
- Then disconnect it - if it was connected automatically. ( always replace the appropriate letter with x )
sudo umount /dev/sdx
- Unzip the Arch Linux installation files to it .
sudo dd bs=4M if=./archlinux-*.iso of=/dev/sdx status=progress && sync
Preparing for installation
- Boot the live OS. During the installation, you will use the US keyboard layout, you have it described on the left side of the keys of your physical keyboard.
- If you use a WiFi connection, first connect to your network:
wifi-menu
- Verify your internet connection:
ping -c3 8.8.8.8
- Update date and time:
timedatectl set-ntp true
Disk partition:
- Find out the name and current layout of the required disk:
lsblk
- Once you have identified your disk, open it in parted .
parted /dev/sdx
- The disk management opens. Set GiB as the default drive and then list the current disk status.
unit GiB print
- Before creating a new partition table, specify the type of disk partitioning required ( GPT or MBR ).
Info
For machines from 2014 and newer, it will probably be GPT. For older devices and most virtual environments, this will be the MBR by default. The steps below are optimized for the GPT schema.
▼ OVERWRITE THE WHOLE DISK AND DEFINE A SPECIFIC PART FOR ARCH (1 GPT DISK)
- Delete previous partition entries.
mklabel gpt
- Create an ESP partition:
mkpart ESP fat32 1MiB 513MiB set 1 boot on
- Create a 50 GiB system partition:
mkpart primary btrfs 513MiB 50.5
- Create a data partition of any size (500 GiB in the example below):
mkpart primary btrfs 50.5 550.5
- Create a partition on temporary 2 GiB files:
mkpart primary btrfs 550.5 552.5
- Create a 2 GiB swap partition:
mkpart primary linux-swap 552.5 554.5
- Check the sections and exit the editor:
print quit
▼ OVERWRITE THE ENTIRE DISK AND DEFINE A SPECIFIC PART FOR ARCH (1 MBR DISK)
- Delete previous partition entries.
mklabel msdos
- Create a 50 GiB system partition:
mkpart primary btrfs 1MiB 50 set 1 boot on
- Create a data partition of any size (500 GiB in the example below):
mkpart primary btrfs 50 550
- Create a partition on temporary 2 GiB files:
mkpart primary btrfs 550 552
- Create a 2 GiB swap partition:
mkpart primary linux-swap 552 554
- Check the sections and exit the editor:
print quit
Creating file systems:
- List and identify individual partitions:
lsblk
- Create fat32 for the ESP partition and "overwrite" the other partitions:
mkdosfs -F32 /dev/sdx1 mkdosfs -F32 /dev/sdx2 mkdosfs -F32 /dev/sdx3 mkdosfs -F32 /dev/sdx4
- Create a swap :
mkswap /dev/sdx5 swapon /dev/sdx5
- Mount created partitions:
- Mount the system partition.
mount /dev/sdx2 /mnt
- Mount the ESP partition as / boot / efi :
mkdir -p /mnt/boot/efi mount /dev/sdx1 /mnt/boot/efi
- Mount the data partition as / home and the temporary files partition as / tmp :
mkdir /mnt/home mkdir /mnt/tmp mount /dev/sdx3 /mnt/home mount /dev/sdx4 /mnt/tmp
Installation
- Edit the list of mirrors for downloading packages. Rows of erasing the keyboard shortcut Ctrl + K . You then modify the remaining servers for access via https. Close the changes and save with Ctrl + X and the Y key .
nano /etc/pacman.d/mirrorlist
## Iceland Server = https://mirror.system.is/arch/$repo/os/$arch ## Switzerland Server = https://pkg.adfinis-sygroup.ch/archlinux/$repo/os/$arch ## Czechia Server = https://ftp.sh.cvut.cz/arch/$repo/os/$arch ## Switzerland Server = https://mirror.puzzle.ch/archlinux/$repo/os/$arch
- Create an OS:
pacstrap /mnt base base-devel linux nano
- When done, create fstab for the new OS. Then check it.
genfstab -U /mnt >> /mnt/etc/fstab cat /mnt/etc/fstab
Configuration
- Switch to the new OS.
arch-chroot /mnt
- Set time:
ln -s /usr/share/zoneinfo/Europe/Prague /etc/localtime hwclock --systohc
- Set the localization (language) of the OS. If you want Czech, find the line # cs_CZ.UTF-8 in the list and remove the grid at the beginning. Save changes.
nano /etc/locale.gen
- Create the desired location and make it the default:
locale-gen echo LANG=cs_CZ.UTF-8 > /etc/locale.conf
- Set the name of your OS on the network (eg arch ):
echo arch > /etc/hostname
- Install the necessary WiFi connection applications and filesystem tools:
pacman -Sy iw wpa_supplicant dialog btrfs-progs dosfstools
- If you have a newer CPU (Sandy Bridge and above) from Intel , install the microcode:
pacman -S intel-ucode
- Install GRUB :
pacman -S grub efibootmgr grub-install /dev/sdx grub-mkconfig -o /boot/grub/grub.cfg
Creating a user:
- Create an administrator account.
useradd -m -G wheel uživatelské_jméno
- Change the administrator password.
passwd uživatelské_jméno
- Enable sudo for the administrator account.
echo "uživatelské_jméno ALL=(ALL) ALL" > /etc/sudoers.d/uživatelské_jméno
GPU drivers:
- Find out the manufacturer and model of your graphics card. If you are unsure, you can verify with the following command:
lspci | grep -e VGA -e 3D
- Then select the appropriate driver according to the table.
Info
With the open-source driver for nVidia cards, you can't play very demanding games. In the case of game focus, it may be necessary to use proprietary drivers.
Producer | Type | Controller | OpenGL | HW acceleration |
---|---|---|---|---|
AMD (GCN 3 and above) | open-source | xf86-video-amdgpu | table | mesa-vdpau, libva-vdpau-driver |
AMD (GCN 2 and below) | open-source | xf86-video-ati | table | mesa-vdpau, libva-vdpau-driver |
Intel | open-source | xf86-video-intel | table | libva-intel-driver, libvdpau-va-gl |
nVidia | open-source | xf86-video-nouveau | table | mesa-vdpau, libva-vdpau-driver |
nVidia | proprietary | nvidia | nvidia-utils | nvidia-utils, libva-vdpau-driver |
- Install the required packages. A few examples below:
## NVIDIA open-source: pacman -S xf86-video-nouveau mesa mesa-vdpau libva-vdpau-driver ## NVIDIA proprietární: pacman -S nvidia nvidia-utils libva-vdpau-driver ## Intel open-source: pacman -S xf86-video-intel mesa libva-intel-driver
HW-specific configuration:
▼ (PRA) OLD THINKPAD NTBS
- Install tp-smapi .
pacman -S tp_smapi
- Then do not install the acpi package in the Configuration section .
▼ NEWER THINKPAD NTBS (SANDY BRIDGE AND ABOVE)
- Install acpi-call .
pacman -S acpi_call
- Then do not install the acpi package in the Configuration section .
▼ VIRTUAL OS VIA GNOME BOXES
- Install the qxl graphics driver and spice-vdagent .
pacman -S xf86-video-qxl spice-vdagent
▼ BROADCOM WIFI ADAPTER
- Install broadcom-wl .
pacman -S dkms broadcom-wl-dkms
- Open the GRUB settings :
nano /etc/default/grub
- Disable other drivers.
GRUB_CMDLINE_LINUX_DEFAULT="quiet modprobe.blacklist=b43,b43legacy,ssb,brcmfmac,brcmsmac"
- Save and update the GRUB configuration .
grub-mkconfig -o /boot/grub/grub.cfg
Graphical interface:
- Install the desktop environment GNOME .
pacman -S gdm pacman -S gnome network-manager-applet gnome-tweaks
- From the package selection, select the following:
epiphany, file-roller, gedit, gnome-backgrounds, gnome-calculator, gnome-characters, gnome-clocks, gnome-color-manager, gnome-control-center, gnome-font-viewer, gnome-keyring, gnome-menus, gnome-screenshot, gnome-shell-extensions, gnome-system-monitor, gnome-terminal, gnome-video-effects, gvfs, gvfs-goa, gvfs-google, gvfs-mtp, mousetweaks, mutter, nautilus, networkmanager, xdg-user-dirs-gtk, gnome-boxes, gnome-software
- Enter the numbers of the above packages (changing over time) as follows and press Enter .
4,6,8,9,11,12,...,63
- Leave the default source for libjack .
- Set GNOME to start at startup:
systemctl enable gdm systemctl enable NetworkManager
- Press the keyboard shortcut Ctrl + D .
- Disconnect the partitions of the new OS.
umount -R /mnt
- Restart the PC.
reboot
Settings after first login:
- After a while, the GNOME login screen will appear with the administrator account created. Log in.
- Connect to the internet.
- Open the Terminal .
- Deactivate the root user while verifying the correct sudo configuration :
sudo passwd -l root
- Install important packages:
sudo pacman -S acpi asp flatpak git gnu-free-fonts gstreamer-vaapi libmatroska nftables ninja noto-fonts noto-fonts-emoji tlp ttf-dejavu ttf-droid ttf-liberation ttf-roboto vi sudo systemctl enable tlp sudo systemctl enable tlp-sleep sudo systemctl mask systemd-rfkill sudo systemctl mask systemd-rfkill.socket
- Install Paper Icon Theme :
git clone https://aur.archlinux.org/paper-icon-theme-git.git cd paper-icon-theme-git makepkg -sri
- Open Enhancements and select Paper as the theme for the icons.
- Create in the settings of a normal user for daily operation (more detailed instructions here .
- Restart the OS and log in to the created user.
Application:
- Open the Terminal . Install the application / flatpak version of the application.
sudo pacman -S mpv youtube-dl chromium flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak install flathub org.gnome.Evince flatpak install flathub org.gnome.eog flatpak install flathub org.libreoffice.LibreOffice flatpak install flathub org.gimp.GIMP flatpak install flathub io.atom.Atom flatpak install flathub io.atom.electron.BaseApp flatpak install flathub com.transmissionbt.Transmission flatpak install flathub com.valvesoftware.Steam
Security:
- Set the / tmp partition as noexec . Help here , you need to modify the syntax.
- If you are not using IPv6 , disable it. Help here , you need to modify the syntax.
- Set CZ.NIC DNSSEC - 193.17.47.1,185.43.135.1 - instructions here .
- Set up a firewall (more detailed instructions here ):
sudo su - nano /etc/nftables.conf --------------------- table inet filter { chain input { type filter hook input priority 0; policy drop; ct state invalid drop ct state established,related accept iif "lo" accept } chain forward { type filter hook forward priority 0; policy drop; } chain output { type filter hook output priority 0; policy accept; } } --------------------- systemctl enable nftables systemctl start nftables nft list ruleset
- Securely set up your browser (s). Instructions here .
- Restart the OS.
Success
You have now installed Arch Linux and performed its basic configuration.
0 Comments