Update README.md

This commit is contained in:
martin schmidt 2022-01-12 15:04:21 +00:00
parent fb369e84d3
commit 01e93e66d8
1 changed files with 145 additions and 146 deletions

291
README.md
View File

@ -1,167 +1,166 @@
# Simple, modern and secure installation of Arch Linux with KDE Plasma. # Simple, modern and secure installation of Arch Linux with KDE Plasma.
**Load the preferred keyboard. In my case it's "de" for Germany.** **Load the preferred keyboard. In my case it's "de" for Germany.**
$ loadkeys de $ loadkeys de
**List devices to make sure you partition the right device.**
$ lsblk
**Partition the device using gdisk (assuming /dev/sda).**
$ gdisk /dev/sda
**Create GPT and EFI-partion.**
$ o # _Creates new GPT-partition table._
$ y # _Accept._
$ n # _New partition._
$ +512M # _512 MB should be plenty for /boot._
$ ef00 # _Mark as EFI._
$ n # _New main partition, accept all the following using "y"._
**Print and check your partitions.**
$ p
**Write partitions to device.**
$ w
$ y # _Accept._
**Encrypt primary partition.**
$ cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda2
$ YES
**List devices to make sure you partition the right device.** **Open encrypted partition, map as "root" and create filesystem.**
$ lsblk $ cryptseup luksOpen /dev/sda2 root
$ mkfs.fat -F 32 -n UEFI /dev/sda1
**Partition the device using gdisk (assuming /dev/sda).** **-F specifies the type of file allocation tables used (12, 16 or 32 bit).**
$ gdisk /dev/sda **-n sets the volume name (label) of the filesystem to "UEFI".**
**Create GPT and EFI-partion.** **Create ext4 filesystem on primary partition.**
$ o # _Creates new GPT-partition table._ $ mkfs.ext4 /dev/mapper/root
$ y # _Accept._
$ n # _New partition._ **Create mountpoints and mount partitions.**
$ +512M # _512 MB should be plenty for /boot._ $ mount /dev/mapper/root /mnt
$ ef00 # _Mark as EFI._ $ mkdir /mnt/boot
$ n # _New main partition, accept all the following using "y"._ $ mount /dev/sda1 /mnt/boot
**Print and check your partitions.** **Optionally update mirrorlist using reflector.**
$ p **In this case use the latest 10 mirrors from Germany, that have been synchronized within the last 24 hours and sort the by download-rate and write them to the pacman mirrorlist.**
$ reflector --verbose --latest 10 --country Germany --age 24 --sort rate --save /etc/pacman.d/mirrorlist
**Write partitions to device.**
$ w **Install base system and basic packages (network, editor, sudo).**
$ y # _Accept._ **The package base-devel is not necessary but recommended.**
$ pacstrap /mnt base base-devel linux linux-firmware networkmanager nano sudo
**Encrypt primary partition.**
$ cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda2 **Generate fstab.**
$ YES $ genfstab -Lp /mnt > /mnt/etc/fstab
**-L = Use labels for source identifiers (shortcut for -t LABEL).**
**Open encrypted partition, map as "root" and create filesystem.** **-p Exclude pseudofs mounts (default behavior).**
$ cryptseup luksOpen /dev/sda2 root
$ mkfs.fat -F 32 -n UEFI /dev/sda1 **Chroot into your installation.**
**-F specifies the type of file allocation tables used (12, 16 or 32 bit).** $ arch-chroot /mnt
**-n sets the volume name (label) of the filesystem to "UEFI".**
**Set your hostname.**
**Create ext4 filesystem on primary partition.** $ echo mycomputer > /etc/hostname
$ mkfs.ext4 /dev/mapper/root
**Generate locale.gen for your preferred language (and preferribly english).**
**Create mountpoints and mount partitions.** $ nano /etc/locale.gen
$ mount /dev/mapper/root /mnt **Uncomment your language, e.g. de_DE.UTF-8 UTF-8 (and en_US.UTF-8).**
$ mkdir /mnt/boot
$ mount /dev/sda1 /mnt/boot **Generate the locale.**
$ locale-gen
**Optionally update mirrorlist using reflector.**
**In this case use the latest 10 mirrors from Germany, that have been synchronized within the last 24 hours and sort the by download-rate and write them to the pacman mirrorlist.** **Add necessary HOOKS and MODULES.**
$ reflector --verbose --latest 10 --country Germany --age 24 --sort rate --save /etc/pacman.d/mirrorlist $ nano /etc/mkinitcpio.conf
**Install base system and basic packages (network, editor, sudo).** **MODULES=(ext4)**
**The package base-devel is not necessary but recommended.** **HOOKS=(base udev autodetect modconf block keyboard keymap encrypt filesystems fsck shutdown)**
$ pacstrap /mnt base base-devel linux linux-firmware networkmanager nano sudo
**Create mkinitcpio.**
**Generate fstab.** $ mkinitcpio -p linux
$ genfstab -Lp /mnt > /mnt/etc/fstab
**-L = Use labels for source identifiers (shortcut for -t LABEL).** **Start NetworkManager for automatic network access on next boot.**
**-p Exclude pseudofs mounts (default behavior).** $ systemctl enable NetworkManager
**Chroot into your installation.** **Set a root-password.**
$ arch-chroot /mnt $ passwd
**Set your hostname.** **Install systemd-boot bootloader.**
$ echo mycomputer > /etc/hostname $ bootctl install
**Generate locale.gen for your preferred language (and preferribly english).** **Create the bootloader config.**
$ nano /etc/locale.gen $ nano /bootloader/entries/arch.conf
**Uncomment your language, e.g. de_DE.UTF-8 UTF-8 (and en_US.UTF-8).**
**Add the following:**
**Generate the locale.**
$ locale-gen
**Add necessary HOOKS and MODULES.**
$ nano /etc/mkinitcpio.conf
**MODULES=(ext4)**
**HOOKS=(base udev autodetect modconf block keyboard keymap encrypt filesystems fsck shutdown)**
**Create mkinitcpio.**
$ mkinitcpio -p linux
**Start NetworkManager for automatic network access on next boot.**
$ systemctl enable NetworkManager
**Set a root-password.**
$ passwd
**Install systemd-boot bootloader.**
$ bootctl install
**Create the bootloader config.**
$ nano /bootloader/entries/arch.conf
**Add the following:**
``` ```
title Arch Linux title Arch Linux
linux /vmlinuz-linux linux /vmlinuz-linux
initrd /initramfs-linux.img initrd /initramfs-linux.img
options cryptdevice=/dev/sda2:root root=/dev/mapper/root rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8 options cryptdevice=/dev/sda2:root root=/dev/mapper/root rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8
``` ```
**Create a fallback config.**
**Create a fallback config.** $ cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-fallback.conf
$ cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-fallback.conf
**Edit the fallback config.**
**Edit the fallback config.** $ nano /boot/loader/entries/arch-fallback.conf
$ nano /boot/loader/entries/arch-fallback.conf
**Change it to the following:**
**Change it to the following:**
``` ```
title Arch Linux Fallback title Arch Linux Fallback
initrd /initramfs-linux-fallback.img initrd /initramfs-linux-fallback.img
``` ```
**Edit loader config.** **Edit loader config.**
$ nano /boot/loader/loader.conf $ nano /boot/loader/loader.conf
**Change it to the following:** **Change it to the following:**
``` ```
timeout 1 timeout 1
default arch.conf default arch.conf
``` ```
**Exit and reboot.** **Exit and reboot.**
$ exit $ exit
$ umount /mnt/boot $ umount /mnt/boot
$ reboot $ reboot
**Enter encryption-password and login as root.** **Enter encryption-password and login as root.**
**Set the keyboard to your preferred language permantently.** **Set the keyboard to your preferred language permantently.**
$ echo KEYMAP=de-latin1-nodeadkeys > /etc/vconsole.conf $ echo KEYMAP=de-latin1-nodeadkeys > /etc/vconsole.conf
**Create a user with a /home-directory.** **Create a user with a /home-directory.**
$ useradd -m myusername $ useradd -m myusername
**Set password for your user.** **Set password for your user.**
$ passwd myusername $ passwd myusername
**Add $myusername to group wheel for sudo access.** **Add $myusername to group wheel for sudo access.**
$ gpasswd -a $myusername wheel $ gpasswd -a $myusername wheel
**Edit sudoers-file for sudo access.** **Edit sudoers-file for sudo access.**
$ nano /etc/sudoers $ nano /etc/sudoers
**Uncomment „%wheel ALL=(ALL) ALL“-** **Uncomment „%wheel ALL=(ALL) ALL“.**
**Logout as root.** **Logout as root.**
$ exit $ exit
**Login as you user.** **Login as you user.**
**Install SDDM and a minimal KDE Plasma.** **Install SDDM and a minimal KDE Plasma.**
$ pacman -S sddm sddm-kcm plasma-desktop $ pacman -S sddm sddm-kcm plasma-desktop
**Install KDE terminal for easier installation of packages in Plasma.** **Install KDE terminal for easier installation of packages in Plasma.**
$ pacman -S konsole $ pacman -S konsole
**Enable and start SDDM to login to Plasma.** **Enable and start SDDM to login to Plasma.**
$ systemctl enable sddm $ systemctl enable sddm
$ systemctl start sddm $ systemctl start sddm
**Now you are logged in to your Plasma desktop environment and ready to configure and use your Arch Linux.** **Now you are logged in to your Plasma desktop environment and ready to configure and use your Arch Linux.**
**Suggested packages to install.** **Suggested packages to install.**
- microcode (https://wiki.archlinux.org/index.php/Microcode) - microcode (https://wiki.archlinux.org/index.php/Microcode)
- kde-gtk-config (Adds graphical settings for GTK apps.) - kde-gtk-config (Adds graphical settings for GTK apps.)
- kdeplasma-addons („All kind of addons to improve your Plasma experience.“) - kdeplasma-addons („All kind of addons to improve your Plasma experience.“)