Inhalt
Deutsches Tastatur Layout laden
loadkeys de-latin1-nodeadkeys
SSH Zugang aktivieren
wifi-menu passwd systemctl start sshd.service
Partitionierung
Laufwerksbuchstabe ermitteln
dmesg | grep disk
Partitionen anlegen
gdisk /dev/sda Command (? for help): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): Y Command (? for help): n Partition number (1-128, default 1): [ENTER] First sector (34-242187466, default = 2048) or {+-}size{KMGTP}: [ENTER] Last sector (2048-242187466, default = 242187466) or {+-}size{KMGTP}: +512M Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): EF00 Changed type of partition to 'EFI System' Command (? for help): n Partition number (2-128, default 2): [ENTER] First sector (34-242187466, default = 1050624) or {+-}size{KMGTP}: [ENTER] Last sector (1050624-242187466, default = 242187466) or {+-}size{KMGTP}: [ENTER] Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem' Command (? for help): w
Partitionen formatieren
mkfs.vfat -n UEFIBOOT -F32 /dev/sda1
LUKS einrichten
cryptsetup -v luksFormat /dev/sda2 cryptsetup luksOpen /dev/sda2 luks_root
BTRFS (Sub)-Volume anlegen
mkfs.btrfs -L arch /dev/mapper/luks_root mount -t btrfs /dev/mapper/luks_root /mnt btrfs sub create /mnt/@ btrfs sub create /mnt/@home umount /mnt
Partitionen zusammenmounten
mount -o subvol=@ /dev/mapper/luks_root /mnt mkdir /mnt/home mount -o subvol=@home /dev/mapper/luks_root /mnt/home mkdir /mnt/boot mount /dev/sda1 /mnt/boot
Basis System Installieren
Basis System inkl. Werkzeuge installieren
Bis zum 06.10.2019 wurde durch die Installation des Paketes base weitere Pakete installiert, wie zum Beispiel der Linux Kernel. Am 06.10 wurde das Paket base durch ein das Meta Paket base ersetzt, in dem z.B. der Kernel fehlt. Bei einer Neuinstallation sind somit gegenüber älteren Anleitungen mehr Pakete anzugeben. Die meiner Meinung nach minimal notwendigen Pakete sind nachfolgend ergänzt und fett markiert.
pacstrap /mnt base cryptsetup device-mapper dhcpd e2fsprogs inetutils linux linux-firmware lvm2 logrotate man-db man-pages nano less netctl s-nail sysfsutils usbutils vi which base-devel btrfs-progs vim bash-completion dialog wpa_supplicant mlocate htop efibootmgr dosfstools gptfdisk mkinitcpio linux
fstab anpassen
genfstab -U -p /mnt >> /mnt/etc/fstabvim /mnt/etc/fstab tmpfs /tmp tmpfs rw,nodev,nosuid 0 0 tmpfs /dev/shm tmpfs rw,nodev,nosuid,noexec 0 0
# If you have SSD change relatime on all non-boot partitions to noatime.
Chroot Wechsel
arch-chroot /mnt
Zeitzone setzten
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime hwclock --systohc
Hostname setzten
echo <your-hostname> > /etc/hostname
Hosts Datei anpassen
vim /etc/hosts ... 127.0.0.1 localhost.localdomain localhost ::1 localhost.localdomain localhost 127.0.0.1 $HOSTNAME.localdomain $HOSTNAME
Root Kennwort setzen und normalen Benutzer anlegen
passwd useradd -m -G wheel -s /bin/bash <username> passwd <username>
Spracheinstellung festlegen
echo LANG=de_DE.UTF-8 > /etc/locale.conf
Vor diesen Einträgen „#“ entfernen:
vim /etc/locale.gen #de_DE.UTF-8 UTF-8 #de_DE ISO-8859-1 #de_DE@euro ISO-8859-15
Locale generieren:
locale-gen
Tastaturbelegung festlegen:
echo KEYMAP=de-latin1-nodeadkeys > /etc/vconsole.conf
Linux Kernel erzeugen
vim /etc/mkinitcpio.conf # on the MODULES section, add "vfat crc32c-intel" # (and whatever else you know your hardware needs.) # # on the BINARIES section, add "/usr/bin/btrfsck", since it's useful # to have in case your filesystem has troubles # # on the HOOKS section: # - add "encrypt" before "filesystems" # - remove "fsck" and # - add "btrfs" at the end # # re-generate your initrd images mkinitcpio -p linux
Update 20.11.2020
aes_x86_64 wurde mit kernel 5.4 entfernt. (Link)
systemd bootctl installiere
bootctl installblkid /dev/sda2 > /boot/loader/entries/arch.conf blkid /dev/sda2 >> /boot/loader/entries/arch.conf blkid /dev/mapper/luks_root >> /boot/loader/entries/arch.conf # /dev/sda2 LABEL="arch" UUID=11111111-1111-1111-1111-111111111111 # /dev/mapper/root LABEL="Arch Linux" UUID=2222222-2222-2222-2222-22222222222
Anschließend die Datei /boot/loader/entries/arch-uefi.conf mit folgendem Inhalt erstellen:
vim /boot/loader/loader.conf ... timeout 3 default arch ... vim /boot/loader/entries/arch.conf ... title Arch Linux linux /vmlinuz-linux initrd /initramfs-linux.img options rw cryptdevice=UUID=11111111-1111-1111-1111-111111111111:luks-11111111-1111-1111-1111-111111111111 root=UUID=2222222-2222-2222-2222-22222222222 rootfstype=btrfs rootflags=subvol=@ ...#options cryptdevice=UUID=<UUID>:<mapped-name> root=/dev/mapper/<mapped-name> rootflags=subvol=<subvol> quiet rw options cryptdevice=UUID=11111111-1111-1111-1111-111111111111:luks_root root=UUID=2222222-2222-2222-2222-22222222222 rootfstype=btrfs rootflags=subvol=@
Das Gleiche noch für Arch Linux fallback die Datei /boot/loader/entries/arch-uefi-fallback.conf mit folgendem Inhalt erstellen:
title Arch Linux Fallback linux /vmlinuz-linux initrd /initramfs-linux-fallback.img options root=LABEL=p_arch rw resume=LABEL=p_swap
Der timeout (in Sekunden) kann natürlich frei gewählt werden.
Quelle: https://wiki.archlinux.de/title/UEFI_Installation#systemd_bootctl_.28ehemals_Gummiboot.29
Software installieren
Gnome und GDM installieren
pacman -Syu gnome gnome-extra gdm firefox firefox-i18n-de networkmanager network-manager-applet gnome-software-packagekit-pluginsystemctl enable gdm.service systemctl enable NetworkManager.service
Nautilus thumbnailer
pacman -S gst-libav gst-plugins-ugly gstreamer nautilus -q
Cups
pacman -S cups systemctl enable --now org.cups.cupsd.service
LibreOffice
pacman -S libreoffice-fresh libreoffice-fresh-de
Thunderbird
pacman -S thunderbird thunderbird-i18n-de libgnome-keyring
Design
pacman -S papirus-icon-theme arc-gtk-theme
Gnome-Shell Extension
pacman -S chrome-gnome-shell
VLC
pacman -S vlc
NTFS Support
ntfs-3g
Audio Codecs
pacman -S a52dec faac faad2 flac jasper lame libdca libdv libmad libmpeg2 libtheora libvorbis libxv wavpack x264 xvidcore gstreamer0.10-plugins
Veracrypt
pacman -S veracrypt
Sudo Rechte anpassen
Sudo Rechte folgen folgendem Schema:
<wer> <auf welchem Host>=(<als welcher Benutzer>) <darf was ausführen>
$USER ALL=(ALL) ALL
Nextcloud Client
pacman -S nextcloud-client
Firmware Update Daemon
pacman -S fwupd fwupdmgr refresh fwupdmgr update
FWBuilder
pacman -S fwbuilder
Gnome Update Viewer
pacman -S gnome-packagekit
Powerline
pacman -S powerline powerline-fonts
.bashrc (end of file)
# Debian
if [ -f /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh ]; then
source /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh
fi
# (open)SUSE; Fedora
if [ -f /usr/share/powerline/bash/powerline.sh ]; then
source /usr/share/powerline/bash/powerline.sh
fi
# Arch
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
. /usr/share/powerline/bindings/bash/powerline.sh
fi
.vimrc (end of file)
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
" Always show statusline
set laststatus=2
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
set t_Co=256
let g:powerline_pycmd = 'py3'
Wireguard
pacman -Sy wireguard-arch resolvconf
Power Management
pacman -Sy acpid tlp powertop systemctl enable --now acpid systemctl enable --now tlp.service
AUR package manager
pacman -S git git clone https://aur.archlinux.org/yay.git cd yay makepkg -si yay -Sy
Vorta
yay -Sy vorta
Microsoft Schriften
yay -Sy ttf-ms-fonts
Timeshift
yay -Sy timeshift
Spotify
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Software öffnen und nach Spotify suchen
Known Issues
Error: grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
Reason: Live System was booted in legacy mode