Benutzer:Tuxnix: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
(Entwurf root_crypt)
(Crypted Root für Bios-Rechner integriert)
(35 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Entwurf root-crypt=
{{inuse|[[Benutzer:Tuxnix|Tuxnix]] ([[Benutzer Diskussion:Tuxnix|Diskussion]])}}{{SEITENTITEL:sway}}{{righttoc}}


(Versuch einer neuen Gliederung der Artikelserie)<br><br>
<b>Entwurf Artikel: 2. Partitionierung+Basispakete BIOS-Rechner</b><br>


[[spicker | Arch Linux Installations Spickzettel]]<br>
Letztes Kapitel [[1._Vorbereitung|1. Vorbereitung]]<br><br>


<b>2. Partitionierung+Basispakete bei einem BIOS-Rechner</b><br>
* A) ROOT
* B) ROOT + SWAP
* c) Crypted ROOT
(Für das Partitionieren auf einem BIOS-Rechner wird bis zu einer Volumengröße von 2TBit fdisk eingesetzt.)<br><br>
------
<b> A) ROOT</b><br>
(Die Einrichtung einer [[Swap#Swapdatei | Swap-Datei]]) ist nachtraeglich moeglich)<br><br>


arch uefi installation:
<code style=font-size:12px>fdisk -l</code> - '''x''' ermitteln<br>
Es wird eine Bootpartition und eine Rootpartition angelegt.
<code style=font-size:12px>fdisk /dev/'''x'''</code> - fdisk starten<br>
Abkürzungen:
<code style=font-size:12px>{{taste|o}}</code> - neue Partitionstabelle im cache<br>
EFIBOOT Dateisystem-Label für Boot und EFI Partition.
<code style=font-size:12px>{{taste|n}}</code> - neue Partition erstellen<br>
p_arch Dateisystemlabel Rootpartition für Arch-Linux
<code style=font-size:12px>{{taste|Enter}}</code> - Primaerpatition bestaetigen<br>
p_arch_crypt Partitionslabel nach Entschlüsselung /dev/mapper/..
<code style=font-size:12px>{{taste|Enter}}</code> - Partitionsnummer bestaetigen<br>
pl_arch_crypt Partitionslabel für verschlüsselte Root Partition. Nicht zu verwechseln mit Dateisystem Label.
<code style=font-size:12px>{{taste|Enter}}</code> - Ersten Sektor bestaetigen<br>
p_swap Label für Swappartition falls nötig.
<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>


booten mit dem Isoimage
<u>Formatieren:</u><br>
loadkezs de
<code style=font-size:12px>mkfs.ext4 -L ROOT /dev/'''x'''1</code><br><br>
loadkezs de-latin1
Bootmethode verifizieren:
# ls /sys/firmware/efi/efivars


Auf aktuelle Zeit setzen:
<u>Mounten:</u><br>
# timedatectl set-ntp true
<code style=font-size:12px>mount /dev/'''x'''1 /mnt</code><br><br>
Status prüfen: timedatectl timesync-status
hwclock -w


lsblk -f
<u>Installation der Basispakete</u><br>
gdisk /dev/sda
<code style=font-size:12px>pacstrap /mnt base base-devel linux linux-firmware dhcpcd nano</code><br><br>
Neue Partitionstabelle erzeugen mit
o
neue Partition für efi und boot (EFIBOOT) 256M Fat32 Spezifikation >512MiB ??).
n
Typ ef00
neue Partition für root
n
Typ 8309. PARTLABEL pl_arch_crypt hinzufügen (Taste c in gdisk).


neue Partition für swap
<u>Installation von Microcode:</u><br>
n
<code style=font-size:12px>pacstrap /mnt intel-ucode</code> oder <code style=font-size:12px>pacstrap /mnt amd-ucode</code><br><br>
Typ 8200
w


modprobe dm-crypt
<u>fstab erzeugen:</u><br>
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda2 ACHTUNG Passwortvergabe Tastaturbelegung de beachten!!
<code style=font-size:12px>genfstab -L /mnt > /mnt/etc/fstab</code><br><br>
cryptsetup luksOpen /dev/sda2 p_arch_crypt


Formatieren:
<u>Chrooten:</u><br>
mkfs.fat -F32 -n EFIBOOT /dev/sda1
<code style=font-size:12px>arch-chroot /mnt</code><br><br>
mkfs.ext4 -L p_arch /dev/mapper/p_arch_crypt


Mounten:
Rootpartition zuerst!!!
mount -L p_arch /mnt
mkdir -p /mnt/boot
mount -L EFIBOOT /mnt/boot
swapon -L p_swap


Falls wlan, wifi-menu
Weiter siehe Kapitel [[3._Konfigurationtion|3. Konfiguration]]<br><br>
----------
<b>B) ROOT + SWAP</b>


Grundinstallation:
<code style=font-size:12px>fdisk -l</code> - '''x''' ermitteln<br>
Ab hier wie im Wiki beschrieben
<code style=font-size:12px>fdisk /dev/'''x'''</code> - fdisk starten<br>
oder Stichwortartig hier weiter
<code style=font-size:12px>{{taste|o}}</code> - neue Partitionstabelle im cache<br>
nano /etc/pacman.d/mirrorlist
<code style=font-size:12px>{{taste|n}}</code> - neue Partition erstellen<br>
pacstrap /mnt base linux linux-firmware intel-ucode nano man-pages man-pages-de man-db mlocate netctl dhcpcd usbutils e2fsprogs less lshw mc gptfdisk efibootmgr dmidecode pacman-contrib
<code style=font-size:12px>{{taste|Enter}}</code> - Primaerpatition bestaetigen<br>
genfstab -pL /mnt >> /mnt/etc/fstab
<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>-4G</code> - Letzten Sektor -4GiB<br>
<code style=font-size:12px>{{taste|a}}</code> - Bootsektor aktivieren<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|t}}</code> – Partitionstyp waehlen<br>
<code style=font-size:12px>{{taste|Enter}}</code> - Partitionsnummer 2 bestaetigen<br>
<code style=font-size:12px>82</code> – Partitionstyp auf 'Linux swap' setzen<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>


arch-chroot /mnt
<u>Formatieren:</u><br>
echo rechnername > /etc/hostname
<code style=font-size:12px>mkfs.ext4 -L ROOT /dev/'''x'''1</code><br>
nano /etc/hosts
<code style=font-size:12px>mkswap -L SWAP /dev/'''x'''2</code><br><br>
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost


echo LANG=de_DE.UTF-8 > /etc/locale.conf
<u>Mounten:</u><br>
echo KEYMAP=de-latin1 > /etc/vconsole.conf
<code style=font-size:12px>mount /dev/'''x'''1 /mnt</code><br>
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
<code style=font-size:12px>swapon /dev/'''x'''2</code><br><br>


nano /etc/locale.gen
<u>Installation der Basispakete</u><br>
de_DE.UTF-8 UTF-8
<code style=font-size:12px>pacstrap /mnt base base-devel linux linux-firmware dhcpcd nano</code><br><br>
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
en_US.UTF-8
locale-gen


passwd
<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>


nano /etc/mkinitcpio.conf in Hooks einfügen und keyboard keymap vor block encrypt vor filesystem
<u>fstab erzeugen:</u><br>
Komplette Zeile: HOOKS="base udev autodetect modconf keyboard keymap block encrypt filesystems fsck"
<code style=font-size:12px>genfstab -L /mnt > /mnt/etc/fstab</code><br><br>
mkinitcpio -p linux


systemd Loader installieren
<u>Chrooten:</u><br>
bootctl install
<code style=font-size:12px>arch-chroot /mnt</code><br><br>
 
Datei anlegen:
nano /boot/loader/loader.conf Hinweis: diese Datei wird nur benutzt zum Laden des default Linux.
 
timeout3
default uefi_arch.conf
 
Datei anlegen:
nano /boot/loader/entries/uefi_arch.conf
 
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=/dev/sda2:p_arch_crypt root=LABEL=p_arch
oder mit Label options cryptdevice=PARTLABEL=pl_arch_crypt:p_arch_crypt root=LABEL=p_arch
 
Für fallback anlegen:
/boot/loader/entries/uefi_arch_fallback.conf


title Arch Linux fallback
Weiter siehe Kapitel [[3._Konfiguration|3. Konfiguration]]<br><br>
linux /vmlinuz-linux
----------
initrd /initramfs-linux-fallback.img
<b>B) Crypted Root</b>
options cryptdevice=/dev/sda2:p_arch_crypt root=LABEL=p_arch
oder mit Label options cryptdevice=PARTLABEL=pl_arch_crypt:p_arch_crypt root=LABEL=p_arch


Zusätzliche Werkzeuge installieren:
<code style=font-size:12px>fdisk -l</code> - '''x''' ermitteln<br>
pacman -S gptfdisk efibootmgr lshw mc
<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>


efi booteinträge kontollieren:
<u>Kernelmodul laden:</u><br>
efibootmgr -v
<code style=font-size:12px>modprobe dm-crypt</code><br><br>


<u>Root Partiton verschluesseln:</u><br>
<code style=font-size:12px>cryptsetup luksFormat /dev/'''x'''1</code><br><br>


exit
<u>Verschlüsselte Partiton oeffnen und mappen:</u><br>
umount -R /mnt
<code style=font-size:12px>cryptsetup open /dev/'''x'''1 ROOT</code><br>
poweroff
<u>Und formatieren:</u><br>
usb stick bzw CD entfernen.
<code style=font-size:12px>mkfs.ext4 /dev/mapper/ROOT</code><br><br>
Neu starten
login: root
Passwort: Geheim
 
 
 
<br><br><br>
 
<b>Arch Linux Installation auf einem UEFI-Rechner mit systemd-boot als Bootloader</b><br>
Partitionierung: boot, root.<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>Wichtig:</u><br>
Im UEFI-Menu des Rechners muss "Secure Boot" auf "[Disabled]" gesetzt werden.<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>Arch Installations Spickzettel aufrufen</u><br>
<code style=font-size:12px;>lynx wiki.archlinux.de/title/spicker</code><br><br>
 
<u>Partitionieren:</u><br>
<code style=font-size:12px;>fdisk -l</code> - '''x''' ermitteln<br>
<code style=font-size:12px;>gdisk /dev/'''x'''</code> - gdisk starten<br>
<code style=font-size:12px;>{{taste|o}}</code> - neue Partitionstabelle im chache<br>
<code style=font-size:12px;>{{taste|y}}</code> - bestaetigen<br>
<code style=font-size:12px;>{{taste|n}}</code> - neue Partition<br>
<code style=font-size:12px;>{{taste|Enter}}</code> - die Partitionsnummer bestaetigen<br>
<code style=font-size:12px;>{{taste|Enter}}</code> - den ersten Sektor bestaetigen<br>
<code style=font-size:12px;>+512M</code> - die Partitionsgroeße festlegen<br>
<code style=font-size:12px;>ef00</code> - den Partitionstyp fuer EFI setzen<br>
<code style=font-size:12px;>{{taste|n}}</code> - eine weitere Partition anlegen<br>
<code style=font-size:12px;>{{taste|Enter}}</code> - die 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|Enter}}</code> - den Linux Partitionstyp (8300) bestaetigen<br>
<code style=font-size:12px;>{{taste|p}}</code> - zeige neue Partitionstabelle zur ueberpruefung an<br>
<code style=font-size:12px;>{{taste|w}}</code> - speichern der neuen Partitionstabelle<br>
<code style=font-size:12px;>{{taste|y}}</code> - bestaetigen<br><br>
 
<u>Formatieren:</u><br>
<code style=font-size:12px;>mkfs.fat -F 32 -n AESP /dev/'''x'''1</code><br>
<code style=font-size:12px;>mkfs.ext4 -L AROOT /dev/'''x'''2</code><br><br>


<u>Mounten:</u><br>
<u>Mounten:</u><br>
<code style=font-size:12px;>mount /dev/'''x'''2 /mnt</code><br>
<code style=font-size:12px>mount /dev/mapper/ROOT /mnt</code><br><br>
 
<code style=font-size:12px;>mkdir /mnt/boot</code><br>
<code style=font-size:12px;>mount /dev/'''x'''1 /mnt/boot</code><br><br>


<u>Installation der Basispakete:</u><br>
<u>Installation der Basispakete:</u><br>
<code style=font-size:12px;>pacstrap /mnt base base-devel linux linux-firmware dhcpcd nano</code><br><br>
<code style=font-size:12px>pacstrap /mnt base base-devel linux linux-firmware dhcpcd nano cryptsetup</code><br><br>


<u>Installation von Microcode:</u><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>
<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>
<u>fstab erzeugen:</u><br>
<code style=font-size:12px;>genfstab -U /mnt > /mnt/etc/fstab</code><br><br>
<code style=font-size:12px>genfstab -L /mnt > /mnt/etc/fstab</code><br><br>


<u>Chrooten:</u><br>
<u>Chrooten:</u><br>
<code style=font-size:12px;>arch-chroot /mnt</code><br><br>
<code style=font-size:12px>arch-chroot /mnt</code><br><br>


<u>Systemd-boot installieren:</u><br>
<u>Erzeugen einer Schlüsseldatei zur Vermeidung einer zweiten Eingabe des Verschlüsselungspassworts:</u><br>
<code style=font-size:12px;>bootctl install</code><br><br>
<code style=font-size:12px>dd bs=512 count=4 if=/dev/urandom of=/keyfile.bin</code><br>
<code style=font-size:12px>cryptsetup luksAddKey /dev/disk/by-label/ROOT /keyfile.bin</code><br>
<code style=font-size:12px>chmod 000 /keyfile.bin</code><br><br>


<code style=font-size:12px;>nano /boot/loader/entries/arch-uefi.conf</code><br>
<code style=font-size:12px>nano /etc/mkinitcpio.conf</code><br>
<u>Und wie folgt anpassen:</u><br>
<u>'/keyfile.bin' zu Files hinzufuegen:</u><br>
<code style=font-size:12px;>title Arch Linux</code><br>
<code style=font-size:12px>FILES=(/keyfile.bin)</code><br>
<code style=font-size:12px;>linux /vmlinuz-linux</code><br>
<u>Die Zeile 'HOOKS' in dieser Reihenfolge anpassen:</u><br>
<code style=font-size:12px;>initrd /initramfs-linux.img</code><br>
<code style=font-size:12px>HOOKS="base udev autodetect keyboard keymap modconf block encrypt filesystems fsck"</code><br>
<code style=font-size:12px;>options root=LABEL=AROOT rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8</code><br><br>
<u>Und neues initramfs erzeugen</u><br>
<code style=font-size:12px>mkinitcpio -p linux</code><br><br>


<code style=font-size:12px;>nano /boot/loader/entries/arch-uefi-fallback.conf</code><br>
Weiter siehe Kapitel [[3._Konfiguration|3. Konfiguration]]<br><br>
<u>Und wie folgt anpassen:</u><br>
----------
<code style=font-size:12px;>title Arch Linux Fallback</code><br>
<b>Entwurf Artikel: 3. Konfiguration</b>
<code style=font-size:12px;>linux /vmlinuz-linux</code><br>
<code style=font-size:12px;>initrd /initramfs-linux-fallback.img</code><br>
<code style=font-size:12px;>options root=LABEL=AROOT rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8</code><br><br>


<code style=font-size:12px;>nano /boot/loader/loader.conf</code><br>
Letztes siehe Kapitel 2.[[spicker | Arch Linux Installations Spickzettel]]<br>
<u>Und entsprechend anpassen:</u><br>
<code style=font-size:12px;>default arch-uefi.conf</code><br>
<code style=font-size:12px;>timeout 4</code><br><br>


<code style=font-size:12px;>bootctl update</code><br><br>
<b>3. Konfiguration:</b><br>


<u>Das Root Password erstellen:</u><br>
<code style=font-size:12px>echo '''mein-rechner''' > /etc/hostname</code><br>
<code style=font-size:12px;>passwd</code><br><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>


<u>Konfiguration:</u><br>
<code style=font-size:12px>nano /etc/locale.gen</code><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>
<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.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 ISO-8859-1</code><br>
<code style=font-size:12px;>#de_DE@euro ISO-8859-15</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>#en_US.UTF-8 UTF-8</code><br>


<code style=font-size:12px;>locale-gen</code><br><br>
<code style=font-size:12px>locale-gen</code><br><br>
 
<u>Das Root Password erstellen:</u><br>
<code style=font-size:12px>passwd</code><br><br>


<u>Den Benutzer 'duda' anlegen und ihn ggf. zu den Gruppen hinzufuegen:</u><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>useradd -m -g users -s /bin/bash '''duda'''</code><br>
<code style=font-size:12px;>passwd '''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>
<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>
<u>Gruppenmitgliedern von wheel Rootrechte per 'sudo' verleihen:</u><br>
<code style=font-size:12px;>EDITOR=nano visudo</code><br>
<code style=font-size:12px>EDITOR=nano visudo</code><br>
<u>Kommentarzeichen und Leerzeichen von dieser Zeile entfernen:</u><br>
<u>Kommentarzeichen und Leerzeichen von dieser Zeile entfernen:</u><br>
<code style=font-size:12px;># %wheel ALL=(ALL) ALL</code><br><br>
<code style=font-size:12px># %wheel ALL=(ALL) ALL</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> - Energieverwaltung<br>
<code style=font-size:12px>systemctl enable avahi-daemon</code> - Netzwerk Zuweisung<br>
<code style=font-size:12px>systemctl enable NetworkManager</code> - Netzwerkmanager<br>
<code style=font-size:12px>systemctl enable iwd</code> - WLAN Daemon</u><br>
<code style=font-size:12px>systemctl enable systemd-timesyncd</code> - Zeit Synchronisation<br><br>


<u>Installation und Konfiguration von X:</u><br>
----------
<code style=font-size:12px;>pacman -S xorg-server xorg-xinit</code><br>
<b>Entwurf Artikel: 4. Bootloader für BIOS-Rechner</b>
<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>
Letztes Kapitel [[3._Konfiguration|3. Konfiguration]]<br><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>
<b>4. Bootloader für BIOS-Rechner</b><br>
<code style=font-size:12px;>pacman -S kwin plasma-desktop plasma-nm konsole sddm</code><br>
* A) Grub
* B) syslinux
* C) Grub (crypted)<br><br>
---------------
<b>A) Grub</b>


<u>GNOME (minimal):</u><br>
<u>Grub installieren:</u><br>
<code style=font-size:12px;>pacman -S mutter network-manager-applet gnome-terminal gdm</code><br>
<code style=font-size:12px>pacman -S grub</code><br>
<code style=font-size:12px>grub-install /dev/'''x'''</code><br>
<code style=font-size:12px>grub-mkconfig -o /boot/grub/grub.cfg</code><br><br>


<u>Xfce4 (minimal):</u><br>
<u>Chrootumgebung verlassen und Partitionen loesen:</u><br>
<code style=font-size:12px;>pacman -S xfwm4 xfce4-session network-manager-applet xfce4-terminal lightdm</code><br><br>
<code style=font-size:12px>exit</code><br>
<code style=font-size:12px>umount /mnt</code><br><br>


<u>Nuetzliche Dienste installieren:</u><br>
<code style=font-size:12px>poweroff</code><br>
<code style=font-size:12px;>pacman -S acpid avahi iwd</code><br><br>
<u>ISO-Stick entfernen, Neustarten und auf der Konsole Einloggen  </u><br><br>


<u>Dienste aktivieren:</u><br>
Weiter siehe Kapitel [[4._Grafische_Benutzeroberfl%C3%A4che|4. Grafische Benutzeroberfläche ]]
<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>
<b>C) Grub (crypted r)</b><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>
<u>grub installieren:</u><br>
<code style=font-size:12px;>systemctl enable sddm</code> - <u>fuer das Plasma Desktop</u><br>
<code style=font-size:12px>pacman -S grub</code><br><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>
<u>grub konfigurieren:</u><br>
<code style=font-size:12px;>exit</code><br>
<code style=font-size:12px>nano /etc/default/grub</code><br>
<u>Und diese Zeile wie folgt anpassen:</u><br>
<code style=font-size:12px>GRUB_CMDLINE_LINUX="cryptdevice=/dev/'''x'''1:ROOT"</code><br>
<u>Und diese Zeile auskommentieren:</u><br>
<code style=font-size:12px>GRUB_ENABLE_CRYPTODISK=y</code><br>


<code style=font-size:12px;>umount /mnt/boot</code><br>
<u>Initramfs suchen:</u><br>
<code style=font-size:12px;>umount /mnt</code><br><br>
<code style=font-size:12px>grub-install /dev/'''x''' --recheck</code><br>
<u>grub.cfg schreiben:</u><br>
<code style=font-size:12px>grub-mkconfig -o /boot/grub/grub.cfg</code><br><br>


<code style=font-size:12px;>poweroff</code><br>
Weiter siehe Kapitel [[4._Grafische_Benutzeroberfl%C3%A4che|4. Grafische Benutzeroberfläche ]]
<u>ISO-Stick entfernen, Neustarten und Einloggen im Desktopmanager</u>


[[en:Beginners' Guide]]
----------
[[Kategorie:Installation]]
Anmerkung: Bisher in die Artikel eingearbeitet BIOS-Rechner Grub / r+rs / crypted r
[[Kategorie:Arch_Linux_Installations_Spickzettel]]

Version vom 18. April 2024, 22:27 Uhr

„Tuxnix“ wurde von Tuxnix (Diskussion) als in Bearbeitung markiert. Um Bearbeitungskonflikte zu vermeiden, kontaktiere Tuxnix (Diskussion) bitte, bevor du den Artikel bearbeitest.


(Versuch einer neuen Gliederung der Artikelserie)

Entwurf Artikel: 2. Partitionierung+Basispakete BIOS-Rechner

Arch Linux Installations Spickzettel
Letztes Kapitel 1. Vorbereitung

2. Partitionierung+Basispakete bei einem BIOS-Rechner

  • A) ROOT
  • B) ROOT + SWAP
  • c) Crypted ROOT

(Für das Partitionieren auf einem BIOS-Rechner wird bis zu einer Volumengröße von 2TBit fdisk eingesetzt.)


A) ROOT
(Die Einrichtung einer Swap-Datei) ist nachtraeglich moeglich)

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

Formatieren:
mkfs.ext4 -L ROOT /dev/x1

Mounten:
mount /dev/x1 /mnt

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

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

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

Chrooten:
arch-chroot /mnt


Weiter siehe Kapitel 3. Konfiguration


B) ROOT + SWAP

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
-4G - Letzten Sektor -4GiB
a - Bootsektor aktivieren
n - neue Partition erstellen
↵ Enter - Primaerpatition bestaetigen
↵ Enter - Partitionsnummer bestaetigen
↵ Enter - Ersten Sektor bestaetigen
↵ Enter - Letzten Sektor bestaetigen
t – Partitionstyp waehlen
↵ Enter - Partitionsnummer 2 bestaetigen
82 – Partitionstyp auf 'Linux swap' setzen
p - zur eigenen Kontrolle vor dem Speichern
w - schreiben der Partitionstabelle

Formatieren:
mkfs.ext4 -L ROOT /dev/x1
mkswap -L SWAP /dev/x2

Mounten:
mount /dev/x1 /mnt
swapon /dev/x2

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

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

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

Chrooten:
arch-chroot /mnt

Weiter siehe Kapitel 3. Konfiguration


B) Crypted Root

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

Root Partiton verschluesseln:
cryptsetup luksFormat /dev/x1

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

Mounten:
mount /dev/mapper/ROOT /mnt

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

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

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

Chrooten:
arch-chroot /mnt

Erzeugen einer Schlüsseldatei zur Vermeidung einer zweiten Eingabe des Verschlüsselungspassworts:
dd bs=512 count=4 if=/dev/urandom of=/keyfile.bin
cryptsetup luksAddKey /dev/disk/by-label/ROOT /keyfile.bin
chmod 000 /keyfile.bin

nano /etc/mkinitcpio.conf
'/keyfile.bin' zu Files hinzufuegen:
FILES=(/keyfile.bin)
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

Weiter siehe Kapitel 3. Konfiguration


Entwurf Artikel: 3. Konfiguration

Letztes siehe Kapitel 2. Arch Linux Installations Spickzettel

3. 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

Das Root Password erstellen:
passwd

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

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


Entwurf Artikel: 4. Bootloader für BIOS-Rechner

Letztes Kapitel 3. Konfiguration

4. Bootloader für BIOS-Rechner

  • A) Grub
  • B) syslinux
  • C) Grub (crypted)


A) Grub

Grub installieren:
pacman -S grub
grub-install /dev/x
grub-mkconfig -o /boot/grub/grub.cfg

Chrootumgebung verlassen und Partitionen loesen:
exit
umount /mnt

poweroff
ISO-Stick entfernen, Neustarten und auf der Konsole Einloggen

Weiter siehe Kapitel 4. Grafische Benutzeroberfläche


C) Grub (crypted r)

grub installieren:
pacman -S grub

grub konfigurieren:
nano /etc/default/grub
Und diese Zeile wie folgt anpassen:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/x1:ROOT"
Und diese Zeile auskommentieren:
GRUB_ENABLE_CRYPTODISK=y

Initramfs suchen:
grub-install /dev/x --recheck
grub.cfg schreiben:
grub-mkconfig -o /boot/grub/grub.cfg

Weiter siehe Kapitel 4. Grafische Benutzeroberfläche


Anmerkung: Bisher in die Artikel eingearbeitet BIOS-Rechner Grub / r+rs / crypted r