Letzte Änderung: 08. September 2021Arch Linux Logo

Arch Linux 10.01.2021 Installation Manuel Btrfs, GPT & UEFI mit refind als Bootloader


Ich beschreibe den USB Stick zum installieren des Arch iso's mit Rufus. # loadkeys de-latin1 # systemctl start sshd Beispiel Partitionierung : 1. /boot EFI Boot mit 512 MB 2. swap mit 8 GB (bei 4GB Ram im Rechner) 3. /var/log mit 2 GB 4. / mit 48 GB 5. /home mit dem Rest der Festplatte # gdisk /dev/sda o n 1 First Sector -> Enter +512M ef00 n 2 First Sector -> Enter +8G 8200 n 3 First Sector -> Enter +2G 8300 n 4 First Sector -> Enter +48G 8300 n 5 First Sector -> Enter Last Sector -> Enter 8300 w # lsblk # mkfs.fat -F32 /dev/sda1 # mkswap -L SWAP /dev/sda2 # mkfs.btrfs -L LOG /dev/sda3 # mkfs.btrfs -L ROOT /dev/sda4 # mkfs.btrfs -L HOME /dev/sda5 # mount /dev/sda4 /mnt # mkdir /mnt/boot # mount /dev/sda1 /mnt/boot # swapon -L SWAP # mkdir -p /mnt/var/log # mount /dev/sda3 /mnt/var/log # mkdir /mnt/home # mount /dev/sda5 /mnt/home # lsblk -o+label,partlabel --- Optional WI-FI Start--- # iwctl device list device wlan0 show station wlan0 scan station wlan0 get-networks station wlan0 connect SSIDNAME station wlan0 show exit # ping -c3 www.archlinux.de --- Optional WI-FI End --- # pacstrap /mnt base base-devel linux linux-firmware linux-headers dhcpcd vim nano # genfstab -U /mnt >> /mnt/etc/fstab Partitionierung abgeschlossen, alle Partitionen gemounted, dann wechseln wir in die Chroot Umgebung # arch-chroot /mnt/ # echo archlinux > /etc/hostname # hwclock --systohc # echo LANG=de_DE.UTF-8 > /etc/locale.conf # vim /etc/locale.gen de_DE.UTF-8 UTF-8 de_DE ISO-8859-1 de_DE@euro ISO-8859 -15 # locale-gen # echo KEYMAP=de-latin1 > /etc/vconsole.conf # echo FONT=lat9w-16 >> /etc/vconsole.conf # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime # nano /etc/hosts #ip-address hostname.domain.org hostname 127.0.0.1 localhost.localdomain archlinux ::1 localhost.localdomain archlinux # passwd # pacman -S refind-efi efibootmgr btrfs-progs openssh iwd htop mc # refind-install --usedefault /dev/sda1 --alldrivers # mkrlconf die ersten beiden Zeilen in # vim /boot/refind_linux.conf löschen so das nur noch die "Boot with minimal ..." Zeile drin steht und in den Parametern ein rw davorsetzen. "rw root=UUIDxxxxxx" Bootblock für rEFInd schreiben # efibootmgr --create --disk /dev/sda1 --part 1 --loader /EFI/BOOT/bootx64.efi --label "rEFInd Boot Manager" --verbose Nachsehen ob der Bootloader ins EFI eingetragen wurde: # efibootmgr -v # useradd -mG wheel marcus # passwd marcus # vim /etc/sudoers uncomment %wheel ALL=(ALL) ALL --- Optional Start --- # vi /etc/systemd/network/25-wired.network [Match] Name=enp0s3 [Network] #Address=192.168.0.1/24 DHCP=v4 # systemctl enable systemd-networkd --- Optional End --- # systemctl enable sshd # systemctl enable dhcpcd wir verlassen die chroot Umgebung und unmounten alle Partitionen # exit # umount -R /mnt # reboot Arch Linux sollte nun eigenständig booten ... # systemctl enable iwd # systemctl start iwd # pacman -Syu # reboot --- Dinge, die man nach der installation noch machen kann/sollte. Cronjobs instalieren # pacman -S cronie # systemctl enable cronie in die /etc/locale.conf noch EDITOR=vim eintragen # vi /etc/systemd/timesyncd.conf [Time] NTP=ptbtime1.ptb.de ptbtime2.ptb.de ptbtime3.ptb.de FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org RootDistanceMaxSec=5 PollIntervalMinSec=32 PollIntervalMaxSec=2048 # timedatectl set-ntp true --- Optional Install Gnome3 # pacman -S gnome gnome-extra gdm # systemctl enable gdm # systemctl start gdm # reboot