Benutzer:Tuxnix: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
(Die Seite wurde geleert.)
Markierung: Geleert
(Entwurf)
Zeile 1: Zeile 1:
=BIOS-Rechner syslinux crypt-r=


<b>Arch Linux Installation auf einem BIOS-Rechner mit syslinux als Bootloader</b><br>
* 1 Partition: crypt-root<br>
* SWAP-Speicher möglich mittels Swap-Datei<br>
* Zum Schutz der Daten bei physischem Fremd-Zugriff auf den Datentraeger<br>
Weitere [[spicker | Arch Linux Installations Spickzettel]]<br><br>
<u>Das neueste Arch ISO-Abbild herunterladen von:</u><br>
[http://www.archlinux.org/download/ www.archlinux.org/download/]<br><br>
<u>ISO-Abbild pruefen:</u><br>
<code style=font-size:12px>md5sum archlinux-'''*'''-x86_64.iso</code><br><br>
<u>ISO-Abbild auf USB-Stick uebertragen:</u><br>
<code style=font-size:12px>fdisk -l</code> - <u>'''x''' ermitteln</u><br>
<code style=font-size:12px>dd bs=4M if=/'''pfad'''/archlinux-'''*'''-x86_64.iso of=/dev/'''x''' status=progress</code><br><br>
<u>Nuetzliche Kommandos:</u><br>
<code style=font-size:12px>reboot</code> - <u>Neustarten</u><br>
<code style=font-size:12px>poweroff</code> - <u>Herunterfahren</u><br>
<code style=font-size:12px>{{taste|STRG}}+{{taste|ALT}}+{{taste|F2}}</code> - <u>zweites Terminal oeffnen</u><br>
<code style=font-size:12px>{{taste|&uarr;}}</code> - <u>Konsolenbefehle wiederholen</u><br><br>
<u>Deutsche Tastaturbelegung - Die Taste '''{{Taste|Z}}''' druecken, um das '''y''' Zeichen zu erhalten:</u><br>
<code style=font-size:12px>loadkeys de</code><br><br>
<u>Internetverbindung herstellen ueber LAN:</u><br>
<code style=font-size:12px>ip link</code><br>
<code style=font-size:12px>dhcpcd en'''xxx'''</code><br><br>
<u>Internetverbindung herstellen ueber WLAN:</u><br>
<code style=font-size:12px>iwctl</code><br>
<code style=font-size:12px>station wlan0 connect '''SSID'''</code><br>
<code style=font-size:12px>'''Passwort'''</code><br>
<code style=font-size:12px>{{Taste|Strg}}+{{taste|d}}</code><br><br>
<u>Spickzettel auf tty2 aufrufen:</u><br>
<code style=font-size:12px>STRG+ALT+F2</code><br>
<code style=font-size:12px>lynx wiki.archlinux.de/title/spicker</code><br><br>
<u>Wenn auf dem Datentraeger zuvor schuetzenswerte Daten waren:</u><br>
<code style=font-size:12px>shred -v -n 1 /dev/'''x'''</code><br><br>
<u>Partitionieren: (bis 2 TiB)</u><br>
<code style=font-size:12px>fdisk -l</code> - '''x''' ermitteln<br>
<code style=font-size:12px>fdisk /dev/'''x'''</code> - fdisk starten<br>
<code style=font-size:12px>{{taste|o}}</code> - neue Partitionstabelle im cache<br>
<code style=font-size:12px>{{taste|n}}</code> - neue Partition erstellen<br>
<code style=font-size:12px>{{taste|Enter}}</code> - Primaerpatition bestaetigen<br>
<code style=font-size:12px>{{taste|Enter}}</code> - Partitionsnummer bestaetigen<br>
<code style=font-size:12px>{{taste|Enter}}</code> - Ersten Sektor bestaetigen<br>
<code style=font-size:12px>{{taste|Enter}}</code> - Letzten Sektor bestaetigen<br>
<code style=font-size:12px>{{taste|a}}</code> - Bootsektor aktivieren<br>
<code style=font-size:12px>{{taste|p}}</code> - zur eigenen Kontrolle vor dem Speichern<br>
<code style=font-size:12px>{{taste|w}}</code> - schreiben der Partitionstabelle<br><br>
<u>Kernelmodul laden:</u><br>
<code style=font-size:12px>modprobe dm-crypt</code><br><br>
<u>Partiton verschluesseln:</u><br>
<code style=font-size:12px>cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/'''x'''1</code><br><br>
<u>Verschlüsselte Partiton oeffnen und mappen:</u><br>
<code style=font-size:12px>cryptsetup open /dev/'''x'''1 ARCH</code><br>
<u>Und formatieren:</u><br>
<code style=font-size:12px>mkfs.ext4 /dev/mapper/ARCH</code><br><br>
<u>Mounten:</u><br>
<code style=font-size:12px>mount /dev/mapper/ARCH /mnt</code><br><br>
<u>Installation der Basispakete:</u><br>
<code style=font-size:12px>pacstrap /mnt base base-devel linux linux-firmware dhcpcd dm-crypt nano</code><br><br>
<u>Installation von Microcode:</u><br>
<code style=font-size:12px>pacstrap /mnt intel-ucode</code> oder <code style=font-size:12px>pacstrap /mnt amd-ucode</code><br><br>
<u>fstab erzeugen:</u><br>
<code style=font-size:12px>genfstab -U /mnt > /mnt/etc/fstab</code><br><br>
<u>Chrooten:</u><br>
<code style=font-size:12px>arch-chroot /mnt</code><br><br>
<u>Syslinux installieren:</u><br>
<code style=font-size:12px>pacman -S syslinux</code><br>
<code style=font-size:12px>syslinux-install_update -i -a -m</code><br>
<code style=font-size:12px>nano /boot/syslinux/syslinux.cfg</code><br>
<u>Und beide Zeilen mit "APPEND" wie folgt anpassen</u><br>
<code style=font-size:12px>APPEND cryptdevice=/dev/'''x'''1:ARCH root=/dev/mapper/ARCH rw lang=de locale=de_DE.UTF-8</code><br><br>
<u>Das Root Password erstellen:</u><br>
<code style=font-size:12px>passwd</code><br><br>
<u>Konfiguration:</u><br>
<code style=font-size:12px>echo '''mein-rechner''' > /etc/hostname</code><br>
<code style=font-size:12px>echo LANG=de_DE.UTF-8 > /etc/locale.conf</code><br>
<code style=font-size:12px>echo KEYMAP=de-latin1 > /etc/vconsole.conf</code><br>
<code style=font-size:12px>echo FONT=lat9w-16 >> /etc/vconsole.conf</code><br>
<code style=font-size:12px>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</code><br><br>
<code style=font-size:12px>nano /etc/locale.gen</code><br>
<u>Und das # am Anfang folgender Zeilen entfernen:</u><br>
<code style=font-size:12px>#de_DE.UTF-8 UTF-8</code><br>
<code style=font-size:12px>#de_DE ISO-8859-1</code><br>
<code style=font-size:12px>#de_DE@euro ISO-8859-15</code><br>
<code style=font-size:12px>#en_US.UTF-8 UTF-8</code><br>
<code style=font-size:12px>locale-gen</code><br><br>
<code style=font-size:12px>nano /etc/mkinitcpio.conf</code><br>
<u>Die Zeile 'HOOKS' in dieser Reihenfolge anpassen:</u><br>
<code style=font-size:12px>HOOKS="base udev autodetect keyboard keymap modconf block encrypt filesystems fsck"</code><br>
<u>Und neues initramfs erzeugen</u><br>
<code style=font-size:12px>mkinitcpio -p linux</code><br><br>
<u>Den Benutzer 'duda' anlegen und ihn ggf. zu den Gruppen hinzufuegen:</u><br>
<code style=font-size:12px>useradd -m -g users -s /bin/bash '''duda'''</code><br>
<code style=font-size:12px>passwd '''duda'''</code><br>
<code style=font-size:12px>usermod -aG wheel,audio,video,power '''duda'''</code><br><br>
<u>Gruppenmitgliedern von wheel Rootrechte per 'sudo' verleihen:</u><br>
<code style=font-size:12px>EDITOR=nano visudo</code><br>
<u>Kommentarzeichen und Leerzeichen von dieser Zeile entfernen:</u><br>
<code style=font-size:12px># %wheel ALL=(ALL) ALL</code><br><br>
<u>Installation und Konfiguration von X:</u><br>
<code style=font-size:12px>pacman -S xorg-server xorg-xinit</code><br>
<code style=font-size:12px>localectl set-x11-keymap de pc105 deadgraveacute</code><br><br>
<code style=font-size:12px>lspci &#124; grep VGA</code><br>
<u>Passend zur Grafikkarte einen freien Treiber installieren:</u><br>
<code style=font-size:12px>pacman -S xf86-video-amdgpu</code><br>
<code style=font-size:12px>pacman -S xf86-video-intel</code><br>
<code style=font-size:12px>pacman -S xf86-xf86-video-nouveau</code><br><br>
<u>Plasma (minimal):</u><br>
<code style=font-size:12px>pacman -S kwin plasma-desktop plasma-nm konsole sddm</code><br>
<u>GNOME (minimal):</u><br>
<code style=font-size:12px>pacman -S mutter network-manager-applet gnome-terminal gdm</code><br>
<u>Xfce4 (minimal):</u><br>
<code style=font-size:12px>pacman -S xfwm4 xfce4-session network-manager-applet xfce4-terminal lightdm</code><br><br>
<u>Weitere Dienste installieren:</u><br>
<code style=font-size:12px>pacman -S acpid avahi iwd</code><br><br>
<u>Dienste aktivieren:</u><br>
<code style=font-size:12px>systemctl enable acpid</code> - <u>Energieverwaltung</u><br>
<code style=font-size:12px>systemctl enable avahi-daemon</code> - <u>Netzwerk Zuweisung</u><br>
<code style=font-size:12px>systemctl enable NetworkManager</code> - <u>Netzwerkmanager</u><br>
<code style=font-size:12px>systemctl enable iwd</code> - <u>WLAN Daemon</u><br>
<code style=font-size:12px>systemctl enable systemd-timesyncd</code> - <u>Zeit Synchronisation</u><br>
<code style=font-size:12px>systemctl enable fstrim.timer</code> - <u>nur fuer unverschluesselte SSDs</u><br><br>
<u>Nur einen Loginmanager aktivieren:</u><br>
<code style=font-size:12px>systemctl enable sddm</code> - <u>fuer das Plasma Desktop</u><br>
<code style=font-size:12px>systemctl enable gdm</code> - <u>fuer das GNOME Desktop</u><br>
<code style=font-size:12px>systemctl enable lightdm</code> - <u>fuer das Xfce4 Desktop</u><br><br>
<u>Chrootumgebung verlassen und Partitionen loesen:</u><br>
<code style=font-size:12px>exit</code><br>
<code style=font-size:12px>umount /mnt</code><br><br>
<code style=font-size:12px>poweroff</code><br>
<u>ISO-Stick entfernen, Neustarten und Einloggen im Desktopmanager</u>
[[en:Beginners' Guide]]
[[Kategorie:Installation]]
[[Kategorie:Arch_Linux_Installations_Spickzettel]]

Version vom 8. April 2021, 12:54 Uhr

BIOS-Rechner syslinux crypt-r

Arch Linux Installation auf einem BIOS-Rechner mit syslinux als Bootloader

  • 1 Partition: crypt-root
  • SWAP-Speicher möglich mittels Swap-Datei
  • Zum Schutz der Daten bei physischem Fremd-Zugriff auf den Datentraeger

Weitere Arch Linux Installations Spickzettel

Das neueste Arch ISO-Abbild herunterladen von:
www.archlinux.org/download/

ISO-Abbild pruefen:
md5sum archlinux-*-x86_64.iso

ISO-Abbild auf USB-Stick uebertragen:
fdisk -l - x ermitteln
dd bs=4M if=/pfad/archlinux-*-x86_64.iso of=/dev/x status=progress

Nuetzliche Kommandos:
reboot - Neustarten
poweroff - Herunterfahren
STRG+ALT+F2 - zweites Terminal oeffnen
- Konsolenbefehle wiederholen

Deutsche Tastaturbelegung - Die Taste Z druecken, um das y Zeichen zu erhalten:
loadkeys de

Internetverbindung herstellen ueber LAN:
ip link
dhcpcd enxxx

Internetverbindung herstellen ueber WLAN:
iwctl
station wlan0 connect SSID
Passwort
Strg+d

Spickzettel auf tty2 aufrufen:
STRG+ALT+F2
lynx wiki.archlinux.de/title/spicker

Wenn auf dem Datentraeger zuvor schuetzenswerte Daten waren:
shred -v -n 1 /dev/x

Partitionieren: (bis 2 TiB)
fdisk -l - x ermitteln
fdisk /dev/x - fdisk starten
o - neue Partitionstabelle im cache
n - neue Partition erstellen
↵ Enter - Primaerpatition bestaetigen
↵ Enter - Partitionsnummer bestaetigen
↵ Enter - Ersten Sektor bestaetigen
↵ Enter - Letzten Sektor bestaetigen
a - Bootsektor aktivieren
p - zur eigenen Kontrolle vor dem Speichern
w - schreiben der Partitionstabelle

Kernelmodul laden:
modprobe dm-crypt

Partiton verschluesseln:
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/x1

Verschlüsselte Partiton oeffnen und mappen:
cryptsetup open /dev/x1 ARCH
Und formatieren:
mkfs.ext4 /dev/mapper/ARCH

Mounten:
mount /dev/mapper/ARCH /mnt

Installation der Basispakete:
pacstrap /mnt base base-devel linux linux-firmware dhcpcd dm-crypt nano

Installation von Microcode:
pacstrap /mnt intel-ucode oder pacstrap /mnt amd-ucode

fstab erzeugen:
genfstab -U /mnt > /mnt/etc/fstab

Chrooten:
arch-chroot /mnt

Syslinux installieren:
pacman -S syslinux
syslinux-install_update -i -a -m
nano /boot/syslinux/syslinux.cfg
Und beide Zeilen mit "APPEND" wie folgt anpassen
APPEND cryptdevice=/dev/x1:ARCH root=/dev/mapper/ARCH rw lang=de locale=de_DE.UTF-8

Das Root Password erstellen:
passwd

Konfiguration:
echo mein-rechner > /etc/hostname
echo LANG=de_DE.UTF-8 > /etc/locale.conf
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/locale.gen
Und das # am Anfang folgender Zeilen entfernen:
#de_DE.UTF-8 UTF-8
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
#en_US.UTF-8 UTF-8

locale-gen

nano /etc/mkinitcpio.conf
Die Zeile 'HOOKS' in dieser Reihenfolge anpassen:
HOOKS="base udev autodetect keyboard keymap modconf block encrypt filesystems fsck"
Und neues initramfs erzeugen
mkinitcpio -p linux

Den Benutzer 'duda' anlegen und ihn ggf. zu den Gruppen hinzufuegen:
useradd -m -g users -s /bin/bash duda
passwd duda
usermod -aG wheel,audio,video,power duda

Gruppenmitgliedern von wheel Rootrechte per 'sudo' verleihen:
EDITOR=nano visudo
Kommentarzeichen und Leerzeichen von dieser Zeile entfernen:
# %wheel ALL=(ALL) ALL

Installation und Konfiguration von X:
pacman -S xorg-server xorg-xinit
localectl set-x11-keymap de pc105 deadgraveacute

lspci | grep VGA
Passend zur Grafikkarte einen freien Treiber installieren:
pacman -S xf86-video-amdgpu
pacman -S xf86-video-intel
pacman -S xf86-xf86-video-nouveau

Plasma (minimal):
pacman -S kwin plasma-desktop plasma-nm konsole sddm

GNOME (minimal):
pacman -S mutter network-manager-applet gnome-terminal gdm

Xfce4 (minimal):
pacman -S xfwm4 xfce4-session network-manager-applet xfce4-terminal lightdm

Weitere Dienste installieren:
pacman -S acpid avahi iwd

Dienste aktivieren:
systemctl enable acpid - Energieverwaltung
systemctl enable avahi-daemon - Netzwerk Zuweisung
systemctl enable NetworkManager - Netzwerkmanager
systemctl enable iwd - WLAN Daemon
systemctl enable systemd-timesyncd - Zeit Synchronisation
systemctl enable fstrim.timer - nur fuer unverschluesselte SSDs

Nur einen Loginmanager aktivieren:
systemctl enable sddm - fuer das Plasma Desktop
systemctl enable gdm - fuer das GNOME Desktop
systemctl enable lightdm - fuer das Xfce4 Desktop

Chrootumgebung verlassen und Partitionen loesen:
exit

umount /mnt

poweroff
ISO-Stick entfernen, Neustarten und Einloggen im Desktopmanager