Benutzer:Tuxnix: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
(Entwurf)
(Entwurf)
Zeile 2: Zeile 2:




=Arch Intallation - in Konsolen Befehlen=
{|border="0" style="font-size:14px; line-height: 16px, wide: 100%"
Diese Anleitung ist als Spikzettel zur [[Anleitung für Einsteiger]] gedacht und listet die Konsolen Befehle die nötig sind um auf einen UEFI-Rechner ein einfaches Basis Arch Linux zu installieren.
|'''Spickzettel zum Ausdrucken'''
|-
|Für einen UEFI-Rechner - 2 Partitionen (unverschlüsselt): /boot / - Lan - Systemd-boot.
|}


&nbsp;<u>ISO-Abbild prüfen:</u><br>
<code style=font-size:14px;>md5sum archlinux-'''*'''-x86_64.iso</code><br><br>


* Für UEFI-Rechner - (unverschlüsselt)
&nbsp;<u>ISO-Abbild auf USB-Stick übertragen:</u><br>
* 2 Partitionen: /boot und /
<code style=font-size:14px;>fdisk -l</code><br>
* Systemd-boot als Bootloader
<code style=font-size:14px;>dd bs=4M if=/pfad/archlinux-'''*'''-x86_64.iso of=/dev/sd'''x''' status=progress oflag=sync</code><br><br>


&nbsp;<u>Installation unterbrechen:</u><br>
<code style=font-size:14px;>reboot</code><br>
<code style=font-size:14px;>poweroff</code><br><br>


<div style="line-height: 0.2em;">&nbsp;ISO-Abbild prüfen:</div>
&nbsp;<u>Deutsche Tastaturbelegung - Die Taste '''{{Taste|Z}}''' drücken, um das '''y''' Zeichen zu erhalten:</u><br>
<code>md5sum archlinux-'''*'''-x86_64.iso</code><br><br>
<code style=font-size:14px;>loadkeys de</code><br><br>


<div style="line-height: 0.2em;">&nbsp;ISO-Abbild auf USB-Stick übertragen:</div>
{|border="0" style="font-size:14px; line-height: 16px"
<code>fdisk -l</code><br>
|&nbsp;<u>Partitionieren:</u>
<code>dd bs=4M if=/pfad/archlinux-'''*'''-x86_64.iso of=/dev/sd'''x''' status=progress oflag=sync</code><br><br>
|-
|* {{ic|fdisk -l}}
|-
|* {{ic|gdisk /dev/'''x'''}}
|-
|* {{taste|o}} - neue Partitionstabelle im chache
|-
|* {{taste|y}} - Bestätigung
|-
|* {{taste|n}} - neue Partition
|-
|* {{taste|Enter}} - die Partitionsnummer bestätigen
|-
|* {{taste|Enter}} - den ersten Sektor bestätigen
|-
|* {{ic|+512M}} - die Partitionsgröße festlegen
|-
|* {{ic|ef00}} - den Partitionstyp einer EFI-Partition setzen
|-
|* {{ic|n}} - eine weitere Partition erstellen
|-
|* {{taste|Enter}} - die Partitionsnummer bestätigen
|-
|* {{taste|Enter}} - ersten Sektor bestätigen
|-
|* {{taste|Enter}} - letzten Sektor bestätigen
|-
|* {{taste|Enter}} - Linux Partitionstyp (8300) bestätigen
|-
|* {{taste|p}} - zeige neue Partitionstabelle zur Überprüfung an
|-
|* {{taste|w}} - speichern der neuen Partitionstabelle
|-
|* {{taste|y}} - Bestätigung
|}<br>


<div style="line-height: 0.2em;">&nbsp;Installation unterbrechen:</div>
&nbsp;<u>Formatieren:</u><br>
<code>reboot</code><br>
<code style=font-size:14px;>mkfs.fat -F 32 -n EFIBOOT /dev/sd'''x'''1</code><br>
<code>poweroff</code><br>
<code style=font-size:14px;>mkfs.ext4 -L p_arch /dev/sd'''x'''2</code><br><br>


&nbsp;<u>Mounten:</u><br>
<code style=font-size:14px;>mount -L p_arch /mnt</code><br>


<div style="line-height: 0.2em;">&nbsp;Deutsche Tastaturbelegung - Die Taste '''{{Taste|Z}}''' drücken, um das '''y''' Zeichen zu erhalten:</div>
<code style=font-size:14px;>mkdir /mnt/boot</code><br>
<code>loadkeys de</code><br>
<code style=font-size:14px;>mount -L EFIBOOT /mnt/boot</code><br><br>


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


&nbsp;Partitionieren:
&nbsp;<u>Installation von Micocode:</u><br>
* {{ic|fdisk -l}} - Mounts der angeschlossenen Datenträger ermitteln.
<code style=font-size:14px;>pacstrap /mnt intel-ucode</code>oder<code style=font-size:14px;>pacstrap /mnt amd-ucode</code><br><br>
* {{ic|gdisk /dev/'''x'''}} –  Starten von gdisk
* {{taste|o}} – Erzeugen einer neuen GPT im cache. (Protektiver MBR zur Kompatibilität)
* {{taste|y}} – Bestätigung
* {{taste|n}} – Erstellen einer neuen Partition
* {{taste|Enter}} – Partitionsnummer bestätigen
* {{taste|Enter}} – Den ersten Sektor bestätigen
* {{ic|+512M}} – Die Partitionsgröße festlegen
* {{ic|ef00}} – Den Partitionstyp einer EFI-Partition setzen
* {{ic|n}} – Eine weitere Partition erstellen
* {{taste|Enter}} – Partitionsnummer bestätigen
* {{taste|Enter}} – Ersten Sektor bestätigen
* {{taste|Enter}} – Letzten Sektor bestätigen
* {{taste|Enter}} – Linux Partitionstyp (8300) bestätigen
* {{taste|p}} - Zeige neue Partitionstabelle zur Überprüfung an. 
* {{taste|w}} - Speicher der neue Partitionstabelle.
* {{taste|y}} – Bestätigung


&nbsp;<u>fstab erzeugen:</u><br>
<code style=font-size:14px;>genfstab -Lp /mnt > /mnt/etc/fstab</code><br><br>


<div style="line-height: 0.2em;">&nbsp;Formatieren:</div>
&nbsp;<u>Chrooten:</u><br>
<code>mkfs.fat -F 32 -n EFIBOOT /dev/sd'''x'''1</code><br>
<code style=font-size:14px;>arch-chroot /mnt/</code><br><br>
<code>mkfs.ext4 -L p_arch /dev/sd'''x'''2</code><br>


&nbsp;<u>Konfiguration:</u><br>
<code style=font-size:14px;>echo '''myhost''' > /etc/hostname</code><br>
<code style=font-size:14px;>echo LANG=de_DE.UTF-8 > /etc/locale.conf</code><br>
<code style=font-size:14px;>echo KEYMAP=de-latin1 > /etc/vconsole.conf</code><br>
<code style=font-size:14px;>echo FONT=lat9w-16 >> /etc/vconsole.conf</code><br>
<code style=font-size:14px;>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</code><br><br>


<div style="line-height: 0.2em;">&nbsp;Mounten:</div>
<code style=font-size:14px;>nano /etc/locale.gen</code><br>
<code>mount -L p_arch /mnt</code><br>
&nbsp;<u>Und das # am Anfang folgender Zeilen entfernen:</u><br>
<code style=font-size:14px;>#de_DE.UTF-8 UTF-8</code><br>
<code style=font-size:14px;>#de_DE ISO-8859-1</code><br>
<code style=font-size:14px;>#de_DE@euro ISO-8859-15</code><br>
<code style=font-size:14px;>#en_US.UTF-8</code><br>


<code>mkdir /mnt/boot<br></code><br>
<code style=font-size:14px;>locale-gen</code><br><br>
<code>mount -L EFIBOOT /mnt/boot</code><br>


&nbsp;<u>Ein Root Password erstellen:</u><br>
<code style=font-size:14px;>passwd</code><br><br>


<div style="line-height: 0.2em;">&nbsp;Installation der Basispakete:</div>
&nbsp;<u>Systemd-boot installieren:</u><br>
<code>pacstrap /mnt base base-devel linux linux-firmware dhcpcd nano</code><br>
<code style=font-size:14px;>bootctl install</code><br><br>


<code style=font-size:14px;>nano /boot/loader/entries/arch-uefi.conf</code><br>
&nbsp;<u>Und wie folgt anpassen:</u><br>
<code style=font-size:14px;>title    Arch Linux</code><br>
<code style=font-size:14px;>linux    /vmlinuz-linux</code><br>
<code style=font-size:14px;>initrd  /initramfs-linux.img</code><br>
<code style=font-size:14px;>options  root=LABEL=p_arch rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8</code><br><br>


<div style="line-height: 0.2em;">&nbsp;Installation von Micocode:</div>
<code style=font-size:14px;>nano /boot/loader/entries/arch-uefi-fallback.conf</code><br>
<code>pacstrap /mnt intel-ucode</code>oder<code>pacstrap /mnt amd-ucode</code><br>
&nbsp;<u>Und wie folgt angepassen:</u><br>
<code style=font-size:14px;>title    Arch Linux Fallback</code><br>
<code style=font-size:14px;>linux    /vmlinuz-linux</code><br>
<code style=font-size:14px;>initrd  /initramfs-linux-fallback.img</code><br>
<code style=font-size:14px;>options  root=LABEL=p_arch rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8</code><br>


<code style=font-size:14px;>nano /boot/loader/loader.conf</code><br>
&nbsp;<u>Und entsprechend angepassen:</u><br>
<code style=font-size:14px;>default arch-uefi.conf</code><br>
<code style=font-size:14px;>timeout 4</code><br><br>


<div style="line-height: 0.2em;">&nbsp;fstab erzeugen:</div>
<code style=font-size:14px;>bootctl update</code><br><br>
<code>genfstab -Lp /mnt > /mnt/etc/fstab</code><br>


&nbsp;<u>Chroot verlassen und Partitionen lösen:</u><br>
<code style=font-size:14px;>exit</code><br>


<div style="line-height: 0.2em;">&nbsp;Chrooten:</div>
<code style=font-size:14px;>umount /mnt/boot</code><br>
<code>arch-chroot /mnt/</code><br>
<code style=font-size:14px;>umount /mnt</code><br><br>


&nbsp;<u>Arch Linux neu booten und anmelden:</u><br>
<code style=font-size:14px;>reboot</code><br>


<div style="line-height: 0.2em;">&nbsp;Konfiguration:</div>
<code style=font-size:14px;>'''myhost''' login: root</code><br><br>
<code>echo '''myhost''' > /etc/hostname</code><br>
<code>echo LANG=de_DE.UTF-8 > /etc/locale.conf</code><br>
<code>echo KEYMAP=de-latin1 > /etc/vconsole.conf</code><br>
<code>echo FONT=lat9w-16 >> /etc/vconsole.conf</code><br>
<code>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</code><br><br>


<code>nano /etc/locale.gen</code><br>
&nbsp;<u>Internetverbindung prüfen:</u><br>
<div style="line-height: 0.2em;">&nbsp;Und das # am Anfang folgender Zeilen entfernen:</div>
<code style=font-size:14px;>ping -c3 www.archlinux.de</code><br><br>
<code>#de_DE.UTF-8 UTF-8</code><br>
<code>#de_DE ISO-8859-1</code><br>
<code>#de_DE@euro ISO-8859-15</code><br>
<code>#en_US.UTF-8</code><br>


<code>locale-gen</code><br>
&nbsp;<u>Internetverbindung herstellen über Lan:</u><br>
<code style=font-size:14px;>ip link</code><br>
<code style=font-size:14px;>dhcpcd enp'''xxx'''</code><br><br>


&nbsp;<u>Arch Linux Aktualisieren:</u><br>
<code style=font-size:14px;>pacman -Syu</code><br><br>


<div style="line-height: 0.2em;">&nbsp;Ein Root Password erstellen:</div>
&nbsp;<u>Einen Benutzer hinzufügen und zu Gruppen zuordnen:</u><br>
<code>passwd</code><br>
<code style=font-size:14px;>useradd -m -g users -s /bin/bash '''duda'''</code><br>
<code style=font-size:14px;>passwd '''duda'''</code><br>
<code style=font-size:14px;>gpasswd -a '''duda''' wheel audio video games power</code><br><br>


&nbsp;<u>Für die Gruppenmitglieder von wheel sudo aktivieren:</u><br>
<code style=font-size:14px;>EDITOR=nano visudo</code><br>
&nbsp;<u>Entfernen des Kommentatorzeichens und des Leerzeichens.</div>
<code style=font-size:14px;>%wheel ALL=(ALL) ALL</code><br><br>


<div style="line-height: 0.2em;">&nbsp;Systemd-boot installieren:</div>
&nbsp;<u>Nützliche Dienste installieren und aktivieren:</u><br>
<code>bootctl install</code><br>
<code style=font-size:14px;>pacman -S acpid dbus avahi cups</code><br>
<code style=font-size:14px;>systemctl enable acpid</code><br>
<code style=font-size:14px;>systemctl enable avahi-daemon</code><br>
<code style=font-size:14px;>systemctl enable cups.service</code><br>
<code style=font-size:14px;>systemctl enable systemd-timesyncd.service</code><br>


&nbsp;<u>Wenn das System auf einer SSD betrieben wird:</u><br>
<code style=font-size:14px;>systemctl enable fstrim.timer</code><br><br>


<code>nano /boot/loader/entries/arch-uefi.conf</code><br>
&nbsp;<u>Installation und Konfiguration von X11:</u><br>
<div style="line-height: 0.2em;">&nbsp;Und wie folgt anpassen:</div>
<code style=font-size:14px;>pacman -S xorg-server xorg-xinit</code><br>
<code>title    Arch Linux</code><br>
<code style=font-size:14px;>localectl set-x11-keymap de pc105 deadgraveacute</code><br><br>
<code>linux    /vmlinuz-linux</code><br>
<code>initrd  /initramfs-linux.img</code><br>
<code>options  root=LABEL=p_arch rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8</code><br>


<code style=font-size:14px;>lspci &#124;grep VGA</code><br>
&nbsp;<u>Passend zur Grafikkarte einen freien Treiber installieren:</u><br>
<code style=font-size:14px;>pacman -S xf86-video-amdgpu</code><br>
<code style=font-size:14px;>pacman -S xf86-video-intel</code><br>
<code style=font-size:14px;>pacman -S xf86-xf86-video-nouveau</code><br><br>


<code>nano /boot/loader/entries/arch-uefi-fallback.conf</code><br>
&nbsp;<u>Desktopumgebung installieren:</u><br>
<div style="line-height: 0.2em;">&nbsp;Und wie folgt angepassen:</div>
Siehe [[:Kategorie:Desktopumgebung|Desktopumgebung]]<br>
<code>title    Arch Linux Fallback</code><br>
<code style=font-size:14px;>reboot</code><br>
<code>linux    /vmlinuz-linux</code><br>
<code>initrd  /initramfs-linux-fallback.img</code><br>
<code>options  root=LABEL=p_arch rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8</code>
 
 
<code>nano /boot/loader/loader.conf</code><br>
<div style="line-height: 0.2em;">&nbsp;Und entsprechend angepassen:</div>
<code>default arch-uefi.conf</code><br>
<code>timeout 4</code><br><br>
 
<code>bootctl update</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Chroot verlassen und Partitionen lösen:</div>
<code>exit</code><br>
 
<code>umount /mnt/boot</code><br>
<code>umount /mnt</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Arch Linux neu booten und anmelden:</div>
<code>reboot</code><br>
 
<code>'''myhost''' login: root</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Internetverbindung prüfen:</div>
<code>ping -c3 www.archlinux.de</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Internetverbindung herstellen über Lan:</div>
<code>ip link</code><br>
<code>dhcpcd enp'''xxx'''</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Arch Linux Aktualisieren:</div>
<code>pacman -Syu</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Einen Benutzer hinzufügen und zu Gruppen zuordnen:</div>
<code>useradd -m -g users -s /bin/bash '''duda'''</code><br>
<code>passwd '''duda'''</code><br>
<code>gpasswd -a '''duda''' wheel audio video games power</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Für die Gruppenmitglieder von wheel sudo aktivieren:</div>
<code>EDITOR=nano visudo</code><br>
<div style="line-height: 0.2em;">&nbsp;Entfernen des Kommentatorzeichens und des Leerzeichens.</div>
<code>%wheel ALL=(ALL) ALL</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Nützliche Dienste installieren und aktivieren:</div>
<code>pacman -S acpid dbus avahi cups</code><br>
 
 
<code>systemctl enable acpid</code><br>
<code>systemctl enable avahi-daemon</code><br>
<code>systemctl enable cups.service</code><br>
<code>systemctl enable systemd-timesyncd.service</code><br>
 
<div style="line-height: 0.2em;">&nbsp;Wenn das System auf einer SSD betrieben wird:</div>
<code>systemctl enable fstrim.timer</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Installation und Konfiguration von X11</div>
<code>pacman -S xorg-server xorg-xinit</code><br>
<code>localectl set-x11-keymap de pc105 deadgraveacute</code><br>
 
 
<code>lspci &#124;grep VGA</code><br>
<div style="line-height: 0.2em;">&nbsp;Passend zur Grafikkarte einen freien Treiber installieren:</div>
<code>pacman -S xf86-video-amdgpu</code><br>
<code>pacman -S xf86-video-intel</code><br>
<code>pacman -S xf86-xf86-video-nouveau</code><br>
 
 
<div style="line-height: 0.2em;">&nbsp;Desktopumgebung installieren:</div>
&nbsp;Siehe [[:Kategorie:Desktopumgebung|Desktopumgebung]]<br>
<code>reboot</code><br>


[[en:Beginners' Guide]]
[[en:Beginners' Guide]]
[[Kategorie:Installation]]
[[Kategorie:Installation]]

Version vom 18. Februar 2021, 15:19 Uhr

Arbeitsnotizen. Nur für eigene Zwecke:


Spickzettel zum Ausdrucken
Für einen UEFI-Rechner - 2 Partitionen (unverschlüsselt): /boot / - Lan - Systemd-boot.

 ISO-Abbild prüfen:
md5sum archlinux-*-x86_64.iso

 ISO-Abbild auf USB-Stick übertragen:
fdisk -l
dd bs=4M if=/pfad/archlinux-*-x86_64.iso of=/dev/sdx status=progress oflag=sync

 Installation unterbrechen:
reboot
poweroff

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

 Partitionieren:
* fdisk -l
* gdisk /dev/x
* o - neue Partitionstabelle im chache
* y - Bestätigung
* n - neue Partition
* ↵ Enter - die Partitionsnummer bestätigen
* ↵ Enter - den ersten Sektor bestätigen
* +512M - die Partitionsgröße festlegen
* ef00 - den Partitionstyp einer EFI-Partition setzen
* n - eine weitere Partition erstellen
* ↵ Enter - die Partitionsnummer bestätigen
* ↵ Enter - ersten Sektor bestätigen
* ↵ Enter - letzten Sektor bestätigen
* ↵ Enter - Linux Partitionstyp (8300) bestätigen
* p - zeige neue Partitionstabelle zur Überprüfung an
* w - speichern der neuen Partitionstabelle
* y - Bestätigung


 Formatieren:
mkfs.fat -F 32 -n EFIBOOT /dev/sdx1
mkfs.ext4 -L p_arch /dev/sdx2

 Mounten:
mount -L p_arch /mnt

mkdir /mnt/boot
mount -L EFIBOOT /mnt/boot

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

 Installation von Micocode:
pacstrap /mnt intel-ucodeoderpacstrap /mnt amd-ucode

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

 Chrooten:
arch-chroot /mnt/

 Konfiguration:
echo myhost > /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

locale-gen

 Ein Root Password erstellen:
passwd

 Systemd-boot installieren:
bootctl install

nano /boot/loader/entries/arch-uefi.conf
 Und wie folgt anpassen:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=LABEL=p_arch rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8

nano /boot/loader/entries/arch-uefi-fallback.conf
 Und wie folgt angepassen:
title Arch Linux Fallback
linux /vmlinuz-linux
initrd /initramfs-linux-fallback.img
options root=LABEL=p_arch rw lang=de init=/usr/lib/systemd/systemd locale=de_DE.UTF-8

nano /boot/loader/loader.conf
 Und entsprechend angepassen:
default arch-uefi.conf
timeout 4

bootctl update

 Chroot verlassen und Partitionen lösen:
exit

umount /mnt/boot
umount /mnt

 Arch Linux neu booten und anmelden:
reboot

myhost login: root

 Internetverbindung prüfen:
ping -c3 www.archlinux.de

 Internetverbindung herstellen über Lan:
ip link
dhcpcd enpxxx

 Arch Linux Aktualisieren:
pacman -Syu

 Einen Benutzer hinzufügen und zu Gruppen zuordnen:
useradd -m -g users -s /bin/bash duda
passwd duda
gpasswd -a duda wheel audio video games power

 Für die Gruppenmitglieder von wheel sudo aktivieren:
EDITOR=nano visudo

 Entfernen des Kommentatorzeichens und des Leerzeichens.

%wheel ALL=(ALL) ALL

 Nützliche Dienste installieren und aktivieren:
pacman -S acpid dbus avahi cups
systemctl enable acpid
systemctl enable avahi-daemon
systemctl enable cups.service
systemctl enable systemd-timesyncd.service

 Wenn das System auf einer SSD betrieben wird:
systemctl enable fstrim.timer

 Installation und Konfiguration von X11:
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

 Desktopumgebung installieren:
Siehe Desktopumgebung
reboot