This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Gentoo Linux mips Handbuch: Gentoo installieren

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:MIPS/Full/Installation and the translation is 100% complete.
MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Einleitung

Willkommen

Herzlich willkommen bei Gentoo. Sie sind dabei, in die Welt der Wahlmöglichkeiten und Performance einzusteigen. Bei Gentoo dreht sich vieles um Auswahlmöglichkeiten. Während der Installation von Gentoo wird Ihnen das mehrfach bewusst werden - Sie haben die Wahl, wie viele Pakete Sie selbst kompilieren, wie Sie Gentoo installieren, welchen Systemlogger Sie benutzen und vieles mehr.

Gentoo ist eine schnelle, moderne Metadistribution mit einem klaren und flexiblen Design. Gentoo ist auf einem Ökosystem freier Software gebaut und versteckt das, was unter der Haube steckt, nicht vor seinen Benutzern. Portage, das von Gentoo benutzte Paketmanagementsystem, ist in Python geschrieben, was bedeutet, dass Sie sich die Quelltexte einfach anschauen und nach Belieben verändern können. Gentoos Paketsystem benutzt den Quelltext (obwohl auch Unterstützung für vorkompilierte Pakete vorhanden ist) und die Konfiguration von Gentoo findet in normalen Textdateien statt. Mit anderen Worten: Offenheit überall.

Es ist sehr wichtig, das jeder versteht, dass Auswahlmöglichkeiten das sind, was Gentoo ausmacht. Wir zwingen Sie nicht, irgendetwas zu tun, was Sie nicht möchten. Sollte das doch mal vorkommen, sagen Sie uns Bescheid.

Wie ist die Installation strukturiert

Die Installation von Gentoo kann als eine Prozedur von 10 Schritten gesehen werden, was den Kapiteln 2 bis 11 entspricht. Jeder Schritt führt zu einem bestimmten Ergebnis:

Schritt Ergebnis
1 Der Anwender befindet sich in einer funktionierenden Umgebung aus der Gentoo installiert werden kann.
2 Die Internetverbindung ist für die Gentoo-Installation vorbereitet.
3 Die Festplatten sind für die Gentoo-Installation vorbereitet.
4 Die Installationsumgebung ist vorbereitet und der Anwender ist bereit zum "Chroot" in die neue Umgebung.
5 Die Kernpakete, die in allen Gentoo-Installationen gleich sind, sind installiert.
6 Der Linux-Kernel ist installiert.
7 Der Anwender hat die meisten Gentoo-Systemkonfigurationsdateien konfiguriert.
8 Die notwendigen System-Tools sind installiert.
9 Der gewählte Bootloader ist installiert und konfiguriert.
10 Die neu installierte Gentoo Linux Umgebung ist bereit entdeckt zu werden.

Wenn Ihnen verschiedene Auswahlmöglichkeiten vorgestellt werden, geben wir unser Bestes, Ihnen die jeweiligen Vor- und Nachteile vorzustellen. Im weiteren Text wird zunächst eine Standardauswahl beschrieben (die im Titel durch "Standard:" gekennzeichnet ist), und anschließend die anderen Wahlmöglichkeiten (markiert durch "Alternativ:"). Die Standardauswahl ist nicht unbedingt das, was wir empfehlen. Es ist der Weg, von dem wir denken, dass ihn die meisten Gentoo-Benutzer nehmen werden.

Manchmal können Sie optionalen Schritten folgen. Solche Schritte sind als "Optional:" gekennzeichnet und nicht unbedingt notwendig, um Gentoo zu installieren. Dennoch können optionale Schritte von vorherigen Entscheidungen abhängen. Wir informieren Sie, wenn das passiert. Sowohl wenn Sie die Entscheidung treffen, als auch wenn der optionale Schritt beschrieben wird.

Installationsoptionen von Gentoo

Gentoo kann auf vielen verschiedenen Wegen installiert werden. Sie können ein offizielles Gentoo Installationsmedium wie die Images für unsere CDs und DVDs herunterladen. Dieses Image kann auf einen USB-Stick kopiert oder aus dem Netzwerk gebootet werden. Alternativ können Sie Gentoo von einem nicht offiziellem Medium, wie zum Beispiel aus einer bereits installierten Distribution heraus oder von einem anderen, nicht von Gentoo herausgegebem, bootbaren Datenträger (wie z.B. Knoppix) installieren.

Dieses Dokument beschreibt die Installation mit einem offiziellen Gentoo Installations-Datenträger, oder, in bestimmten Fällen, Netboot. Wir gehen davon aus, dass Sie die aktuellste Version eines jeden Pakets installieren wollen.

Notiz
Für weitere Hilfe zu den anderen Installationsmöglichkeiten, einschließlich der Nutzung von nicht-Gentoo CDs, lesen Sie bitte unseren Leitfaden über alternative Installationsmöglichkeiten.

Wir bieten ebenfalls ein Gentoo Installation Tipps & Tricks-Dokument, das weitere nützliche Informationen enthält.

Probleme?

Wenn Sie ein Problem während der Installation (oder in der Dokumentation) entdecken, schauen Sie bitte in unserem Bug-Tracking-System, ob der Fehler bereits bekannt ist. Wenn nicht erstellen Sie bitte einen Fehlerbericht, damit wir uns der Sache annehmen können. Haben Sie keine Angst vor den Entwicklern, denen Ihr Fehlerbericht zugeteilt wird -- für gewöhnlich essen sie keine Menschen.

Beachten Sie aber, dass dieses Dokument, welches Sie gerade lesen, architekturspezifisch ist, auch wenn es Referenzen zu anderen Architekturen enthält. Dies liegt daran, dass große Teile des Gentoo Handbuchs Textquellen verwenden, welche für alle Architekturen gleichermaßen verwendet werden (um doppelten Arbeitsaufwand und die Verschwendung von Entwicklungsressourcen zu verhindern). Wir werden versuchen dies auf ein Minimum zu beschränken um Missverständnisse zu vermeiden.

Wenn Sie sich nicht sicher sind, ob ein Problem ein Benutzerproblem ist (ein Fehler, den Sie trotz sorgfältiger Lektüre dieser Dokumentation machen) oder ein Softwareproblem (ein Fehler, den wir trotz sorgfältigen Tests der Installation/Dokumentation begangen haben) sollten Sie den Channel #gentoo-de im irc.freenode.net Netz besuchen, ansonsten sind Sie natürlich auch so willkommen, da unser Chat-Channel alle Gentoo-Themen abdeckt.

Apropos, wenn Sie eine weitere Frage hinsichtlich Gentoo haben, werfen Sie zunächst einen Blick in den Artikel häufig gestellten Fragen (FAQ) hier im Wiki. Sie können auch die FAQs in unserem Forum lesen.





MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Hardwareanforderungen

CPU (Big Endian port) MIPS3, MIPS4, MIPS5 or MIPS64-class CPU
CPU (Little Endian port) MIPS4, MIPS5 or MIPS64-class CPU
Memory 128 MB
Disk space 3.0 GB (excluding swap space)
Swap space At least 256 MB

Schauen Sie sich den Artikel MIPS Hardware Requirementsen im Gentoo Wiki an.

Bemerkungen zur Installation

On many architectures, the processor has gone through several generations, each newer generation builds on the foundation of the previous one. MIPS is no exception. There are several generations of CPU covered under the MIPS architecture. In order to choose the right netboot image stage tarball and CFLAGS appropriately, it is necessary to be aware of which family the system's CPU belongs in. These families are referred to as the Instruction Set Architecture.

MIPS ISA 32/64-bit CPUs Covered
MIPS 1 32-bit R2000, R3000
MIPS 2 32-bit R6000
MIPS 3 64-bit R4000, R4400, R4600, R4700
MIPS 4 64-bit R5000, RM5000, RM7000 R8000, R9000, R10000, R12000, R14000, R16000
MIPS 5 4-bit None As Yet
MIPS32 32-bit AMD Alchemy series, 4kc, 4km, many others... There are a few revisions in the MIPS32 ISA.
MIPS64 64-bit Broadcom SiByte SB1, 5kc ... etc... There are a few revisions in the MIPS64 ISA.
Notiz
Die MIPS5 ISA Ebene wurde im Jahr 1994 von Silocon Graphics entworfen, aber eigentlich nie wirklich in einer richtigen CPU verwendet. Sie lebt aber als Teil der MIPS64 ISA weiter.
Notiz
Die MIPS32 und MIPS64 ISAs sind häufig eine Quelle der Verwirrung. Die MIPS64 ISA Ebene ist eigentlich eine Obermenge der MIPS5 ISA. Als solche enthält Sie alle Befehle von MIPS5 und früherer ISAs. MIPS32 ist die 32-Bit Untermenge von MIPS64. Sie existiert, weil die meisten Anwendungen nur 32-Bit Verarbeitung erfordern.

Ein weiteres wichtiges zu erfassendes Konzept ist das der Byte-Reihenfolge (Endianness). Die Byte-Reihenfolge bezieht sich auf die Art, in der eine CPU ein Datenwort aus dem Arbeitsspeicher liest. Ein Datenwort kann entweder als Big-Endian (höherwertiges Byte bei der niedrigeren Speicheradresse) oder als Little-Endian (niederwertiges Byte bei der niedrigeren Speicheradresse) gelesen werden. Intel x86 Maschinen verwenden grundsätzlich Little-Endian, Apple und Sparc Maschinen hingegen Big-Endian. MIPS können entweder das eine oder das andere sein. Um beide Arten zu unterscheiden hängen wir zur Kennzeichnung von Little-Endian el an den Architekturnamen.

Architecture 32/64-bit Endianness Machines covered
mips 32-bit Big Endian Silicon Graphics
mipsel 32-bit Little Endian Cobalt Servers
mips64 64-bit Big Endian Silicon Graphics
mips64el 64-bit Little Endian Cobalt Servers

For those willing to learn more about ISAs, the following websites may be of assistance:

Netboot Übersicht

In this section, we'll cover what is needed to successfully network boot a Silicon Graphics workstation or Cobalt Server appliance. This is just a brief guide, it is not intended to be thorough, for more information, it is recommended to read the Diskless nodes article.

Abhängig von der Maschine gibt es eine gewisse Menge an Hardware die zum Netboot und zur Linux-Installation benötigt wird.

  • Grundsätzlich:
    • DHCP/BOAMD Alchemy Serie, 4kc, 4km, viele andere ... Es gibt ein paar Revisionen von MIPS32 ISA.OTP Server (ISC DHCPd empfohlen)
    • Geduld -- und viel davon
  • Für Silicon Graphics Workstations:
    • TFTP Server (tftp-hpa empfohlen)
    • Wenn die serielle Konsole verwendet werden muss:
      • MiniDIN8 --> RS-232 serielles Kabel (nur für IP22 und IP28 Systeme benötigt)
      • Nullmodem-Kabel
      • VT100 oder ANSI kompatibles Terminal, 9600 Baud fähig
  • Für Cobalt Server (NICHT der original Qube):
    • NFS Server
    • Nullmodem-Kabel
    • VT100 oder ANSI kompatibles Terminal, 115200 Baud fähig
Notiz
SGI Maschinen verwenden einen Mini-DIN-8 Anschluss für die seriellen Ports. Anscheinend funktionieren Apple Modemkabel als serielle Kabel gut. Seit es Apple Maschinen mit USB und internen Modems gibt, findet man diese Kabel aber immer schwerer. Ein Verdrahtungsplan ist im Linux/MIPS Wiki zu finden. Die meisten Elektronikläden sollten die erforderlichen Stecker auf Lager haben.
Notiz
Als Terminal kann ein echtes VT100/ANSI Terminal oder ein PC mit einer Terminal Emulation Software (wie HyperTerminal, Minicom, seyon, Telex, xc, screen -- was auch immer Sie bevorzugen) zum Einsatz kommen. Es spielt keine Rolle auf welcher Plattform diese Maschine läuft -- solange Sie einen seriellen RS-232 Anschluss hat und passende Software.
Notiz
This guide does NOT cover the original Qube. The original Qube server appliance lacks a serial port in its default configuration, and therefore it is not possible to install Gentoo onto it without the aid of a screwdriver and a surrogate machine to do the installation.

TFTP und DHCP einrichten

Wie bereits erwähnt ist dies keine komplette Anleitung. Es ist ein Grundgerüst, das die Dinge nur ins Rollen bringt. Verwenden Sie es um ein Setup von Grund auf neu zu beginnen, oder nutzen Sie die Vorschläge zur Erweiterung eines bestehenden Setup mit Netboot-Unterstützung.

Es ist erwähnenswert, dass die genutzten Server nicht Gentoo Linux verwenden müssen. Sie können auch gut und gerne FeeBSD oder jede andere Unix-ähnliche Plattform nutzen. Dieser Leitfaden geht von der Verwendung von Gentoo Linux aus. Wenn gewünscht, ist es auch möglich TFTP/NFS auf einer separaten Maschine am DHCP Server zu betreiben.

Warnung
Das Gentoo/MIPS Team kann Ihnen beim Einrichten anderer Betriebssysteme als Netboot-Server nicht helfen.

Erster Schritt -- DHCP konfigurieren. Damit der ISC DHCP Daemon auf BOOTP anfragen reagiert (wie es vom SGI und Cobalt BOOTROM benötigt wird) Aktivieren Sie als erstes das dynamische BOOTP für den verwendeten Adressbereich. Dann erstellen Sie einen Eintrag für jeden Client mit Zeigern auf das Bootabbild.

root #emerge --ask net-misc/dhcp

Once installed, create the /etc/dhcp/dhcpd.conf file. Here's a bare-bones config to get started.

DATEI /etc/dhcp/dhcpd.confBare Bones dhcpd.conf
# Tell dhcpd to disable dynamic DNS.
# dhcpd will refuse to start without this.
ddns-update-style none;
  
# Create a subnet:
subnet 192.168.10.0 netmask 255.255.255.0 {
  # Address pool for our booting clients. Don't forget the 'dynamic-bootp' bit!
  pool {
    range dynamic-bootp 192.168.10.1 192.168.10.254;
  }
  
  # DNS servers and default gateway -- substitute as appropriate
  option domain-name-servers 203.1.72.96, 202.47.56.17;
  option routers 192.168.10.1;
  
  # Tell the DHCP server it's authoritative for this subnet.
  authoritative;
  
  # Allow BOOTP to be used on this subnet.
  allow bootp;
}

Mit diesem Setup kann man eine beliebige Anzahl von Clients im Subnetz-Abschnitt hinzufügen. Wir besprechen das später in dieser Anleitung.

Next step - Setting up TFTP server. It is recommended to use tftp-hpa as it is the only TFTP daemon known to work correctly. Proceed by installing it as shown below:

root #emerge --ask net-ftp/tftp-hpa

Dies erzeugt das Verzeichnis /tftproot zur Aufbewahrung der Netboot Abbilder. Verschieben Sie es an eine andere Stelle, falls notwendig. Zum Zwecke dieser Anleitung wird davon ausgegangen, dass es an der vorgegebenen Stelle verbleibt.

Netboot auf SGI Stationen

Netboot Abbild herunterladen

Je nach System für das die Installation gedacht ist, gibt es mehrere mögliche Images zum Download. Diese sind je nach System- und CPU-Typ benannt für den Sie kompiliert wurden. Die Maschinentypen sind wie folgt:

Codename Machines
IP22 Indy, *Indigo 2, Challenge S
IP26 *Indigo 2 Power
IP27 Origin 200, Origin 2000
IP28 *Indigo 2 Impact
IP30 Octane
IP32 O2
Notiz
Indigo 2 - It is a common mistake to mix up the IRIS Indigo (IP12 w/ R3000 CPU or IP20 with a R4000 CPU, neither of which run Linux), the Indigo 2 (IP22, which runs Linux fine), the R8000-based Indigo 2 Power (which doesn't run Linux at all) and the R10000-based Indigo 2 Impact (IP28, which is highly experimental). Please bear in mind that these are different machines.

Also in the filename, r4k refers to R4000-series processors, r5k for R5000, rm5k for the RM5200 and r10k for R10000. The images are available on the Gentoo mirrors.

DHCP Konfiguration für einen SGI Client

After downloading the file, place the decompressed image file in the /tftproot/ directory. (Use bzip2 -d to decompress). Then edit the /etc/dhcp/dhcpd.conf file and add the appropriate entry for the SGI client.

DATEI /etc/dhcp/dhcpd.confSGI Workstation Abschnitt
subnet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx {
  # ... anderes gewöhnliches Zeug ...
  
  # SGI Workstation ... ändern Sie 'sgi' in den Hostname Ihrer SGI Maschine.
  host sgi {
  
    # MAC Adresse der SGI Maschine.
    # Steht normalerweise auf der Rückseite oder Bodenplatte der Maschine.
    hardware ethernet 08:00:69:08:db:77;
  
    # Download TFTP Server (standardmäßig derselbe wie der DHCP Server)
    next-server 192.168.10.1;
  
    # IP Adresse der SGI Maschine
    fixed-address 192.168.10.3;
  
    # Dateiname der herunterzuladenden und zu bootenden PROM Datei
    filename "/gentoo-r4k.img";
  }
}

Kernel Optionen

Wir sind fast fertig, aber es gibt noch ein paar Optimierungen durchzuführen. Öffnen Sie eine Konsole mit Root-Privilegien.

Disable "Path Maximum Transfer Unit", otherwise SGI PROM won't find the kernel:

root #echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc

Stellen Sie den vom SGI PROM nutzbaren Port-Bereich ein:

root #echo "2048 32767" > /proc/sys/net/ipv4/ip_local_port_range

Dies sollte ausreichend sein, damit der Linux Server mit dem SGI PROM zusammenspielt.

Starting the daemons

Starten Sie hier die Dienste.

root #/etc/init.d/dhcp start
root #/etc/init.d/in.tftpd start

If nothing went wrong in that last step then everything is all set to power on the workstation and proceed with the guide. If the DHCP server isn't firing up for whatever reason, try running dhcpd on the command line and see what it says - if all is well, it should just fork into the background, otherwise it will display 'exiting.' just below its complaint.

Eine einfache Möglichkeit zum Test ob der TFTP Daemon ausgeführt wird ist den folgenden Befehl einzugeben und seine Ausgabe zu prüfen:

root #netstat -al | grep ^udp
udp        0      0 *:bootpc                *:*
udp        0      0 *:631                   *:*
udp        0      0 *:xdmcp                 *:*
udp        0      0 *:tftp                  *:* <-- (suchen Sie nach dieser Zeile)

Netboot der SGI Station

Okay, everything is set, DHCP is running as is TFTP. Now it is time to fire up the SGI machine. Power the unit on - when "Running power-on diagnostics" comes on the screen, either click "Stop For Maintenance" or press Escape. A menu similar to the following will show up.

Running power-on diagnostics
System Maintenance Menu
  
1) Start System
2) Install System Software
3) Run Diagnostics
4) Recover System
5) Enter Command Monitor
Option?

Geben Sie 5 ein, um zum 'Command Monitor' zu gelangen. Starten Sie den BootP Vorgang:

>>bootp(): root=/dev/ram0

Ab diesem Zeitpunkt sollte die Maschine den Download des Images beginnen und ungefähr 20 Sekunden später das Booten von Linux. Wenn alles gut geht, wird eine BusyBox ash shell wie unten gezeigt gestartet und die Installation von Gentoo Linux kann weitergehen.

CODE Wenn alles gut geht ...
init started:  BusyBox v1.00-pre10 (2004.04.27-02:55+0000) multi-call binary
  
Gentoo Linux; http://www.gentoo.org/
 Copyright 2001-2004 Gentoo Technologies, Inc.; Distributed under the GPL
  
 Gentoo/MIPS Netboot for Silicon Graphics Machines
 Build Date: April 26th, 2004
  
 * To configure networking, do the following:
  
 * For Static IP:
 * /bin/net-setup <IP Address> <Gateway Address> [telnet]
  
 * For Dynamic IP:
 * /bin/net-setup dhcp [telnet]
  
 * If you would like a telnetd daemon loaded as well, pass "telnet"
 * As the final argument to /bin/net-setup.
  
Please press Enter to activate this console.

Fehlerbehebung

If the machine is being stubborn and refusing to download its image, it can be one of two things:

  1. The instructions were not followed correctly, or
  2. It needs a little gentle persuasion (No, put that sledge hammer down!)

Here's a list of things to check:

  • dhcpd is giving the SGI Machine an IP Address. There should be some messages about a BOOTP request in the system logs. tcpdump is also useful here.
  • Permissions are set properly in the tftp folder (typically /tftproot/ - should be world readable)
  • Check system logs to see what the tftp server is reporting (errors perhaps)

Wenn Sie alles auf dem Server überprüft haben und Timeouts oder andere Fehler auf der SGI Maschine aufgetreten sind, geben Sie dies in die Konsole ein:

>>resetenv
>>unsetenv netaddr
>>unsetenv dlserver
>>init
>>bootp(): root=/dev/ram0

Netboot auf Cobalt Stationen

Übersicht des Netboot Verfahrens

Unlike the SGI machines, Cobalt servers use NFS to transfer their kernel for booting. Boot the machine by holding down the left & right arrow buttons whilst powering the unit on. The machine will then attempt to obtain an IP number via BOOTP, mount the /nfsroot/ directory from the server via NFS, then try to download and boot the file vmlinux_raq-2800.gz (depending on the model) which it assumes to be a standard ELF binary.

Cobalt Netboot Abbild herunterladen

Inside http://distfiles.gentoo.org/experimental/mips/historical/netboot/cobalt/ the necessary boot images for getting a Cobalt up and running are made available. The files will have the name nfsroot-KERNEL-COLO-DATE-cobalt.tar - select the most recent one and unpack it to / as shown below:

root #tar -C / -xvf nfsroot-2.6.13.4-1.19-20051122-cobalt.tar

NFS Serverkonfiguration

Weil diese Maschinen NFS zum Download seines Images verwendet, ist es notwendig /nfsroot/ auf dem Server zu exportieren. Installieren Sie das Paket net-fs/nfs-utils:

root #emerge --ask net-fs/nfs-utils

Wenn das erledigt ist, schreiben Sie das Folgende in die Datei /etc/exports.

DATEI /etc/exportsExporting the /nfsroot directory
/nfsroot      *(ro,sync)

Starten Sie nun den NFS Server:

root #/etc/init.d/nfs start

Wenn der NFS Server bereits zu diesem Zeitpunkt ausgeführt wurde sagen Sie ihm mit exportfs, dass er erneut einen Blick auf seine exports Datei werfen soll.

root #exportfs -av

DHCP Konfiguration für eine Cobalt Maschine

Nun ist die DHCP Seite der Dinge relativ unkompliziert. Fügen Sie das Folgende der Datei /etc/dhcp/dhcpd.conf hinzu.

DATEI /etc/dhcp/dhcpd.confSnippet for Cobalt server
subnet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx {
  # ... usual stuff here ...
  
  # Configuration for a Cobalt Server
  # Set the hostname here:
  host qube {
    # Path to the nfsroot directory.
    # This is mainly for when using the TFTP boot option on CoLo
    # You shouldn't need to change this.
    option root-path "/nfsroot";
  
    # Cobalt server's ethernet MAC address
    hardware ethernet 00:10:e0:00:86:3d;
  
    # Server to download image from
    next-server 192.168.10.1;
  
    # IP address of Cobalt server
    fixed-address 192.168.10.2;
  
    # Location of the default.colo file relative to /nfsroot
    # You shouldn't need to change this.
    filename "default.colo";
  }
}

Starten der Dienste

Zum Starten der Dienste geben Sie folgendes ein:

root #/etc/init.d/dhcp start
root #/etc/init.d/nfs start

If nothing went wrong in that last step all should be set to power on the workstation and proceed with the guide. If the DHCP server isn't firing up for whatever reason, try running dhcpd on the command line and see what it tells - if all is well, it should just fork into the background, otherwise it will show 'exiting.' just below its complaint.

Netboot der Cobalt Maschine

Now it is time to fire up the Cobalt machine. Hook up the null modem cable, and set the serial terminal to use 115200 baud, 8 bits, no parity, 1 stop bit, VT100 emulation. Once that is done, hold down the left and right arrow buttons whilst powering the unit on.

Das Display auf der Rückseite sollte "Net Booting" anzeigen und einige Netzwerkaktivität sollte sichtbar sein, dicht gefolgt von CoLo. Scrollen Sie auf der rückwärtigen Anzeige nach unten bis zur "Network (NFS)" Option und drücken Sie Enter. Beachten Sie, dass die Maschine auf der seriellen Konsole zu booten beginnt.

...
elf: 80080000 <-- 00001000 6586368t + 192624t
elf: entry 80328040
net: interface down
CPU revision is: 000028a0
FPU revision is: 000028a0
Primary instruction cache 32kB, physically tagged, 2-way, linesize 32 bytes.
Primary data cache 32kB 2-way, linesize 32 bytes.
Linux version 2.4.26-mipscvs-20040415 (root@khazad-dum) (gcc version 3.3.3...
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Initial ramdisk at: 0x80392000 (3366912 bytes)
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,115200 root=/dev/ram0
Calibrating delay loop... 249.85 BogoMIPS
Memory: 122512k/131072k available (2708k kernel code, 8560k reserved, 3424k dat)

Eine BusyBox ash Shell wird sich wie unten gezeigt öffnen, aus der die Gentoo Linux Installation fortgesetzt werden kann.

CODE Wenn alles gut geht ...
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 280k freed
init started:  BusyBox v1.00-pre10 (2004.04.27-02:55+0000) multi-call binary
  
Gentoo Linux; http://www.gentoo.org/
 Copyright 2001-2004 Gentoo Technologies, Inc.; Distributed under the GPL
  
 Gentoo/MIPS Netboot for Cobalt Microserver Machines
 Build Date: April 26th, 2004
  
 * To configure networking, do the following:
  
 * For Static IP:
 * /bin/net-setup <IP Address> <Gateway Address> [telnet]
  
 * For Dynamic IP:
 * /bin/net-setup dhcp [telnet]
  
 * If you would like a telnetd daemon loaded as well, pass "telnet"
 * As the final argument to /bin/net-setup.
  
Please press Enter to activate this console.

Fehlerbehebung

If the machine is being stubborn and refusing to download its image, it can be one of two things:

  1. the instructions have not been followed correctly, or
  2. it needs a little gentle persuasion. (No, put that sledge hammer down!)

Here's a list of things to check:

  • dhcpd is giving the Cobalt Machine an IP Address. Notice messages about a BOOTP request in the system logs. tcpdump is also useful here.
  • Permissions are set properly in the /nfsroot/ folder (should be world readable).
  • Make sure the NFS server is running and exporting the /nfsroot/ directory. Check this using exportfs -v on the server.


Eine Installations-CD verwenden

Auf Silicon Graphics Maschinen ist es möglich von einer CD zu booten um Betriebssysteme zu installieren. (So istalliert man zum Beispiel IRIX.) Seit kurzem wurden Abbilder für solche bootbaren CDs zur Installation von Gentoo möglich. Diese CDs sind dafür entworfen, um in der gleichen Weise zu funktionieren.

Momentan funktioniert die Gentoo/MIPS Live-CD nur auf den SGI Indy, Indigo 2 und O2 Workstations, die mit der R4000 und R5000 CPU Serie ausgestattet sind. In der Zukunft können aber auch andere Plattformen möglich sein.

Die Live-CD Abbilder können auf einem Gentoo Spiegelserver unter dem Verzeichnis experimental/mips/livecd/ gefunden werden.

Warnung
Diese CDs sind zu diesem Zeitpunkt sehr experimentell. Es ist möglich, dass sie funktionieren oder nicht funktionieren. Bitte melden Sie Erfolg oder Fehler entweder auf Bugzilla, diesem Forumsbeitrag oder im #gentoo-mips IRC-Kanal.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Automatische Netzwerkerkennung

Vielleicht funktioniert es einfach?

If the system is plugged into an Ethernet network with a DHCP server, it is very likely that the networking configuration has already been set up automatically. If so, then the many included network-aware commands on the installation CD such as ssh, scp, ping, irssi, wget, and links, among others, will work immediately.

Determine interface names

ifconfig command

If networking has been configured, the ifconfig command should list one or more network interfaces (besides lo). In the example below eth0 shows up:

root #ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:BA:8F:61:7A
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::50:ba8f:617a/10 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1984 txqueuelen:100
          RX bytes:485691215 (463.1 Mb)  TX bytes:123951388 (118.2 Mb)
          Interrupt:11 Base address:0xe800 

As a result of the shift towards predictable network interface names, the interface name on the system can be quite different from the old eth0 naming convention. Recent installation media might show regular network interfaces names like eno0, ens1, or enp5s0. Look for the interface in the ifconfig output that has an IP address related to the local network.

Tip
If no interfaces are displayed when the standard ifconfig command is used, try using the same command with the -a option. This option forces the utility to show all network interfaces detected by the system whether they be in an up or down state. If ifconfig -a produces no results then the hardware is faulty or the driver for the interface has not been loaded into the kernel. Both situations reach beyond the scope of this Handbook. Contact #gentoo for support.

ip command

As an alternative to ifconfig, the ip command can be used to determine interface names. The following example shows the output of ip addr (of another system so the information shown is different from the previous example):

root #ip addr
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether e8:40:f2:ac:25:7a brd ff:ff:ff:ff:ff:ff
    inet 10.0.20.77/22 brd 10.0.23.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet6 fe80::ea40:f2ff:feac:257a/64 scope link 
       valid_lft forever preferred_lft forever

The output above may be a bit more complicated to read than alternative. The interface name in the above example directly follows the number; it is eno1.

In the remainder of this document, the handbook will assume that the operating network interface is called eth0.

Optional: Konfiguration eines Proxies

Wenn Sie auf das Internet nur über einen Proxy-Server zugreifen können, müssen Sie während der Installation das System für die Verwendung des Proxy-Servers vorbereiten. Das ist aber recht einfach. Sie müssen dazu lediglich eine Variable mit den Informationen über den Proxy-Server setzen.

In den meisten Fällen können Sie den Hostnamen des Proxy-Servers in die Variable schreiben. Nehmen wir an, der Server ist proxy.gentoo.org und der Port ist 8080.

Zur Einrichtung eines HTTP-Proxies (für HTTP- und HTTPS-Traffic):

root #export http_proxy="http://proxy.gentoo.org:8080"

Zur Einrichtung eines FTP-Proxies:

root #export ftp_proxy="ftp://proxy.gentoo.org:8080"

Zur Einrichtung eines RSYNC-Proxies:

root #export RSYNC_PROXY="proxy.gentoo.org:8080"

Wenn der Proxy-Server einen Benutzernamen und Passwort erfordert, sollten Sie die folgende Syntax in der Variable verwenden:

CODE Einen Benutzernamen/Passwort zu der Variable hinzufügen
http://username:password@proxy.gentoo.org:8080

Das Netzwerk testen

Dazu können Sie beispielsweise den DNS-Server Ihres Internetanbieters "anpingen". Die Adresse dieses Servers finden Sie in /etc/resolv.conf. Außerdem sollten Sie eine Webseite Ihrer Wahl "pingen". So stellen Sie sicher, dass Sie sowohl mit dem Internet verbunden sind, als auch, dass Ihre Namensauflösung korrekt funktioniert.

root #ping -c 3 www.gentoo.org

Wenn Sie nun in der Lage sind, Ihr Netzwerk zu verwenden, dann können Sie den Rest dieses Kapitels überspringen und mit dem Vorbereiten der Festplatte(n) fortfahren. Wenn nicht, lesen Sie bitte weiter.

Automatische Netzwerkkonfiguration

If the network doesn't work immediately, some installation media allow the user to use net-setup (for regular or wireless networks), pppoe-setup (for ADSL users) or pptp (for PPTP users).

Wenn Ihr Installationsmedium das entsprechende Tool nicht enthält oder Ihre Netzwerkverbindung noch nicht funktioniert, so fahren Sie bitte mit folgendem Abschnitt fort: Manuelle Netzwerkkonfiguration.

Standard: Verwendung von net-setup

The simplest way to set up networking if it didn't get configured automatically is to run the net-setup script:

root #net-setup eth0

net-setup will ask some questions about the network environment. When all is done, the network connection should work. Test the network connection as stated before. If the tests are positive, congratulations! Skip the rest of this section and continue with Preparing the disks.

Sollte Ihr Netzwerk nun immer noch nicht funktionieren, fahren Sie bitte mit Manuelle Netzwerkkonfiguration fort.

Alternativ: Verwendung von PPP

Assuming PPPoE is needed to connect to the Internet, the installation CD (any version) has made things easier by including ppp. Use the provided pppoe-setup script to configure the connection. During the setup the Ethernet device that is connected to your ADSL modem, the username and password, the IPs of the DNS servers and if a basic firewall is needed or not will be asked.

root #pppoe-setup
root #pppoe-start

If something goes wrong, double-check that the username and password are correct by looking at etc/ppp/pap-secrets or /etc/ppp/chap-secrets and make sure to use the right Ethernet device. If the Ethernet device does not exist, the appropriate network modules need to be loaded. In that case continue with Manual network configuration as it will explain how to load the appropriate network modules there.

Wenn alles funktioniert hat, dann fahren Sie mit dem nächsten Kapitel, Vorbereiten der Festplatte(n), fort.

Alternativ: Verwendung von PPTP

If PPTP support is needed, use pptpclient which is provided by the installation CDs. But first make sure that the configuration is correct. Edit /etc/ppp/pap-secrets or /etc/ppp/chap-secrets so it contains the correct username/password combination:

root #nano -w /etc/ppp/chap-secrets

Wenn nötig, sollten Sie nun noch /etc/ppp/options.pptp anpassen:

root #nano -w /etc/ppp/options.pptp

When all that is done, run pptp (along with the options that couldn't be set in options.pptp) to connect the server:

root #pptp <server ip>

Wenn alles funktioniert hat, dann fahren Sie mit dem Vorbereiten der Festplatte(n) fort.

Manuelle Netzwerkkonfiguration

Die richtigen Kernelmodule laden

Wenn die Installations-CD bootet, versucht sie alle Ihre Hardwaregeräte zu erkennen und lädt automatisch die entsprechenden Kernelmodule (Treiber). In den allermeisten Fällen funktioniert dies sehr gut. Allerdings kann es vorkommen, dass ein Kernelmodul nicht automatisch geladen wird.

If net-setup or pppoe-setup failed, then it is possible that the network card wasn't found immediately. This means users may have to load the appropriate kernel modules manually.

To find out what kernel modules are provided for networking, use the ls command:

root #ls /lib/modules/`uname -r`/kernel/drivers/net

If a driver is found for the network device, use modprobe to load the kernel module. For instance, to load the pcnet32 module:

root #modprobe pcnet32

To check if the network card is now detected, use ifconfig. A detected network card would result in something like this (again, eth0 here is just an example):

root #ifconfig eth0
eth0      Link encap:Ethernet  HWaddr FE:FD:00:00:00:00  
          BROADCAST NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Wenn Sie stattdessen diesen Fehler erhalten, dann wurde Ihre Karte nicht erkannt.

root #ifconfig eth0
eth0: error fetching interface information: Device not found

Die verfügbaren Netzwerkkarten in Ihrem System können über das /sys-Dateisystem aufgelistet werden:

root #ls /sys/class/net
dummy0  eth0  lo  sit0  tap0  wlan0

In the above example, 6 interfaces are found. The eth0 one is most likely the (wired) Ethernet adapter whereas wlan0 is the wireless one.

Assuming that the network card is now detected, retry net-setup or pppoe-setup again (which should work now), but for the hardcore people we explain how to configure the network manually as well.

Select one of the following sections based on your network setup:

Verwendung von DHCP

DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if a DHCP server is in the network (or if the ISP provider provides a DHCP service). To have a network interface receive this information automatically, use dhcpcd:

root #dhcpcd eth0

Einige Netzwerkadministratoren erfordern es, dass der Host- und Domainname, die vom DHCP-Server angeboten werdden, vom System genutzt werden. In diesem Fall verwenden Sie:

root #dhcpcd -HD eth0

Wenn das funktioniert (versuchen Sie einen Internet-Server zu pingen, z.B. Google), dann sind Sie fertig mit der Konfiguration des Netzwerks und können mit dem Vorbereiten der Festplatte(n) fortfahren.

Vorbereitung für drahtlosen Zugriff

Notiz
Support for the iw command might be architecture-specific. If the command is not available see if the net-wireless/iw package is available for the current architecture. The iw command will be unavailable unless the net-wireless/iw package has been installed.

When using a wireless (802.11) card, the wireless settings need to be configured before going any further. To see the current wireless settings on the card, one can use iw. Running iw might show something like:

root #iw dev wlp9s0 info
Interface wlp9s0
	ifindex 3
	wdev 0x1
	addr 00:00:00:00:00:00
	type managed
	wiphy 0
	channel 11 (2462 MHz), width: 20 MHz (no HT), center1: 2462 MHz
	txpower 30.00 dBm

To check for a current connection:

root #iw dev wlp9s0 link
Not connected.

or

root #iw dev wlp9s0 link
Connected to 00:00:00:00:00:00 (on wlp9s0)
	SSID: GentooNode
	freq: 2462
	RX: 3279 bytes (25 packets)
	TX: 1049 bytes (7 packets)
	signal: -23 dBm
	tx bitrate: 1.0 MBit/s
Notiz
Some wireless cards may have a device name of wlan0 or ra0 instead of wlp9s0. Run ip link to determine the correct device name.

For most users, there are only two settings needed to connect, the ESSID (aka wireless network name) and, optionally, the WEP key.

  • First, ensure the interface is active:
root #ip link set dev wlp9s0 up
  • To connect to an open network with the name GentooNode:
root #iw dev wlp9s0 connect -w GentooNode
  • To connect with a hex WEP key, prefix the key with d::
root #iw dev wlp9s0 connect -w GentooNode key 0:d:1234123412341234abcd
  • To connect with an ASCII WEP key:
root #iw dev wlp9s0 connect -w GentooNode key 0:some-password
Notiz
If the wireless network is set up with WPA or WPA2, then wpa_supplicant needs to be used. For more information on configuring wireless networking in Gentoo Linux, please read the Wireless networking chapter in the Gentoo Handbook.

Confirm the wireless settings by using iw dev wlp9s0 link. Once wireless is working, continue configuring the IP level networking options as described in the next section (Understanding network terminology) or use the net-setup tool as described previously.

Verstehen der Netzwerk-Terminologie

Notiz
If the IP address, broadcast address, netmask and nameservers are known, then skip this subsection and continue with Using ifconfig and route.

Wenn alles obige fehlschlägt, müssen Sie Ihr Netzwerk manuell einrichten. Dies ist überhaupt nicht schwierig. Jedoch müssen Sie mit einiger Netzwerkterminologie vertraut sein, denn Sie werden diese benötigen, um Ihr Netzwerk zu Ihrer Zufriedenheit konfigurieren zu können. Nachdem Sie dies gelesen haben, werden Sie wissen, was ein Gateway ist, wozu eine Netzmaske dient, wie eine Broadcast-Adresse aufgebaut ist und warum Sie Nameserver benötigen.

In einem Netzwerk werden die Computer über Ihre IP-Adresse (Internet Protocol Address) identifiziert. Diese Adresse ist eine Kombination aus vier Nummern zwischen 0 und 255. Jedenfalls nehmen wir das so wahr. In Wirklichkeit ist eine IP-Adresse eine 32-Bit-Folge (Nullen und Einsen). Hier ein Beispiel:

CODE Beispiel einer IPv4-Adresse
IP Address (numbers):   192.168.0.2
IP Address (bits):      11000000 10101000 00000000 00000010
                        -------- -------- -------- --------
                           192      168       0        2
Notiz
Der Nachfolger von IPv4, IPv6, verwendet 128 Bit (Nullen und Einsen). In diesem Abschnitt betrachten wir aber nur IPv4-Adressen.

Solch eine IP-Adresse ist einmalig für einen Host (Computer) in allen angrenzenden Netzwerken (d.h. jeder Host, den Sie erreichen können, muss eine einzigartige IP-Adresse besitzen). Um zwischen Hosts innerhalb eines Netzwerkes und außerhalb eines Netzwerkes unterscheiden zu können, ist die IP-Adresse in zwei Teile eingeteilt: Einen Network-Abschnitt und einen Host-Abschnitt.

Diese Unterteilung wird mittels der Netzmaske beschrieben. Die Netzmaske ist eine Reihe von Einsen, gefolgt von einer Reihe von Nullen. Der Teil der IP-Adresse der den Einsen entspricht, ist der Netzwerkteil. Die Netzmaske kann wie eine IP-Adresse aufgeschrieben werden.

CODE Beispiel von Netz/Host-Aufteilung
IP address:    192      168      0         2
            11000000 10101000 00000000 00000010
Netmask:    11111111 11111111 11111111 00000000
               255      255     255        0
           +--------------------------+--------+
                    Network              Host

In other words, 192.168.0.14 is part of the example network, but 192.168.1.2 is not.

Die Broadcast-Adresse ist eine IP-Adresse, die den gleichen Netzwerkteil wie unser Netzwerk hat, allerdings nur Einsen im Hostteil hat. Alle Computer in dem Teilnetz hören auf diese IP-Adresse. Diese Adresse ist zum Broadcasting eines Paketes an alle Computer gedacht, d.h. ein Paket wird an alle Computer im Netzwerk gleichzeitig geschickt.

CODE Broadcast-Adresse
IP address:    192      168      0         2
            11000000 10101000 00000000 00000010
Broadcast:  11000000 10101000 00000000 11111111
               192      168      0        255
           +--------------------------+--------+
                     Network             Host

Um im Internet surfen zu können, müssen Sie wissen, welcher Host die Internetverbindung herstellt. Dieser Host wird Gateway genannt. Da dieser ein normaler Host ist, besitzt auch das Gateway eine normale IP-Adresse (z.B. 192.168.0.1).

Zuvor haben wir schon erwähnt, dass jeder Host eine eigene IP-Adresse besitzt. Um diesen Host aber mit einem Namen ansprechen zu können (anstatt einer IP-Adresse) benötigen Sie einen Dienst, der Namen (wie dev.gentoo.org) in IP-Adressen (wie 64.5.62.82) umwandelt. Dieser Dienst wird nameservice genannt. Um diesen Dienst nutzen zu können, müssen Sie die entsprechenden name server kennen. Diese werden in der Datei /etc/resolv.conf festgehalten.

In manchen Fällen trägt das Gateway ebenfalls die Rolle des Nameservers. Sonst müssen Sie den Nameserver des Providers angeben.

In der Zusammenfassung benötigen Sie also folgende Daten bevor Sie fortfahren:

Network item Example
The system IP address 192.168.0.2
Netmask 255.255.255.0
Broadcast 192.168.0.255
Gateway 192.168.0.1
Nameserver(s) 195.130.130.5, 195.130.130.133

Verwendung von ifconfig und route

Setting up the network consists of three steps:

  1. Assign an IP address using ifconfig
  2. Set up routing to the gateway using route
  3. Finish up by placing the nameserver IPs in /etc/resolv.conf

To assign an IP address, the IP address, broadcast address and netmask are needed. Then execute the following command, substituting ${IP_ADDR} with the right IP address, ${BROADCAST} with the right broadcast address and ${NETMASK} with the right netmask:

root #ifconfig eth0 ${IP_ADDR} broadcast ${BROADCAST} netmask ${NETMASK} up

Set up routing using route. Substitute ${GATEWAY} with the right gateway IP address:

root #route add default gw ${GATEWAY}

Nun öffnen Sie /etc/resolv.conf:

root #nano -w /etc/resolv.conf

Fill in the nameserver(s) using the following as a template. Make sure to substitute ${NAMESERVER1} and ${NAMESERVER2} with the appropriate nameserver addresses:

CODE Beispiel für /etc/resolv.conf
nameserver ${NAMESERVER1}
nameserver ${NAMESERVER2}

Das war es schon. Nun sollten Sie Ihre Internetverbindung testen. Dazu "pingen" Sie einfach einen Internetserver (wie Google). Funktioniert es, sind Sie nun endlich bereit, Gentoo zu installieren. Fahren Sie mit dem Vorbereiten der Festplatte(n) fort.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Einführung in blockorientierte Geräte

Blockorientierte Geräte

Let's take a good look at disk-oriented aspects of Gentoo Linux and Linux in general, including Linux filesystems, partitions, and block devices. Once the ins and outs of disks and filesystems are understood, partitions and filesystems can be established for the Gentoo Linux installation.

To begin, let's look at block devices. The most famous block device is probably the one that represents the first drive in a Linux system, namely /dev/sda. SCSI and Serial ATA drives are both labeled /dev/sd*; even IDE drives are labeled /dev/sd* with the libata framework in the kernel. When using the old device framework, then the first IDE drive is /dev/hda.

The block devices above represent an abstract interface to the disk. User programs can use these block devices to interact with the disk without worrying about whether the drives are IDE, SCSI, or something else. The program can simply address the storage on the disk as a bunch of contiguous, randomly-accessible 512-byte blocks.


Partitionen

Obwohl es theoretisch möglich wäre eine vollständige Festplatte zu nutzen um ein Linux-System unterzubringen, kommt das in der Praxis fast nie vor. Stattdessen werden komplette Festplatten Block Devices in kleinere, besser handhabbare Block Devices unterteilt. Diese werden Partitionen genannt.

Entwurf Partitionsschema

How many partitions and how big?

The number of partitions is highly dependent on the environment. For instance, if there are lots of users, then it is advised to have /home/ separate as it increases security and makes backups easier. If Gentoo is being installed to perform as a mail server, then /var/ should be separate as all mails are stored inside /var/. A good choice of filesystem will then maximize the performance. Game servers will have a separate /opt/ as most gaming servers are installed there. The reason is similar for the /home/ directory: security and backups. In most situations, /usr/ is to be kept big: not only will it contain the majority of applications, it typically also hosts the Gentoo ebuild repository (by default located at /usr/portage) which already takes around 650 MiB. This disk space estimate excludes the packages/ and distfiles/ directories that are generally stored within this ebuild repository.

It very much depends on what the administrator wants to achieve. Separate partitions or volumes have the following advantages:

  • Choose the best performing filesystem for each partition or volume.
  • The entire system cannot run out of free space if one defunct tool is continuously writing files to a partition or volume.
  • If necessary, file system checks are reduced in time, as multiple checks can be done in parallel (although this advantage is more with multiple disks than it is with multiple partitions).
  • Security can be enhanced by mounting some partitions or volumes read-only, nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.

Jedoch haben viele Partitionen auch Nachteile. Wenn diese schlecht auf das System angepasst sind, hat dieses viel freien Speicherplatz auf einer Partition und keinen auf einer Anderen mehr übrig. Ein weiterer Nachteil besteht darin, dass separate Partitionen - vor allem für wichtige Mount-Pfade wie /usr/ oder /var/ - es notwendig ein initramfs während des Bootens zu benutzen, welches diese Partitionen vor der Ausführung anderer Bootskripte mountet.

Weiterhin gibt es ein Limit von maximal 15 Partitionen für SCSI und SATA Datenträger, es sei denn der Datenträger nutzt GPT-labels.

What about swap space?

Die perfekte Größe für eine Swap-Partition gibt es nicht. Der Zweck von Swap-Speicher es ist Festplattenspeicherplatz für den Kernel bereitzuhalten, wenn der interne Speicher (RAM) knapp wird. Der Swap-Speicher erlaubt dem Kernel Speicherseiten auf die vermutlich nicht bald zugegriffen wird auf die Platte auszulagern (Swap oder Page-Out) um Arbeitsspeicher freizumachen. Wird der Speicherinhalt plötzlich benötigt, müssen diese Speicherseiten (Pages) wieder zurück in den Arbeitsspeicher geladen werden (Page-In), dies dauert eine Weile (da Festplatten verglichen mit Arbeitsspeicher sehr langsam sind).

When the system is not going to run memory intensive applications or the system has lots of memory available, then it probably does not need much swap space. However, swap space is also used to store the entire memory in case of hibernation. If the system is going to need hibernation, then a bigger swap space is necessary, often at least the amount of memory installed in the system.


fdisk verwenden

SGI Maschinen: SGI Plattenlabel erstellen

Alle Festplatten in einem SGI System benötigen ein SGI Plattenlabel, welches eine ähnliche Funktionalität wie ein Sun oder MS-DOS Plattenlabel bietet -- es speichert Informationen über die Partitionen einer Festplatte. Die Erzeugung eines neuen SGI Plattenlabels erzeugt zwei spezielle Partitionen auf der Festplatte:

  • SGI Volume Header (9. Partition): Diese Partition ist wichtig. Sie ist der Ort an dem sich der Bootloader befindet und in einigen Fällen enthält sie ebenfalls die Kernel-Abbilder.
  • SGI Volume (11. Partition): Diese Partition ist ähnlich wichtig wie die dritte Partition des Sun Plattenlabels "Whole Disk". Diese Partition umschließt die gesamte Festplatte und solle unberührt bleiben. Sie dient keinem anderen speziellen Zweck außer das PROM in undokumentierter Weise zu unterstützen (oder es wird irgendwie von IRIX verwendet).
Warnung
Der SGI Volume Header muss bei Zylinder 0 beginnen. Ein Fehler hierbei bedeutet ein Scheitern beim Booten von der Platte.

Das Folgende ist ein Beispiel-Auszug einer fdisk Sitzung. Lesen und passen Sie es Ihren persönlichen Bedürfnissen an ...

root #fdisk /dev/sda

Wechseln Sie in den Expertenmodus:

Command (m for help):x

Mit m wird das vollständige Menü der Optionen angezeigt:

Expert command (m for help):m
Command action
   b   move beginning of data in a partition
   c   change number of cylinders
   d   print the raw data in the partition table
   e   list extended partitions
   f   fix partition order
   g   create an IRIX (SGI) partition table
   h   change number of heads
   m   print this menu
   p   print the partition table
   q   quit without saving changes
   r   return to main menu
   s   change number of sectors/track
   v   verify the partition table
   w   write table to disk and exit

Erzeugen Sie ein SGI Plattenlabel:

Expert command (m for help):g
Building a new SGI disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content will be irrecoverably lost.

Kehren Sie zum Hauptmenü zurück:

Expert command (m for help):r

Werfen wir einen Blick auf das aktuelle Partitions-Layout:

Command (m for help):p
Disk /dev/sda (SGI disk label): 64 heads, 32 sectors, 17482 cylinders
Units = cylinders of 2048 * 512 bytes
  
----- partitions -----
Pt#     Device  Info     Start       End   Sectors  Id  System
 9:  /dev/sda1               0         4     10240   0  SGI volhdr
11:  /dev/sda2               0     17481  35803136   6  SGI volume
----- Bootinfo -----
Bootfile: /unix
----- Directory Entries -----
Notiz
Wenn die Festplatte bereits ein bestehendes SGI Plattenlabel hat, wird fdisk die Erzeugung eines neuen Labels nicht gestatten. Es gibt zwei Möglichkeiten das zu umgehen. Die erste ist die Erstellung eines Sun oder MS-DOS Plattenlabels, die Änderungen auf die Festplatte zu schreiben und fdisk neu zu starten. Die zweite ist die Partitionstabelle mit Nullwerten durch den folgenden Befehl zu überschreiben: dd if=/dev/zero of=/dev/sda bs=512 count=1

SGI Volume-Header Größenänderung

Wichtig
Diesen Schritt benötigt man aufgrund eines Bugs in fdisk oft. Aus irgendeinem Grund wird der Volume-Header nicht korrekt erstellt. Das Ergebnis ist, dass er auf Zylinder 0 startet und endet. Dies verhindert, dass mehreren Partitionen erstellt werden. Um dieses Problem zu umgehen ... lesen Sie weiter.

Da jetzt ein SGI Plattenlabel erstellt wurde, können nun Partitionen definiert werden. Im obigen Beispiel sind bereits zwei Partitionen definiert. Das sind wie erwähnt die besonderen Partitionen und sie sollten normalerweise nicht verändert werden. Wie auch immer, zur Installation von Gentoo müssen wir einen Bootloader und möglicherweise mehrere Kernel-Abbilder (abhängig vom Systemtyp) direkt in den Volume-Header laden. Der Volume-Header selbst kann bis zu acht Abbilder jeglicher Größe beinhalten mit jeweils einem acht Zeichen langen Namen.

Der Vorgang den Volume-Header größer zu machen ist etwas verworren und mit einem kleinen Trick verbunden. Man kann den Volume-Header wegen dem eigenartigen Verhalten von fdisk nicht einfach löschen und ihn dann wieder neu hinzufügen. Im Beispiel unten erzeugen wir einen 50 MB großen Volume-Header in Verbindung mit einer 50 MB großen /boot/ Partition. Das tatsächliche Plattenlayout kann sich unterscheiden, dies dient nur der Veranschaulichung.

Eine neue Partition erstellen:

Command (m for help):n
Partition number (1-16): 1
First cylinder (5-8682, default 5): 51
 Last cylinder (51-8682, default 8682): 101

Beachten Sie, dass fdisk zur Neuerstellung von Partition Nr. 1 als kleinsten Zylinder 5 gestattet. Wenn wir versucht hätten den SGI Volume-Header zu löschen und auf diese Weise wiederherzustellen, würden wir vor dem gleichen Problem stehen. In unserem Beispiel wollen wir dass /boot/ 50 MB groß ist, deshalb starten wir bei Zylinder 51. (- Der Volume-Header muss bei Zylinder 0 beginnen, erinnern Sie sich?) Den End-Zylinder setzten wir bei 101, das in etwa 50 MB entspricht (+/- 1..5 MB).

Die Partition löschen:

Command (m for help):d
Partition number (1-16): 9

Jetzt die Neuerstellung der Volume-Header Partition:

Command (m for help):n
Partition number (1-16): 9
First cylinder (0-50, default 0): 0
 Last cylinder (0-50, default 50): 50

Wenn Sie sich unsicher über die Verwendung fdisk sind, werfen sie weiter unten einen Blick auf die Anleitung zur Partitionierung auf Cobalt Systemen. Das Konzept ist genau das gleiche -- denken Sie nur daran die Volume-Header und die "Whole Disk" Partition in Ruhe zu lassen.

Sobald dies geschehen ist können Sie die übrigen Partitionen die Sie benötigen erzeugen. Nachdem Sie alle Partitionen angelegt haben, stellen Sie sicher die Partitions-ID der Swap Partition auf 82 zu stellen, "Linux Swap". Der Standard ist 83, "Linux Native".

Cobalt Festplatten partitionieren

Auf Cobalt Maschinen erwartet das BOOTROM einen MS-DOS MBR, deshalb ist die Festplattenpartitionierung relativ geradlinig. -- In der Tat wird dies wie bei einer Intel x86 Maschine gemacht. Es gibt jedoch ein paar Dinge die Sie beachten sollten.

  • Die Cobalt Firmware erwartet /dev/sda1 als Linux Partition im Format EXT2 Revision 0. EXT Revision 1 Partitionen funktionieren NICHT! (Das Cobalt BOOTROM versteht nur EXT2r0.)
  • Die oben angesprochene Partition muss das gzip-komprimierte ELF Abbild vmlinux.gz in der Wurzel ("root") dieser Partition enthalten, das als Kernel geladen wird.

Aus diesem Grund wird eine ca. 20 MB große mit EXT2r0 formatierte /boot/ Partition empfohlen auf der CoLo und die Kernel installiert werden. Dies gestattet dem Benutzer ein modernes Dateisystem (EXT3 oder ReiserFS) auf der Root Partition zu betreiben.

Im Beispiel wird davon ausgegangen, dass /dev/sda1 erzeugt wird, um später als /boot/ Partition eingehängt zu werden. Falls Sie die Partition zu / machen wollen, denken Sie an die Erwartungen des PROMs.

Also weiter ... Um die Partition zu erstellen geben Sie an der Eingabeaufforderung fdisk /dev/sda ein. Die wichtigsten Befehle, die Sie wissen sollten sind diese:

CodeWichtige fdisk Befehle

'"`UNIQ--pre-00000016-QINU`"'

This is a deprecated template. Help us update this template!

root #fdisk /dev/sda
The number of cylinders for this disk is set to 19870.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Fangen Sie damit an, alle vorhandenen Partitionen zu löschen:

Command (m for help):o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
  
  
The number of cylinders for this disk is set to 19870.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Überprüfen Sie nun durch Drücken der Befehlstaste p, dass die Partitionstabelle leer ist:

Command (m for help):p
Disk /dev/sda: 10.2 GB, 10254827520 bytes
16 heads, 63 sectors/track, 19870 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
  
   Device Boot      Start         End      Blocks   Id  System

Erstellen Sie die /boot Partition:

Command (m for help):n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19870, default 1):
Last cylinder or +size or +sizeM or +sizeK (1-19870, default 19870): +20M

Wenn Sie die Partitionen ausgeben lassen, beachten Sie die neu erstellte:

Command (m for help):p
Disk /dev/sda: 10.2 GB, 10254827520 bytes
16 heads, 63 sectors/track, 19870 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
  
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          40       20128+  83  Linux

Lassen Sie uns nun eine erweiterte Partition erstellen, die den Rest der Festplatte umfasst. In dieser erweiterten Partition legen wir die übrigen Partitionen (logische Partitionen) an:

Command (m for help):n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 2
First cylinder (41-19870, default 41):
Using default value 41
Last cylinder or +size or +sizeM or +sizeK (41-19870, default 19870):
Using default value 19870

Jetzt erstellen wir die Partitionen /, /usr, /var usw.

Command (m for help):n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (41-19870, default 41):<Press ENTER>
Using default value 41
Last cylinder or +size or +sizeM or +sizeK (41-19870, default 19870): +500M

Wiederholen Sie dies wie benötigt.

Zum Schluss zur Swap Partition. Es wird empfohlen mindestens 250 MB, besser 1 GB Speicherplatz zu verwenden:

Command (m for help):n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (17294-19870, default 17294): <Press ENTER>
Using default value 17294
Last cylinder or +size or +sizeM or +sizeK (1011-19870, default 19870): <Press ENTER>
Using default value 19870

Wenn Sie die Partitionstabelle überprüfen, sollte alles bereit sein - bis auf eine Sache.

Command (m for help):p
Disk /dev/sda: 10.2 GB, 10254827520 bytes
16 heads, 63 sectors/track, 19870 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
  
Device Boot      Start         End      Blocks      ID  System
/dev/sda1               1          21       10552+  83  Linux
/dev/sda2              22       19870    10003896    5  Extended
/dev/sda5              22        1037      512032+  83  Linux
/dev/sda6            1038        5101     2048224+  83  Linux
/dev/sda7            5102        9165     2048224+  83  Linux
/dev/sda8            9166       13229     2048224+  83  Linux
/dev/sda9           13230       17293     2048224+  83  Linux
/dev/sda10          17294       19870     1298776+  83  Linux

Ist Ihnen aufgefallen, dass Partition 10 - die Swap Partition - immer noch vom Typ 83 ist? Lassen Sie uns das auf den richtigen Typ ändern:

Command (m for help):t
Partition number (1-10): 10
Hex code (type L to list codes): 82
Changed system type of partition 10 to 82 (Linux swap)

Nun zur Überprüfung:

Command (m for help):p
Disk /dev/sda: 10.2 GB, 10254827520 bytes
16 heads, 63 sectors/track, 19870 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
  
Device Boot      Start         End      Blocks      ID  System
/dev/sda1               1          21       10552+  83  Linux
/dev/sda2              22       19870    10003896    5  Extended
/dev/sda5              22        1037      512032+  83  Linux
/dev/sda6            1038        5101     2048224+  83  Linux
/dev/sda7            5102        9165     2048224+  83  Linux
/dev/sda8            9166       13229     2048224+  83  Linux
/dev/sda9           13230       17293     2048224+  83  Linux
/dev/sda10          17294       19870     1298776+  82  Linux Swap

Wir speichern die neue Partitionstabelle:

Command (m for help):w
The partition table has been altered!
  
Calling ioctl() to re-read partition table.
Syncing disks.


Erstellung von Dateisystemen

Einleitung

Now that the partitions are created, it is time to place a filesystem on them. In the next section the various file systems that Linux supports are described. Readers that already know which filesystem to use can continue with Applying a filesystem to a partition. The others should read on to learn about the available filesystems...

Dateisysteme

Several filesystems are available. Some of them are found stable on the mips architecture - it is advised to read up on the filesystems and their support state before selecting a more experimental one for important partitions.

btrfs
A next generation filesystem that provides many advanced features such as snapshotting, self-healing through checksums, transparent compression, subvolumes and integrated RAID. A few distributions have begun to ship it as an out-of-the-box option, but it is not production ready. Reports of filesystem corruption are common. Its developers urge people to run the latest kernel version for safety because the older ones have known problems. This has been the case for years and it is too early to tell if things have changed. Fixes for corruption issues are rarely backported to older kernels. Proceed with caution when using this filesystem!
ext2
This is the tried and true Linux filesystem but doesn't have metadata journaling, which means that routine ext2 filesystem checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled filesystems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled filesystems prevent long delays when the system is booted and the filesystem happens to be in an inconsistent state.
ext3
The journaled version of the ext2 filesystem, providing metadata journaling for fast recovery in addition to other enhanced journaling modes like full data and ordered data journaling. It uses an HTree index that enables high performance in almost all situations. In short, ext3 is a very good and reliable filesystem.
ext4
Initially created as a fork of ext3, ext4 brings new features, performance improvements, and removal of size limits with moderate changes to the on-disk format. It can span volumes up to 1 EB and with maximum file size of 16TB. Instead of the classic ext2/3 bitmap block allocation ext4 uses extents, which improve large file performance and reduce fragmentation. Ext4 also provides more sophisticated block allocation algorithms (delayed allocation and multiblock allocation) giving the filesystem driver more ways to optimize the layout of data on the disk. Ext4 is the recommended all-purpose all-platform filesystem.
f2fs
The Flash-Friendly File System was originally created by Samsung for the use with NAND flash memory. As of Q2, 2016, this filesystem is still considered immature, but it is a decent choice when installing Gentoo to microSD cards, USB drives, or other flash-based storage devices.
JFS
IBM's high-performance journaling filesystem. JFS is a light, fast and reliable B+tree-based filesystem with good performance in various conditions.
ReiserFS
A B+tree-based journaled filesystem that has good overall performance, especially when dealing with many tiny files at the cost of more CPU cycles. ReiserFS appears to be less maintained than other filesystems.
XFS
A filesystem with metadata journaling which comes with a robust feature-set and is optimized for scalability. XFS seems to be less forgiving to various hardware problems.
vfat
Also known as FAT32, is supported by Linux but does not support any permission settings. It is mostly used for interoperability with other operating systems (mainly Microsoft Windows) but is also a necessity for some system firmware (like UEFI).
NTFS
This "New Technology" filesystem is the flagship filesystem of Microsoft Windows. Similar to vfat above it does not store permission settings or extended attributes necessary for BSD or Linux to function properly, therefore it cannot be used as a root filesystem. It should only be used for interoperability with Microsoft Windows systems (note the emphasis on only).

When using ext2, ext3, or ext4 on a small partition (less than 8GB), then the file system must be created with the proper options to reserve enough inodes. The mke2fs (mkfs.ext2) application uses the "bytes-per-inode" setting to calculate how many inodes a file system should have. On smaller partitions, it is advised to increase the calculated number of inodes.

Bei ext2 kann dies mit dem folgenden Befehl erfolgen:

root #mkfs.ext2 -T small /dev/<device>

Bei ext3 und ext4 fügen Sie die Option -j hinzu um Journaling zu aktivieren:

root #mkfs.ext2 -j -T small /dev/<device>

Dies vervierfacht die Zahl der Inodes für ein angegebenes Dateisystem in der Regel, da es dessen "bytes-per-inode" (Bytes pro Inode) von 16 kB auf 4 kB pro Inode reduziert. Durch die Angabe des Verhältnisses kann dies sogar weiter optimiert werden:

root #mkfs.ext2 -i <ratio> /dev/<device>

Dateisystem auf Partition anlegen

To create a filesystem on a partition or volume, there are user space utilities available for each possible filesystem. Click the filesystem's name in the table below for additional information on each filesystem:

Filesystem Creation command On minimal CD? Package
btrfs mkfs.btrfs Yes sys-fs/btrfs-progs
ext2 mkfs.ext2 Yes sys-fs/e2fsprogs
ext3 mkfs.ext3 Yes sys-fs/e2fsprogs
ext4 mkfs.ext4 Yes sys-fs/e2fsprogs
f2fs mkfs.f2fs Yes sys-fs/f2fs-tools
jfs mkfs.jfs Yes sys-fs/jfsutils
reiserfs mkfs.reiserfs Yes sys-fs/reiserfsprogs
xfs mkfs.xfs Yes sys-fs/xfsprogs
vfat mkfs.vfat Yes sys-fs/dosfstools
NTFS mkfs.ntfs Yes sys-fs/ntfs3g

For instance, to have the boot partition (/dev/sda1) in ext2 and the root partition (/dev/sda5) in ext4 as used in the example partition structure, the following commands would be used:

root #mkfs.ext2 /dev/sda1
root #mkfs.ext4 /dev/sda5

Erzeugen Sie nun die Dateisysteme auf den zuvor erzeugten Partitionen (oder logischen Laufwerken).

Activating the swap partition

mkswap is the command that is used to initialize swap partitions:

root #mkswap /dev/sda10

To activate the swap partition, use swapon:

root #swapon /dev/sda10

Erzeugen und aktivieren Sie jetzt die Swap-Partition mit den oben genannten Befehlen.

Einhängen

Now that the partitions are initialized and are housing a filesystem, it is time to mount those partitions. Use the mount command, but don't forget to create the necessary mount directories for every partition created. As an example we mount the root partition:

root #mount /dev/sda5 /mnt/gentoo
Notiz
Wenn sich /tmp/ auf einer separaten Partition befinden muss, ändern Sie die Berechtigungen nach dem Einhängen folgendermaßen:
root #chmod 1777 /mnt/gentoo/tmp
Dies gilt ebenfalls für /var/tmp.

In der Anleitung wird später das Dateisystem proc (eine virtuelle Schnittstelle zum Kernel) zusammen mit anderen Kernel-Pseudodateisystemen eingehängt. Zunächst installieren wir jedoch die Gentoo Installationsdateien.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Installation eines Stage-Tarballs

Datum und Uhrzeit einstellen

Before installing Gentoo, it is a good idea to be sure the date and time are set correctly. A mis-configured clock may lead to strange results: base system files should be extracted with accurate time stamps. In fact, due to several websites and services using encrypted communications (SSL/TLS), it might not be possible to download the installation files at all if the system clock is too far skewed!

Verify the current date and time by running the date command:

root #date
Mon Oct  3 13:16:22 PDT 2016

If the date/time displayed is wrong, update it using one of the methods below.

Notiz
Motherboards that do not include a Real-Time Clock (RTC) should be configured to automatically sync the system clock with a time server. This is also true for systems that do include a RTC, but have a failed battery.

Automatic

Official Gentoo installation media includes the ntpd command (available through the net-misc/ntp package). Official media includes a configuration file pointing to ntp.org time servers. It can be used to automatically sync the system clock to UTC time using a time server. Using this method requires a working network configuration and may not be available on all architectures.

Warnung
Automatic time sync comes at a price. It will reveal the system's IP address and related network information to a time server (in the case of the example below ntp.org). Users with privacy concerns should be aware of this before setting the system clock using the below method.
root #ntpd -q -g

Manual

The date command can also be used to perform a manual set on the system clock. Use the MMDDhhmmYYYY syntax (Month, Day, hour, minute and Year).

UTC time is recommended for all Linux systems. Later on during the installation a timezone will be defined. This will modify the display of the clock to local time.

For instance, to set the date to October 3rd, 13:16 in the year 2016:

root #date 100313162016

Choosing a stage tarball

Multilib (32 and 64-bit)

Choosing a base tarball for the system can save a considerable amount of time later on in the installation process, specifically when it is time to choose a system profile. The selection of a stage tarball will directly impact future system configuration and can save a headache or two later on down the line. The multilib tarball uses 64-bit libraries when possible, and only falls back to the 32-bit versions when necessary for compatibility. This is an excellent option for the majority of installations because it provides a great amount of flexibility for customization in the future. Those who desire their systems to be capable of easily switching profiles should download the multilib tarball option for their respective processor architecture.

Most users should not use the 'advanced' tarballs options; they are for specific software or hardware configurations.

No-multilib (pure 64-bit)

Selecting a no-multilib tarball to be the base of the system provides a complete 64-bit operating system environment. This effectively renders the ability to switch to multilib profiles improbable, but possible. Those who are just starting out with Gentoo should not choose a no-multilib tarball unless it is absolutely necessary.

Warnung
Be aware, migrating from a no-multilib to a multilib system requires an extremely well-working knowledge of Gentoo and the lower-level toolchain (it may even cause our Toolchain developers to shudder a little). It is not for the faint of heart and is beyond the scope of this guide.

Stage-Tarball herunterladen

Go to the Gentoo mount point where the root file system is mounted (most likely /mnt/gentoo):

root #cd /mnt/gentoo

Depending on the installation medium, the only tool necessary to download a stage tarball is a web browser.

Graphical browsers

Those using environments with fully graphical web browsers will have no problem copying a stage file URL from the main website's download section. Simply select the appropriate tab, right click the link to the stage file, then Copy link address (Firefox) or Copy link location (Chromium) to copy the link to the clipboard, then paste the link to the wget utility on the command-line to download the stage tarball:

root #wget <PASTED_STAGE_URL>

Command-line browsers

More traditional readers or 'old timer' Gentoo users, working exclusively from command-line may prefer using links, a non-graphical, menu-driven browser. To download a stage, surf to the Gentoo mirror list like so:

root #links https://www.gentoo.org/downloads/mirrors/

To use an HTTP proxy with links, pass on the URL with the -http-proxy option:

root #links -http-proxy proxy.server.com:8080 https://www.gentoo.org/downloads/mirrors/

Next to links there is also the lynx browser. Like links it is a non-graphical browser but it is not menu-driven.

root #lynx https://www.gentoo.org/downloads/mirrors/

If a proxy needs to be defined, export the http_proxy and/or ftp_proxy variables:

root #export http_proxy="http://proxy.server.com:port"
root #export ftp_proxy="http://proxy.server.com:port"

On the mirror list, select a mirror close by. Usually HTTP mirrors suffice, but other protocols are available as well. Move to the releases/mips/autobuilds/ directory. There all available stage files are displayed (they might be stored within subdirectories named after the individual sub-architectures). Select one and press d to download.

After the stage file download completes, it is possible to verify the integrity and validate the contents of the stage tarball. Those interested should proceed to the next section.

Those not interested in verifying and validating the stage file can close the command-line browser by pressing q and can move directly to the Unpacking the stage tarball section.

Verifying and validating

Notiz
Some tarballs are being delivered via xz compression. When downloading a tarball ending in .tar.xz, be sure to adjust the tarball filename from .tar.bz2 in the following commands.

Like with the minimal installation CDs, additional downloads to verify and validate the stage file are available. Although these steps may be skipped, these files are provided for users who care about the legitimacy of the file(s) they just downloaded.

  • A .CONTENTS file that contains a list of all files inside the stage tarball.
  • A .DIGESTS file that contains checksums of the stage file in different algorithms.
  • A .DIGESTS.asc file that, like the .DIGESTS file, contains checksums of the stage file in different algorithms, but is also cryptographically signed to ensure it is provided by the Gentoo project.

Use openssl and compare the output with the checksums provided by the .DIGESTS or .DIGESTS.asc files.

Zur Überprüfung der SHA512 Prüfsumme zum Beispiel:

root #openssl dgst -r -sha512 stage3-mips-<release>.tar.bz2

Another way is to use the sha512sum command:

root #sha512sum stage3-mips-<release>.tar.bz2

Zur Validierung der Whirlpool Prüfsumme:

root #openssl dgst -r -whirlpool stage3-mips-<release>.tar.bz2

Vergleichen Sie die Ausgabe dieser Befehle mit dem Wert der in den .DIGESTS(.asc) Dateien eingetragen ist. Die Werte müssen übereinstimmen, andernfalls ist möglicherweise die heruntergeladene Datei beschädigt (oder die DIGEST-Datei ist es).

Just like with the ISO file, it is also possible to verify the cryptographic signature of the .DIGESTS.asc file using gpg to make sure the checksums have not been tampered with:

root #gpg --verify stage3-mips-<release>.tar.bz2,.DIGESTS.asc

Stage-Tarball entpacken

Now unpack the downloaded stage onto the system. We use tar to proceed:

root #tar xpvf stage3-*.tar.bz2 --xattrs-include='*.*' --numeric-owner

Make sure that the same options (xpf and --xattrs-include='*.*') are used. The x stands for extract, the p for preserve permissions and the f to denote that we want to extract a file (not standard input). --xattrs-include='*.*' is to include preservation of the the extended attributes in all namespaces stored in the archive. Finally, --numeric-owner is used to ensure that the user and group IDs of the files being extracted from the tarball will remain the same as Gentoo's release engineering team intended (even if adventurous users are not using official Gentoo installation media).

Now that the stage file is unpacked, proceed with Configuring the compile options.

Compiler-Optionen konfigurieren

Einleitung

To optimize Gentoo, it is possible to set a couple of variables which impacts the behavior of Portage, Gentoo's officially supported package manager. All those variables can be set as environment variables (using export) but that isn't permanent. To keep the settings, Portage reads in the /etc/portage/make.conf file, a configuration file for Portage.

Notiz
A commented listing of all possible variables can be found in /mnt/gentoo/usr/share/portage/config/make.conf.example. For a successful Gentoo installation only the variables that are mentioned below need to be set.

Fire up an editor (in this guide we use nano) to alter the optimization variables we will discuss hereafter.

root #nano -w /mnt/gentoo/etc/portage/make.conf

From the make.conf.example file it is obvious how the file should be structured: commented lines start with "#", other lines define variables using the VARIABLE="content" syntax. Several of those variables are discussed next.

CFLAGS und CXXFLAGS

The CFLAGS and CXXFLAGS variables define the optimization flags for GCC C and C++ compilers respectively. Although those are defined generally here, for maximum performance one would need to optimize these flags for each program separately. The reason for this is because every program is different. However, this is not manageable, hence the definition of these flags in the make.conf file.

In make.conf one should define the optimization flags that will make the system the most responsive generally. Don't place experimental settings in this variable; too much optimization can make programs behave bad (crash, or even worse, malfunction).

We will not explain all possible optimization options. To understand them all, read the GNU Online Manual(s) or the gcc info page (info gcc - only works on a working Linux system). The make.conf.example file itself also contains lots of examples and information; don't forget to read it too.

A first setting is the -march= or -mtune= flag, which specifies the name of the target architecture. Possible options are described in the make.conf.example file (as comments). A commonly used value is native as that tells the compiler to select the target architecture of the current system (the one users are installing Gentoo on).

A second one is the -O flag (that is a capital O, not a zero), which specifies the gcc optimization class flag. Possible classes are s (for size-optimized), 0 (zero - for no optimizations), 1, 2 or even 3 for more speed-optimization flags (every class has the same flags as the one before, plus some extras). -O2 is the recommended default. -O3 is known to cause problems when used system-wide, so we recommend to stick to -O2.

Another popular optimization flag is -pipe (use pipes rather than temporary files for communication between the various stages of compilation). It has no impact on the generated code, but uses more memory. On systems with low memory, gcc might get killed. In that case, do not use this flag.

Using -fomit-frame-pointer (which doesn't keep the frame pointer in a register for functions that don't need one) might have serious repercussions on the debugging of applications.

When the CFLAGS and CXXFLAGS variables are defined, combine the several optimization flags in one string. The default values contained in the stage3 archive that is unpacked should be good enough. The following one is just an example:

CODE Example CFLAGS and CXXFLAGS variables
CFLAGS="-mabi=32 -mips4 -pipe -O2"
# Use the same settings for both variables
CXXFLAGS="${CFLAGS}"
Tip
Although the GCC optimization article has more information on how the various compilation options can affect a system, the Safe CFLAGS article may be a more practical place for beginners to start optimizing their systems.

MAKEOPTS

The MAKEOPTS variable defines how many parallel compilations should occur when installing a package. A good choice is the number of CPUs (or CPU cores) in the system plus one, but this guideline isn't always perfect.

CODE Example MAKEOPTS declaration in make.conf
MAKEOPTS="-j2"

Ready, set, go!

Update the /mnt/gentoo/etc/portage/make.conf file to match personal preference and save (nano users would hit Ctrl+X).

Then continue with Installing the Gentoo base system.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Chrooten

Optional: Spiegelserver wählen

Distributionsdateien

Um den Quellcode zügig herunterzuladen wird empfohlen einen schnellen Spiegel auszuwählen. Portage schaut in die Datei make.conf nach der Variable GENTOO_MIRRORS und verwendet darin aufgelistete Spiegel. Es ist möglich zur Gentoo Mirror Liste zu surfen und nach einem Spiegel (oder mehreren Spiegeln) zu suchen, die nahe dem Systemstandort liegen (da diese meistens die schnellsten sind). Allerdings bieten wir ein nettes Tool namens mirrorselect, das den Benutzern ein schönes Interface zur Auswahl der benötigten Spiegel bietet. Gehen Sie einfach zu den Spiegeln der Wahl und drücken Sie die Leertaste um einen oder mehrere Spiegel auszuwählen.

root #mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf

Gentoo ebuild repository

A second important step in selecting mirrors is to configure the Gentoo ebuild repository via the /etc/portage/repos.conf/gentoo.conf file. This file contains the sync information needed to update the package repository (the collection of ebuilds and related files containing all the information Portage needs to download and install software packages).

Configuring the repository can be done in a few simple steps. First, if it does not exist, create the repos.conf directory:

root #mkdir /mnt/gentoo/etc/portage/repos.conf

Dann kopieren Sie die von Portage bereitgestellte Gentoo-Repository-Konfigurationsdatei in das (neu erstellte) Verzeichnis repos.conf:

root #cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf

Schauen Sie sich ruhig die Datei mit einem Texteditor oder mit dem cat-Befehl an. Die Datei sollte ein .ini-Format haben und ungefähr so aussehen:

DATEI /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes

[gentoo] location = /usr/portage sync-type = rsync sync-uri = rsync://rsync.gentoo.org/gentoo-portage auto-sync = yes sync-rsync-verify-jobs = 1 sync-rsync-verify-metamanifest = yes sync-rsync-verify-max-age = 24 sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc sync-openpgp-key-refresh-retry-count = 40 sync-openpgp-key-refresh-retry-overall-timeout = 1200 sync-openpgp-key-refresh-retry-delay-exp-base = 2 sync-openpgp-key-refresh-retry-delay-max = 60 sync-openpgp-key-refresh-retry-delay-mult = 4

  1. for daily squashfs snapshots
  2. sync-type = squashdelta
  3. sync-uri = mirror://gentoo/../snapshots/squashfs

}}

The default sync-uri variable value listed above will determine a mirror location based on a rotation. This will aid in easing bandwidth stress on Gentoo's infrastructure and will provide a fail-safe in case a specific mirror is offline. It is recommended the default URI is retained unless a local, private Portage mirror will be used.

Tip
Falls Sie an Details interessiert sind, finden Sie die offizielle Spezifikation der Portage Sync-Plugin-API in einem Artikel des Portage-Projekts.

DNS-Info kopieren

Eine Sache bleibt noch zu tun bevor Sie die neue Umgebung betreten und das ist das Kopieren der DNS-Informationen in die Datei /etc/resolv.conf. Dies ist notwendig um sicherzustellen, dass das Netzwerk auch nach dem Betreten der neuen Umgebung immer noch funktioniert. /etc/resolv.conf beinhaltet die Namensserver des Netzwerks.

Zum Kopieren dieser Information ist es empfehlenswert beim Befehl cp die Option -L zu verwenden. Wenn /etc/resolv.conf ein symbolischer Link ist stellt dies sicher, dass die Zieldatei anstelle des symbolischen Links selbst kopiert wird. Andernfalls würde der symbolische Link auf eine nicht existierende Datei zeigen (weil das Link-Ziel höchstwahrscheinlich in der neuen Umgebung nicht verfügbar ist).

root #cp -L /etc/resolv.conf /mnt/gentoo/etc/

Notwendige Dateisysteme einhängen

In wenigen Augenblicken wird Linux root (/) auf den neuen Ort geändert werden. Um Sicherzustellen dass die neue Umgebung richtig arbeitet, müssen bestimmte Dateisysteme dort ebenfalls verfügbar gemacht werden.

Die Dateisysteme, die verfügbar gemacht werden müssen, sind:

  • /proc/ ist ein ein Pseudo-Dateisystem (Die beinhalteten Dateien sehen aus wie gewöhnliche Dateien, sie werden jedoch im laufenden Betrieb generiert). Der Kernel stellt hier der Umgebung Informationen zur Verfügung.
  • /sys/ ist ein Pseudo-Dateisystem wie /proc/ ist. Einst war es dafür gedacht, dieses zu ersetzen, und es ist besser strukturiert als /proc/.
  • /dev/ ist ein gewöhnliches Dateisystem, teilweise vom Linux Device Manager (normalerweise udev) verwaltet, das alle Gerätedateien enthält.

/proc/ wird an /mnt/gentoo/proc/ eingehängt (mount), wohingegen die anderen zwei über mount --rbind eingebunden werden. Das letztere bedeutet beispielsweise dass /mnt/gentoo/sys/ in Wirklichkeit /sys/ ist (es ist lediglich ein zweiter Einstiegspunkt zum selben Dateisystem), wohingegen /mnt/gentoo/proc/ ein neuer Einhängepunkt (sozusagen eine neue Instanz) des Dateisystems ist.

root #mount --types proc /proc /mnt/gentoo/proc
root #mount --rbind /sys /mnt/gentoo/sys
root #mount --make-rslave /mnt/gentoo/sys
root #mount --rbind /dev /mnt/gentoo/dev
root #mount --make-rslave /mnt/gentoo/dev
Notiz
Die --make-rslave Operationen werden für die spätere systemd Unterstützung bei der Installation benötigt.
Warnung
When using non-Gentoo installation media, this might not be sufficient. Some distributions make /dev/shm a symbolic link to /run/shm/ which, after the chroot, becomes invalid. Making /dev/shm/ a proper tmpfs mount up front can fix this:
root #test -L /dev/shm && rm /dev/shm && mkdir /dev/shm
root #mount --types tmpfs --options nosuid,nodev,noexec shm /dev/shm

Also ensure that mode 1777 is set:

root # chmod 1777 /dev/shm

Betreten der neuen Umgebung

Nun da alle Partitionen initialisiert sind und die Basis-Umgebung installiert ist, wird es Zeit die neue Installationsumgebung durch chroot zu betreten. Das bedeutet, dass die Sitzung ihr Wurzelverzeichnis (/) von der aktuellen Installationsumgebung (Installations-CD oder anderes Installationsmedium) zum Installationssystem (nämlich die initialisierten Partitionen) ändert. Daher der Name change root oder chroot.

Dieses Chrooten erfolgt in drei Schritten:

  1. Das Wurzelverzeichnis wird mit Hilfe von chroot von / (auf dem Installationsmedium) auf /mnt/gentoo/ (auf den Partitionen) geändert.
  2. Einige Einstellungen (jene in /etc/profile) werden über den Befehl source neu in den Speicher geladen.
  3. Die primäre Eingabeaufforderung wird geändert, damit wir nicht vergessen, dass diese Sitzung innerhalb einer chroot-Umgebung läuft.
root #chroot /mnt/gentoo /bin/bash
root #source /etc/profile
root #export PS1="(chroot) $PS1"

From this point, all actions performed are immediately on the new Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left!

Tip
If the Gentoo installation is interrupted anywhere after this point, it should be possible to 'resume' the installation at this step. There is no need to repartition the disks again! Simply mount the root partition and run the steps above starting with copying the DNS info to re-enter the working environment. This is also useful for fixing bootloader issues. More information can be found in the chroot article.

Mounting the boot partition

Now that the new environment has been entered, it is necessary to create and mount the /boot partition. This will be important when it is time to compile the kernel and install the bootloader:

root #mkdir /boot
root #mount /dev/sda1 /boot

Portage konfigurieren

Installing an ebuild repository snapshot from the web

Next step is to install a snapshot of the main ebuild repository. This snapshot contains a collection of files that informs Portage about available software titles (for installation), which profiles the system administrator can select, package or profile specific news items, etc.

The use of emerge-webrsync is recommended for those who are behind restrictive firewalls (because it uses HTTP/FTP protocols for downloading the snapshot) and saves network bandwidth. Readers who have no network or bandwidth restrictions can happily skip down to the next section.

This will fetch the latest snapshot (which is released on a daily basis) from one of Gentoo's mirrors and install it onto the system:

root #emerge-webrsync
Notiz
Während dieser Operation könnte sich emerge-webrsync über das Fehlen von /usr/portage/ beschweren. Dies ist zu erwarten und kein Grund zur Sorge - das Tool wird das Verzeichnis anlegen.

From this point onward, Portage might mention that certain updates are recommended to be executed. This is because system packages installed through the stage file might have newer versions available; Portage is now aware of new packages because of the repository snapshot. Package updates can be safely ignored for now; updates can be delayed after the Gentoo installation has finished.

Optional: Updating the Gentoo ebuild repository

It is possible to update the Gentoo ebuild repository to the latest version. The previous emerge-webrsync command will have installed a very recent snapshot (usually recent up to 24h) so this step is definitely optional.

Suppose there is a need for the last package updates (up to 1 hour), then use emerge --sync. This command will use the rsync protocol to update the Gentoo ebuild repository (which was fetched earlier on through emerge-webrsync) to the latest state.

root #emerge --sync

Auf langsamen Terminals, wie einigen Framebuffer- oder seriellen Konsolen, ist es empfehlenswert die Option --quiet zu nutzen, um den Vorgang zu beschleunigen:

root #emerge --sync --quiet

News Einträge lesen

When the Gentoo ebuild repository is synchronized to the system, Portage may warn the user with messages similar to the following:

CODE Portage informiert den Benutzer über Neuigkeiten
 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

News items were created to provide a communication medium to push critical messages to users via the rsync tree. To manage them, use eselect news. The eselect application is a Gentoo application that allows for a common management interface towards system changes and operations. In this case, eselect is asked to use its news module.

Im Modul news werden drei Operationen am meisten genutzt:

  • Mit list wird eine Übersicht der verfügbaren News-Einträge angezeigt.
  • Mit read können die News-Einträge gelesen werden.
  • Mit purge lassen sich News-Einträge löschen, sobald sie gelesen wurden. Ein erneutes Einlesen erfolgt nicht.
root #eselect news list
root #eselect news read

Mehr Informationen zum Newsreader sind über seine Manpage verfügbar:

root #man news.eselect

Auswahl des richtigen Profils

Warnung
Do not select any of the the 17.1 profiles until reading the corresponding 17.1 news item. This profile is experimental and requires special migration instructions.

A profile is a building block for any Gentoo system. Not only does it specify default values for USE, CFLAGS, and other important variables, it also locks the system to a certain range of package versions. These settings are all maintained by Gentoo's Portage developers.

Mit eselect können Sie sich anschauen, welches Profil das System momentan nutzt, diesmal mit dem Modul profile:

root #eselect profile list
Available profile symlink targets:
  [1]   default/linux/mips/13.0 *
  [2]   default/linux/mips/13.0/desktop
  [3]   default/linux/mips/13.0/desktop/gnome
  [4]   default/linux/mips/13.0/desktop/kde
Notiz
Die Ausgabe des Befehls ist nur ein Beispiel und kann sich im Laufe der Zeit ändern.

Wie Sie sehen können stehen ebenfalls Desktop-Unterprofile für einige Architekturen zur Verfügung.

Warnung
Profile upgrades are not to be taken lightly. When selecting the initial profile, make sure to use profile corresponding to the same version as the one initially used by stage3 (e.g. 13.0). Each new profile version is announced through a news item containing migration instructions. Make sure to read it and follow them before switching to a newer profile.

After viewing the available profiles for the mips architecture, users can select a different profile for the system:

root #eselect profile set 2



Notiz
The developer subprofile is specifically for Gentoo Linux development and is not meant to be used by casual users.

Updating the @world set

At this point, it is wise to update the system's @world set so that a base can be established.

This following step is necessary so the system can apply any updates or USE flag changes which have appeared since the stage3 was built and from any profile selection:

root #emerge --ask --verbose --update --deep --newuse @world
Tip
If a full scale desktop environment profile has been selected this process could greatly extend the amount of time necessary for the install process. Those in a time crunch can work by this 'rule of thumb': the shorter the profile name, the less specific the system's @world set; the less specific the @world set, the fewer packages the system will require. In other words:
  • selecting default/linux/amd64/13.0 will require very few packages to be updated, whereas
  • selecting default/linux/amd64/13.0/desktop/gnome/systemd will require many packages to be installed since the init system is changing from OpenRC to systemd, and the GNOME desktop environment framework will be installed.

USE Variable konfigurieren

USE is one of the most powerful variables Gentoo provides to its users. Several programs can be compiled with or without optional support for certain items. For instance, some programs can be compiled with support for GTK+ or with support for Qt. Others can be compiled with or without SSL support. Some programs can even be compiled with framebuffer support (svgalib) instead of X11 support (X-server).

Die meisten Distributionen kompilieren ihre Pakete mit Unterstützung für möglichst viel. Dies erhöht die Größe der Programme und verlängert die Programmstartzeit, nicht zu erwähnen die enorme Menge von Abhängigkeiten. Mit Gentoo können die Benutzer definieren mit welchen Optionen ein Paket kompiliert werden soll. Hier kommt USE ins Spiel.

In the USE variable users define keywords which are mapped onto compile-options. For instance, ssl will compile SSL support in the programs that support it. -X will remove X-server support (note the minus sign in front). gnome gtk -kde -qt4 -qt5 will compile programs with GNOME (and GTK+) support, and not with KDE (and Qt) support, making the system fully tweaked for GNOME (if the architecture supports it).

Die Standard-USE-Einstellungen befinden sich in den make.defaults Dateien des Gentoo-Profils, das das System verwendet. Gentoo benutzt ein (komplexes) Vererbungssystem für seine Profile, in das wir in dieser Phase nicht eintauchen wollen. Der einfachste Weg die momentan aktiven USE Einstellungen zu überprüfen ist emerge --info auszuführen und die Zeile auszuwählen, die mit USE beginnt:

root #emerge --info | grep ^USE
USE="X acl alsa amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri ..."
Notiz
Das obige Beispiel ist verkürzt, die tatsächliche Liste der USE-Werte ist viel viel länger.

Eine vollständige Beschreibung der verfügbaren USE-Flags finden Sie auf dem System in der Datei /usr/portage/profiles/use.desc.

root #less /usr/portage/profiles/use.desc

Innerhalb des Befehls less können Sie mit Hilfe der Tasten und scrollen. Zum Beenden drücken Sie q.

As an example we show a USE setting for a KDE-based system with DVD, ALSA, and CD recording support:

root #nano -w /etc/portage/make.conf
DATEI /etc/portage/make.confEnabling USE for a KDE-based system with DVD, ALSA and CD recording support
USE="-gtk -gnome qt4 qt5 kde dvd alsa cdr"

Wenn USE in /etc/portage/make.conf definiert ist, dann wird ein bestimmtes USE-Flag zur Standard Liste hinzugefügt (oder davon entfernt, wenn das USE-Flag mit dem Zeichen - beginnt). Benutzer die alle Standard-USE-Einstellungen ignorieren wollen und sie komplett selbst verwalten möchten, sollten die USE-Definition in make.conf mit -* beginnen:

DATEI /etc/portage/make.confIgnoring default USE flags
USE="-* X acl alsa"
Warnung
Although possible, setting -* (as seen in the example above) is discouraged as carefully chosen USE flag defaults may be configured in some ebuilds to prevent conflicts and other errors.


Zeitzone

Wählen Sie die Zeitzone für das System. Schauen Sie nach den verfügbaren Zeitzonen in /usr/share/zoneinfo/ und schreiben Sie die die zu verwendende in die Datei /etc/timezone.

root #ls /usr/share/zoneinfo

Angenommen die Zeitzone der Wahl ist Europe/Brussels:

root #echo "Europe/Brussels" > /etc/timezone

Bitte vermeiden Sie die /usr/share/zoneinfo/Etc/GMT* Zeitzonen, da deren Namen nicht die erwarteten Zonen anzeigen. Beispielsweise ist GMT-8 in der Tat GMT+8.

Als Nächstes konfigurieren Sie das Paket sys-libs/timezone-data neu. Dies wird für uns abhängig vom Eintrag in der Datei /etc/timezone die Datei /etc/localtime aktualisieren. Die Datei /etc/localtime wird von der System C Bibliothek verwendet um zu erfassen in welcher Zeitzone sich das System befindet.

root #emerge --config sys-libs/timezone-data

Konfiguration der Locale

Die meisten Benutzer werden nur ein oder zwei Locale auf ihrem System verwenden.

Locales specify not only the language that the user should use to interact with the system, but also what the rules are for sorting strings, displaying dates and times, etc.

Die Locale, die ein System unterstützen soll, sollten in der Datei /etc/locale.gen aufgeführt sein.

root #nano -w /etc/locale.gen

Die folgenden Locale sind ein Beispiel um Englisch (Vereinigte Staaten) und Deutsch (Deutschland) mit den zugehörigen Zeichenformaten (wie UTF-8) zu bekommen.

DATEI /etc/locale.genEnabling US and DE locales with the appropriate character formats
en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
Warnung
Wir empfehlen die Verwendung von mindestens einem UTF-8 Locale weil einige Anwendungen dies möglicherweise erfordern.

Der nächste Schritt ist locale-gen auszuführen. Dies wird alle Locales erzeugen, die in der Datei /etc/locale.gen angegeben sind.

root #locale-gen

Um zu überprüfen, dass die ausgewählten Locales jetzt verfügbar sind, führen Sie locale -a aus.

Sobald Sie das erledigt haben, ist es Zeit, die systemweiten Locale-Einstellungen vorzunehmen. Wir verwenden wieder eselect dafür, diesmal mit dem Modul locale.

Mit eselect locale list werden die verfügbaren Ziele angezeigt:

root #eselect locale list
Available targets for the LANG variable:
  [1] C
  [2] POSIX
  [3] en_US
  [4] en_US.iso88591
  [5] en_US.utf8
  [6] de_DE
  [7] de_DE.iso88591
  [8] de_DE.iso885915
  [9] de_DE.utf8
  [ ] (free form)

Mit eselect locale set WERT kann die richtige Locale eingestellt werden:

root #eselect locale set 9

Manuell kann dies auch durch die Datei /etc/env.d/02locale erreicht werden:

DATEI /etc/env.d/02localeSystem Locale Definitionen manuell einstellen
LANG="de_DE.UTF-8"
LC_COLLATE="C"

Stellen Sie sicher dass ein Locale eingestellt ist, da das System andernfalls Warnungen und Fehler während des Bau des Kernels und bei anderem Softwareeinsatz später bei der Installation ausgibt.

Laden Sie jetzt die Umgebung erneut:

root #env-update && source /etc/profile && export PS1="(chroot) $PS1"

Wir haben einen vollständigen Lokalisierungs-Leitfaden erstellt, um die Benutzer durch diesen Prozess zu leiten. Ein weiterer interessanter Artikel ist der UTF-8-Leitfaden für sehr spezifische Informationen zum Aktivieren von UTF-8 auf dem System.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Installation der Quellen

Der Kern um den herum alle Distributionen gebaut sind ist der Linux Kernel. Er ist die Schicht zwischen den Benutzerprogrammen und der Systemhardware. Gentoo bietet seinen Benutzern verschiedene mögliche Kernel-Quellen. Eine komplette Liste mit Beschreibung finden Sie auf der Kernel Übersichtsseite.

For mips-based systems Gentoo recommends the sys-kernel/mips-sources package.

Choose an appropriate kernel source and install it using emerge:

root #emerge --ask sys-kernel/mips-sources

Dies installiert die Quellen des Linux Kernel im Verzeichnis /usr/src/, in welchem der symbolischer Link namens linux auf die installierten Kernel-Quellen zeigt:

root #ls -l /usr/src/linux
lrwxrwxrwx    1 root   root    12 Oct 13 11:04 /usr/src/linux -> linux-3.16.5-gentoo

Now it is time to configure and compile the kernel sources. There are two approaches for this:

  1. The kernel is manually configured and built.
  2. A tool called genkernel is used to automatically build and install the Linux kernel.

Wir erklären hier die manuelle Konfiguration als Standardwahl, weil dies der beste Weg ist die Umgebung zu optimieren.

Standard: Manuelle Konfiguration

Einleitung

Manually configuring a kernel is often seen as the most difficult procedure a Linux user ever has to perform. Nothing is less true - after configuring a couple of kernels no-one even remembers that it was difficult ;)

However, one thing is true: it is vital to know the system when a kernel is configured manually. Most information can be gathered by emerging sys-apps/pciutils which contains the lspci command:

root #emerge --ask sys-apps/pciutils
Notiz
Inside the chroot, it is safe to ignore any pcilib warnings (like pcilib: cannot open /sys/bus/pci/devices) that lspci might throw out.

Another source of system information is to run lsmod to see what kernel modules the installation CD uses as it might provide a nice hint on what to enable.

Now go to the kernel source directory and execute make menuconfig. This will fire up menu-driven configuration screen.

root #cd /usr/src/linux
root #make menuconfig

Die Linux Kernel-Konfiguration hat viele, viele Abschnitte. Wir listen zunächst einige Optionen auf, die aktiviert werden müssen (ansonsten wird Gentoo nicht funktionieren, oder ohne zusätzliche Veränderungen nicht richtig funktionieren). Wir haben im Gentoo Wiki auch einen Gentoo Kernel-Konfigurationsleitfaden, der weiterhelfen könnte.

Aktivieren der benötigten Optionen

Make sure that every driver that is vital to the booting of the system (such as SCSI controller, etc.) is compiled in the kernel and not as a module, otherwise the system will not be able to boot completely.

Next select the exact processor type. It is also recommended to enable MCE features (if available) so that users are able to be notified of any hardware problems. On some architectures (such as x86_64), these errors are not printed to dmesg, but to /dev/mcelog. This requires the app-admin/mcelog package.

Also select Maintain a devtmpfs file system to mount at /dev so that critical device files are already available early in the boot process (CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT):

KERNEL Enabling devtmpfs support
Device Drivers --->
  Generic Driver Options --->
    [*] Maintain a devtmpfs filesystem to mount at /dev
    [ ]   Automount devtmpfs at /dev, after the kernel mounted the rootfs

Verify SCSI disk support has been activated (CONFIG_BLK_DEV_SD):

KERNEL Enabling SCSI disk support
Device Drivers --->
   SCSI device support  --->
      <*> SCSI disk support

Now go to File Systems and select support for the filesystems you use. Don't compile the file system that is used for the root filesystem as module, otherwise the Gentoo system will not be able to mount the partition. Also select Virtual memory and /proc file system. Select one or more of the following options as needed by the system (CONFIG_EXT2_FS, CONFIG_EXT3_FS, CONFIG_EXT4_FS, CONFIG_MSDOS_FS, CONFIG_VFAT_FS, CONFIG_PROC_FS, and CONFIG_TMPFS):

KERNEL Selecting necessary file systems
File systems --->
  <*> Second extended fs support
  <*> The Extended 3 (ext3) filesystem
  <*> The Extended 4 (ext4) filesystem
  <*> Reiserfs support
  <*> JFS filesystem support
  <*> XFS filesystem support
  <*> Btrfs filesystem support
  DOS/FAT/NT Filesystems  --->
    <*> MSDOS fs support
    <*> VFAT (Windows-95) fs support
 
Pseudo Filesystems --->
    [*] /proc file system support
    [*] Tmpfs virtual memory file system support (former shm fs)

If PPPoE is used to connect to the Internet, or a dial-up modem, then enable the following options (CONFIG_PPP, CONFIG_PPP_ASYNC, and CONFIG_PPP_SYNC_TTY):

KERNEL Selecting PPPoE necessary drivers
Device Drivers --->
  Network device support --->
    <*> PPP (point-to-point protocol) support
    <*>   PPP support for async serial ports
    <*>   PPP support for sync tty ports

Die beiden Komprimierungsoptionen schaden nicht, aber werden definitiv nicht benötigt. Ebenso wie die PPP over Ethernet Option, die vielleicht nur PPP verwendet, wenn Kernel-Mode PPPoE verwendet wird.

Vergessen Sie nicht die Unterstützung von Netzwerkkarten (Ethernet oder Wireless-LAN) im Kernel.

Most systems also have multiple cores at their disposal, so it is important to activate Symmetric multi-processing support (CONFIG_SMP):

KERNEL Activating SMP support
Processor type and features  --->
  [*] Symmetric multi-processing support
Notiz
In Mehrkernsystemen zählt jeder Kern als ein Prozessor.

If USB input devices (like keyboard or mouse) or other USB devices will be used, do not forget to enable those as well (CONFIG_HID_GENERIC and CONFIG_USB_HID, CONFIG_USB_SUPPORT, CONFIG_USB_XHCI_HCD, CONFIG_USB_EHCI_HCD, CONFIG_USB_OHCI_HCD):

KERNEL Activating USB support for input devices
Device Drivers --->
  HID support  --->
    -*- HID bus support
    <*>   Generic HID driver
    [*]   Battery level reporting for HID devices
      USB HID support  --->
        <*> USB HID transport layer
  [*] USB support  --->
    <*>     xHCI HCD (USB 3.0) support
    <*>     EHCI HCD (USB 2.0) support
    <*>     OHCI HCD (USB 1.1) support


Vorbereitung der Konfiguration

Wichtig
Auf dem Origin 200/2000, Indigo2 Impact (R10000), Octane/Octane2 und O2 wird ein 64-Bit Kernel zum Booten dieser Systeme benötigt. emergen Sie sys-devel/kgcc64 für diese Maschinen, um einen Cross-Compiler zum Bau von 64-Bit Kernels zu erzeugen.

Viele der unterstützten Systeme haben Beispiel .configs, die sich in den Kernel-Quellen verstecken. Nicht alle Systeme haben Konfigurationen, die auf diese Weise verteilt werden. Diejenigen bei denen das aber so ist, können durch Verwendung der in der Tabelle unten aufgeführten Befehle konfiguriert werden.

System Configure command
Cobalt Servers make cobalt_defconfig
Indy, Indigo2 (R4k), Challenge S make ip22_defconfig
Origin 200/2000 make ip27_defconfig
Indigo2 Impact (R10k) make ip28_defconfig
O2 make ip32_defconfig

All of the Gentoo installation images provide a kernel config option as part of the image itself, accessible as /proc/config.gz. This may be used in many cases. It is best though if the kernel source matches closely the kernel that is currently running. To extract it, simply run it through zcat as shown below.

root #zcat /proc/config.gz > .config
Wichtig
This kernel config is set up for a netboot image. That is, it will expect to find a root filesystem image somewhere nearby, either as a directory for initramfs, or a loopback device for initrd. When executing make menuconfig, don't forget to go into General Setup and disable the options for initramfs.

Anpassen der Konfiguration

Once a configuration is found, download it into the kernel source directory, and rename it to .config. From there, run make oldconfig to bring everything up to date according to the instructions above, and customize the configuration before compiling.

root #cd /usr/src/linux
root #cp /path/to/example-config .config
root #make oldconfig

Just press the ENTER (or Return) key at each prompt to accept the defaults for now ...

root #make menuconfig
Wichtig
In the Kernel Hacking section, there is an option named "Are You Using A Cross Compiler?". This tells the kernel Makefiles to prepend "mips-linux-" (or mipsel-linux ... etc) to gcc and as commands when compiling the kernel. This should be turned off, even if cross-compiling. Instead, if a cross-compiler needs to be called, specify the prefix using the CROSS_COMPILE variable as shown in the next section.
Wichtig
Es gibt auf Octane Systemen ein bekanntes Problem mit JFS und ALSA, auf denen ALSA nicht funktioniert. Angesichts des experimentellen Charakters von JFS auf MIPS wird zurzeit empfohlen die Nutzung von JFS zu vermeiden.

Kompilieren und installieren

Mit beendeter Konfiguration ist es an der Zeit den Kernel zu kompilieren und zu installieren. Schließen Sie die Konfiguration und starten Sie den Kompiliervorgang:

Notiz
Geben Sie auf 64-Bit Maschinen CROSS_COMPILE=mips64-unknown-linux-gnu- (oder auf Little-Endian Systemen mips64el-...) an, um den 64-Bit Compiler zu nutzen.

Um nativ zu kompilieren:

root #make vmlinux modules modules_install

Passen Sie das "mips64-unknown-linux-gnu-" zur Cross-Kompilierung für den Zielcomputer entsprechend an:

root #make vmlinux modules modules_install CROSS_COMPILE=mips64-unknown-linux-gnu-

Wenn Sie auf einer anderen Maschine kompilieren (wie beispielsweise einem x86 Rechner), verwenden Sie die folgenden Befehle um den Kernel zu kompilieren und die Module in ein bestimmtes Verzeichnis zu installieren zur Übertragung auf die Zielmaschine.

root #make vmlinux modules CROSS_COMPILE=mips64-unknown-linux-gnu-
root #make modules_install INSTALL_MOD_PATH=/somewhere
Wichtig
Wenn Sie einen 64-Bit Kernel für den Indy, Indigo2 (R4k), Challenge S und O2 kompilieren, verwenden Sie anstelle von vmlinux das vmlinux.32 Target. Ansonsten wird die Maschine nicht booten können. Dies ist ein Workaround des Problems, das das PROM nicht das ELF64 Format versteht.
root #make vmlinux.32
Notiz
It is possible to enable parallel builds using make -jX with X being the number of parallel tasks that the build process is allowed to launch. This is similar to the instructions about /etc/portage/make.conf earlier, with the MAKEOPTS variable.

Die Zeilen oben erzeugen vmlinux.32, das der finale Kernel ist.

Wenn der Kernel mit dem Kompilieren fertig ist, kopieren Sie das Kernel Abbild nach /boot/.

Notiz
Der Bootloader auf Cobaltservern erwartet ein komprimiertes Kernel Abbild. Denken Sie daran die Datei mit gzip -9 zu komprimieren, sobald Sie sich im Verzeichnis /boot/ befindet.
root #cp vmlinux /boot/kernel-3.16.5-gentoo

Für Cobaltserver komprimieren Sie das Kernel Abbild:

root #gzip -9v /boot/kernel-3.16.5-gentoo


Optional: initramfs bauen

In bestimmten Fällen ist es notwendig ein initramfs (Ausgangsdateisystem im Arbeitsspeicher) zu bauen. Der häufigste Grund dafür ist wenn wichtige Dateisystemorte (wie /usr/ oder /var/) auf separaten Partitionen liegen. Mit einem initramfs können diese Partition, mit Hilfe der Werkzeuge die im initramfs Verfügbar sind, eingehängt werden.

Ohne initramfs besteht ein großes Risiko, dass das System nicht richtig bootet, da die Werkzeuge die für das Einhängen der Dateisysteme verantwortlich sind Informationen benötigen, die sich auf diesen Dateisystemen befinden. Ein initramfs zieht die notwendigen Dateien in ein Archiv, welches direkt nachdem der Kernel bootet genutzt wird, aber noch bevor die Kontrolle an das init Tool übergeben wird. Skripte auf dem initramfs stellen dann sicher, dass die Partitionen richtig eingehängt sind, bevor das System mit dem Booten fortfährt.

Zur Installation eines initramfs installieren Sie zunächst das Paket sys-kernel/genkernel. Im Anschluss daran lassen Sie dem Tool ein initramfs erzeugen:

root #emerge --ask sys-kernel/genkernel
root #genkernel --install initramfs

In order to enable specific support in the initramfs, such as LVM or RAID, add in the appropriate options to genkernel. See genkernel --help for more information. In the next example support is enabled for LVM and software RAID (mdadm):

root #genkernel --lvm --mdadm --install initramfs

Das initramfs wird in /boot/ gespeichert. Die resultierende Datei kann einfach durch Auflisten der mit initramfs beginnenden Dateien gefunden werden:

root #ls /boot/initramfs*

Fahren Sie nun beim Abschnitt Kernel-Module fort.

Alternative: genkernel verwenden

If a manual configuration looks too daunting, then using genkernel is recommended. It will configure and build the kernel automatically.

genkernel works by configuring a kernel nearly identically to the way the installation CD kernel is configured. This means that when genkernel is used to build the kernel, the system will generally detect all hardware at boot-time, just like the installation CD does. Because genkernel doesn't require any manual kernel configuration, it is an ideal solution for those users who may not be comfortable compiling their own kernels.

Schauen wir uns nun an, wie man genkernel verwendet. Installieren Sie als erstes das Pakel sys-kernel/genkernel:

root #emerge --ask sys-kernel/genkernel

Next, edit the /etc/fstab file so that the line containing /boot/ as second field has the first field pointing to the right device. If the partitioning example from the handbook is followed, then this device is most likely /dev/sda1 with the ext2 file system. This would make the entry in the file look like so:

root #nano -w /etc/fstab
DATEI /etc/fstabConfiguring the /boot mountpoint
/dev/sda1	/boot	ext2	defaults	0 2
Notiz
Further in the Gentoo installation, /etc/fstab will be configured again. The /boot setting is needed right now as the genkernel application reads in this configuration.

Now, compile the kernel sources by running genkernel all. Be aware though, as genkernel compiles a kernel that supports almost all hardware, this compilation will take quite a while to finish!

Notiz
If the boot partition doesn't use ext2 or ext3 as filesystem it might be necessary to manually configure the kernel using genkernel --menuconfig all and add support for this particular filesystem in the kernel (i.e. not as a module). Users of LVM2 will probably want to add --lvm as an argument as well.
root #genkernel all

Sobald genkernel beendet ist, wird ein Kernel, ein voller Satz Module und ein initial ram filesystem (initramfs) erstellt werden. Wir verwenden den Kernel und die initrd bei der Konfiguration des Boot-Loader später in dieser Anleitung. Schreiben Sie sich die Namen des Kernels und der initrd auf, da Sie diese Information benötigen, wenn die Boot-Loader Konfigurationsdatei bearbeitet wird. Die initrd wird sofort nach dem Booten gestartet um die automatische Hardware-Erkennung durchzuführen (wie bei der Installations-CD) bevor das "richtige" System startet.

root #ls /boot/kernel* /boot/initramfs*

Kernel-Module

Konfiguration der Module

Notiz
Hardware modules are optional to be listed manually. udev will normally load all hardware modules that are detected to be connected in most cases. However, it is not harmful for automatically detected modules to be listed. Sometimes exotic hardware requires help to load their drivers.

Listen Sie die Module, die automatisch geladen werden sollen, in der Datei /etc/conf.d/modules auf. Zusätzliche Optionen können Sie den Modulen ebenfalls hinzufügen, wenn nötig.

To view all available modules, run the following find command. Don't forget to substitute "<kernel version>" with the version of the kernel just compiled:

root #find /lib/modules/<Kernelversion>/ -type f -iname '*.o' -or -iname '*.ko' | less

Um beispielsweise automatisch das Modul 3c59x.ko zu laden (das der Treiber für eine bestimmte 3Com Netzwerkkartenfamilie ist), bearbeiten Sie die Datei /etc/conf.d/modules und geben den Modulnamen ein.

root #mkdir -p /etc/modules-load.d
root #nano -w /etc/modules-load.d/network.conf
DATEI /etc/modules-load.d/network.confForce loading 3c59x module
3c59x

Setzten Sie die Installation mit der Konfiguration des Systems fort.

Optional: Firmware installieren

Einige Treiber benötigen die Installation von zusätzlicher Firmware auf dem System, bevor sie funktionieren. Dies ist häufig bei Netzwerkkarten, im Besonderen bei WLAN Netzwerkkarten der Fall. Die meiste Firmware befindet sich im Paket sys-kernel/linux-firmware:

root #emerge --ask sys-kernel/linux-firmware




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Dateisysteminformationen

Über fstab

Unter Linux müssen alle Partitionen, die im System genutzt werden, in /etc/fstab aufgelistet werden. Diese Datei beinhaltet die Mountpunkte ("Einhängepunkte", also wo sie im Dateisystem erscheinen) dieser Partitionen, wie sie eingehängt werden sollen und mit welchen speziellen Optionen (automatisch einhängen oder nicht, können Benutzer sie einhängen, etc.)

fstab erstellen

Die Datei /etc/fstab verwendet eine tabellenartige Syntax. Jede Zeile besteht aus sechs Feldern, die jeweils von Leerräumen (Leerzeichen, Tabulatoren oder beides gemischt). Jedes Feld besitzt seine eigene Bedeutung:

  1. Das erste Feld beinhaltet die Partition, die diese Zeile beschreibt (den Pfad zur Gerätedatei)
  2. Das zweite Feld zeigt den Einhängepunkt, an dem die Partition eingehängt werden soll
  3. Das dritte Feld zeigt das Dateisystem der Partition
  4. Im vierten Feld stehen die Einhängeoptionen, die von mount genutzt werden, wenn Partitionen eingehängt werden. Da jedes Dateisystem seine eigenen Optionen hat, empfiehlt sich ein Blick in die Manpage (man mount), wo sich eine vollständige Liste findet. Mehrere Einhängeoptionen werden mit Kommata getrennt.
  5. Das fünfte Feld wird von dump verwendet, um herauszufinden ob die Partition in einem Dump-Backup berücksichtigt werden soll. Dieser Eintrag kann üblicherweise auf 0 (null) belassen werden.
  6. Das sechste Feld wird von fsck verwendet, um die Reihenfolge festzulegen, in der Dateisysteme nach einem unsauberen Neustart überprüft werden. Das root-Dateisystem (/) sollte hier 1 steheh haben, alle anderen Dateisysteme 2 (oder 0, wenn eine Dateisystemprüfung nicht nötig ist.)
Wichtig
The default /etc/fstab file provided by Gentoo is not a valid fstab file but instead more of a template.
root #nano -w /etc/fstab

In the remainder of the text, we use the default /dev/sd* block device files as partition.

Filesystem labels and UUIDs

Both MBR (BIOS) and GPT include support for filesystem labels and filesystem UUIDs. These attributes can be defined in /etc/fstab as alternatives for the mount command to use when attempting to find and mount block devices. Filesystem labels and UUIDs are identified by the LABEL and UUID prefix and can be viewed with the blkid command:

root #blkid
Warnung
If the filesystem inside a partition is wiped, then the filesystem label and the UUID values will be subsequently altered or removed.

Because of uniqueness, readers that are using an MBR-style partition table are recommended to use UUIDs over labels to define mountable volumes in /etc/fstab.

Partition labels and UUIDs

Users who have gone the GPT route have a couple more 'robust' options available to define partitions in /etc/fstab. Partition labels and partition UUIDs can be used to identify the block device's individual partition(s), regardless of what filesystem has been chosen for the partition itself. Partition labels and UUIDs are identified by the PARTLABEL and PARTUUID prefixes respectively and can be viewed nicely in the terminal by running the blkid command:

root #blkid

While not always true for partition labels, using a UUID to identify a partition in fstab provides a guarantee that the bootloader will not be confused when looking for a certain volume, even if the filesystem would be changed in the future. Using the older default block device files (/dev/sd*N) for defining the partitions in fstab is risky for systems that are restarted often and have SATA block devices added and removed regularly.

The naming for block device files depends on a number of factors, including how and in what order the disks are attached to the system. They also could show up in a different order depending on which of the devices are detected by the kernel first during the early boot process. With this being stated, unless one intends to constantly fiddle with the disk ordering, using default block device files is a simple and straightforward approach.


Let us take a look at how to write down the options for the /boot/ partition. This is just an example, and should be modified according to the partitioning decisions made earlier in the installation. In our mips partitioning example, /boot/ is usually the /dev/sda1 partition, with ext2 as filesystem. It needs to be checked during boot, so we would write down:

DATEI /etc/fstabAn example /boot line for /etc/fstab
/dev/sda1   /boot     ext2    defaults        0 2

Some users don't want their /boot/ partition to be mounted automatically to improve their system's security. Those people should substitute defaults with noauto. This does mean that those users will need to manually mount this partition every time they want to use it.

Add the rules that match the previously decided partitioning scheme and append rules for devices such as CD-ROM drive(s), and of course, if other partitions or drives are used, for those too.

Below is a more elaborate example of an /etc/fstab file:


DATEI /etc/fstabA full /etc/fstab example
/dev/sda1   /boot        ext2    defaults,noatime     0 2
/dev/sda10   none         swap    sw                   0 0
/dev/sda5   /            ext4    noatime              0 1
  
/dev/cdrom  /mnt/cdrom   auto    noauto,user          0 0

When auto is used in the third field, it makes the mount command guess what the filesystem would be. This is recommended for removable media as they can be created with one of many filesystems. The user option in the fourth field makes it possible for non-root users to mount the CD.

To improve performance, most users would want to add the noatime mount option, which results in a faster system since access times aren't registered (those are not needed generally anyway). This is also recommended for solid state drive (SSD) users, who should also enable the discard mount option (ext4 and btrfs only for now) which makes the TRIM command work.

Double-check the /etc/fstab file, save and quit to continue.

Netzwerkinformationen

Host- und Domäneninformationen

Eine der Entscheidungen, die Benutzer treffen müssen, ist der Name des PC. Auf den ersten Blick scheint dies einfach zu sein, aber viele Benutzer haben Schwierigkeiten einen passenden Namen für ihren Linux-PC zu finden. Um diesen Prozess zu beschleunigen, sei darauf hingewiesen dass der Name später wieder geändert werden kann. In den folgenden Beispielen wird der Hostname "tux" in der Domäne "homenetwork" verwendet.

root #nano -w /etc/conf.d/hostname
# Die Variable "hostname" auf den gewählten Hostnamen setzen
hostname="tux"

Anschließend, wenn ein Domänenname benötigt wird, setzen Sie diesen in /etc/conf.d/net. Dies ist nur nötig, wenn Ihr Provider oder Netzwerkadministrator dies verlangen, oder wenn das Netzwerk einen DNS-Server besitzt, aber keinen DHCP-Server. Sie können DNS oder Domänennamen ignorieren, wenn das System DHCP für die Zuweisung dynamischer IP-Adressen und Netzwerkkonfiguration verwendet wird.

Notiz
Die Datei /etc/conf.d/net wird nicht mitgeliefert, Sie müssen sie daher erstellen.
root #nano -w /etc/conf.d/net
# Setzen Sie die dns_domain-Variable auf Ihren Domainnamen
dns_domain_lo="homenetwork"
Notiz
Wenn Sie sich dafür entscheiden, keinen Domainnamen zu setzen, können Sie die "This is hostname.(none)" Nachrichten am Anmeldebildschirm loswerden, indem Sie /etc/issue editieren. Entfernen Sie einfach den String .\O aus dieser Datei.

If a NIS domain is needed (users that do not know this will not need one), define that one too:

root #nano -w /etc/conf.d/net
# Set the nis_domain_lo variable to the selected NIS domain name
nis_domain_lo="my-nisdomain"
Notiz
For more information on configuring DNS and NIS, please read the examples provided in /usr/share/doc/netifrc-*/net.example.bz2 which can be read using bzless. Also, it might be interesting to install net-dns/openresolv to help manage the DNS/NIS setup.

Configuring the network

During the Gentoo Linux installation, networking was already configured. However, that was for the installation CD itself and not for the installed environment. Right now, the network configuration is made for the installed Gentoo Linux system.

Notiz
More detailed information about networking, including advanced topics like bonding, bridging, 802.1Q VLANs or wireless networking is covered in the Gentoo Network Configuration section.

All networking information is gathered in /etc/conf.d/net. It uses a straightforward yet perhaps not intuitive syntax. But don't fear, everything is explained below. A fully commented example that covers many different configurations is available in /usr/share/doc/netifrc-*/net.example.bz2.

First install net-misc/netifrc:

root #emerge --ask --noreplace net-misc/netifrc

DHCP is used by default. For DHCP to work, a DHCP client needs to be installed. This is described later in Installing Necessary System Tools.

If the network connection needs to be configured because of specific DHCP options or because DHCP is not used at all, then open /etc/conf.d/net:

root #nano -w /etc/conf.d/net

Set both config_eth0 and routes_eth0 to enter IP address information and routing information:

Notiz
This assumes that the network interface will be called eth0. This is, however, very system dependent. It is recommended to assume that the interface is named the same as the interface name when booted from the installation media if the installation media is sufficiently recent. More information can be found in Network Interface Naming.
DATEI /etc/conf.d/netStatic IP definition
config_eth0="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255"
routes_eth0="default via 192.168.0.1"

To use DHCP, define config_eth0:

DATEI /etc/conf.d/netDHCP definition
config_eth0="dhcp"

Please read /usr/share/doc/netifrc-*/net.example.bz2 for a list of all available options. Be sure to also read up on the DHCP client man page if specific DHCP options need to be set.

If the system has several network interfaces, then repeat the above steps for config_eth1, config_eth2, etc.

Now save the configuration and exit to continue.

Automatically start networking at boot

To have the network interfaces activated at boot, they need to be added to the default runlevel.

root #cd /etc/init.d
root #ln -s net.lo net.eth0
root #rc-update add net.eth0 default

If the system has several network interfaces, then the appropriate net.* files need to be created just like we did with net.eth0.

If after booting the system we find out that the assumption about the network interface name (which is currently documented as eth0) was wrong, then execute the following steps to rectify this:

  1. Update the /etc/conf.d/net file with the correct interface name (like enp3s0 instead of eth0).
  2. Create new symbolic link (like /etc/init.d/net.enp3s0).
  3. Remove the old symbolic link (rm /etc/init.d/net.eth0).
  4. Add the new one to the default runlevel.
  5. Remove the old one using rc-update del net.eth0 default.

The hosts file

Next inform Linux about the network environment. This is defined in /etc/hosts and helps in resolving host names to IP addresses for hosts that aren't resolved by the nameserver.

root #nano -w /etc/hosts
DATEI /etc/hostsFilling in the networking information
# This defines the current system and must be set
127.0.0.1     tux.homenetwork tux localhost
  
# Optional definition of extra systems on the network
192.168.0.5   jenny.homenetwork jenny
192.168.0.6   benny.homenetwork benny

Save and exit the editor to continue.

Optional: Get PCMCIA working

PCMCIA users should now install the sys-apps/pcmciautils package.

root #emerge --ask sys-apps/pcmciautils

System information

Root password

Set the root password using the passwd command.

root #passwd

The root Linux account is an all-powerful account, so pick a strong password. Later an additional regular user account will be created for daily operations.

Init and boot configuration

Gentoo (at least when using OpenRC) uses /etc/rc.conf to configure the services, startup, and shutdown of a system. Open up /etc/rc.conf and enjoy all the comments in the file. Review the settings and change where needed.

root #nano -w /etc/rc.conf

Next, open /etc/conf.d/keymaps to handle keyboard configuration. Edit it to configure and select the right keyboard.

root #nano -w /etc/conf.d/keymaps

Take special care with the keymap variable. If the wrong keymap is selected, then weird results will come up when typing on the keyboard.

Finally, edit /etc/conf.d/hwclock to set the clock options. Edit it according to personal preference.

root #nano -w /etc/conf.d/hwclock

If the hardware clock is not using UTC, then it is necessary to set clock="local" in the file. Otherwise the system might show clock skew behavior.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


System logger

Some tools are missing from the stage3 archive because several packages provide the same functionality. It is now up to the user to choose which ones to install.

The first tool to decide on has to provide logging facilities for the system. Unix and Linux have an excellent history of logging capabilities - if needed, everything that happens on the system can be logged in log files. This happens through the system logger.

Gentoo offers several system logger utilities. A few of these include:

  • app-admin/sysklogd - Offers the traditional set of system logging daemons. The default logging configuration works well out of the box which makes this package a good option for beginners.
  • app-admin/syslog-ng - An advanced system logger. Requires additional configuration for anything beyond logging to one big file. More advanced users may choose this package based on it's logging potential; be aware additional configuration is a necessity for any kind of smart logging.
  • app-admin/metalog - A highly-configurable system logger.

Others are available through Portage as well - the number of available packages increases on a daily basis.

Tip
If sysklogd or syslog-ng are going to be used, it is recommended to install and configure logrotate afterwards as those system loggers don't provide any rotation mechanism for the log files.
Tip
systemd provides its own logging facility called the "journal". Installing a separate syslog provider is optional on systems running systemd, and may require additional configuration to have the syslog daemon read messages from the journal.

To install the system logger of choice, emerge it and have it added to the default runlevel using rc-update. The following example installs app-admin/sysklogd:

root #emerge --ask app-admin/sysklogd
root #rc-update add sysklogd default

Optional: Cron daemon

Next is the cron daemon. Although it is optional and not required for every system, it is wise to install one.

A cron daemon executes scheduled commands. It is very handy if some command needs to be executed regularly (for instance daily, weekly or monthly).

Gentoo offers several possible cron daemons, including sys-process/bcron, sys-process/dcron, sys-process/fcron, and sys-process/cronie. Installing one of them is similar to installing a system logger. The following example uses sys-process/cronie:

root #emerge --ask sys-process/cronie
root #rc-update add cronie default

If dcron or fcron are used, an additional initialization command needs to be executed:

root #crontab /etc/crontab

Optional: File indexing

In order to index the file system to provide faster file location capabilities, install sys-apps/mlocate.

root #emerge --ask sys-apps/mlocate

Optional: Remote access

To be able to access the system remotely after installation, add the sshd init script to the default runlevel:

root #rc-update add sshd default

If serial console access is needed (which is possible in case of remote servers), uncomment the serial console section in /etc/inittab:

root #nano -w /etc/inittab
# SERIAL CONSOLES
s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

Filesystem tools

Depending on the filesystems used, it is necessary to install the required file system utilities (for checking the filesystem integrity, creating additional file systems etc.). Note that tools for managing ext2, ext3, or ext4 filesystems (sys-fs/e2fsprogs) are already installed as a part of the @system set.

The following table lists the tools to install if a certain filesystem is used:

Filesystem Package
Ext2, 3, and 4 sys-fs/e2fsprogs
XFS sys-fs/xfsprogs
ReiserFS sys-fs/reiserfsprogs
JFS sys-fs/jfsutils
VFAT (FAT32, ...) sys-fs/dosfstools
Btrfs sys-fs/btrfs-progs
Tip
For more information on filesystems in Gentoo see the filesystem article.

Networking tools

If there is no need for any additional networking tools, continue immediately with the section on Configuring a bootloader.

Installing a DHCP client

Wichtig
Although optional, the majority of users will find that they need a DHCP client to connect to the DHCP server on their network. Please take this opportunity to install a DHCP client. If this step is forgotten, then the system might not be able to get on the network thus making it impossible to download a DHCP client afterward.

In order for the system to automatically obtain an IP address for one or more network interface(s) using netifrc scripts, it is necessary to install a DHCP client. We recommend the use of net-misc/dhcpcd although many other DHCP clients are available through the Gentoo repository:

root #emerge --ask net-misc/dhcpcd

More information on dhcpcd can be found in the dhcpcd article.

Optional: Installing a PPPoE client

If PPP is used to connect to the internet, install the net-dialup/ppp package:

root #emerge --ask net-dialup/ppp

Optional: Install wireless networking tools

If the system will be connecting to wireless networks, install the net-wireless/iw package for Open or WEP networks and/or the net-wireless/wpa_supplicant package for WPA or WPA2 networks. iw is also a useful basic diagnostic tool for scanning wireless networks.

root #emerge --ask net-wireless/iw net-wireless/wpa_supplicant

Now continue with Configuring the bootloader.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management



arcload für Silicon Graphics Maschinen

arcload wurde für Maschinen geschrieben die einen 64-Bit Kernel benötigen und deshalb nicht arcboot verwenden können (welches nicht einfach als 64-Bit Binärdatei kompiliert werden kann). Es kommt auch mit Besonderheiten zurecht die entstehen, wenn man einen Kernel direkt aus dem Volume-Header lädt. Fahren wir mit der Installation fort:

root #emerge arcload dvhtool

Wenn das abgeschlossen ist, finden Sie die arcload Binärdatei in /usr/lib/arcload/. Es gibt zwei Dateien:

  • sashARCS: Die 32-Bit Binärdatei für Indy, Indigo2 (R4k), Challenge S und O2 Systeme
  • sash64: Die 64-Bit Binärdatei für Octane/Octane2, Origin 200/2000 und Indigo2 Impact Systeme

Verwenden Sie dvhtool um die für das System geeignete Binärdatei in den Volume-Header zu installieren:

Für Indy/Indigo2/Challenge S/O2 Benutzer:

root #dvhtool --unix-to-vh /usr/lib/arcload/sashARCS sashARCS

Für Indigo2 Impact/Octane/Octane2/Origin 200/Origin 2000 Benutzer:

root #dvhtool --unix-to-vh /usr/lib/arcload/sash64 sash64
Notiz
Der Name sashARCS oder sash64 muss nicht unbedingt verwendet werden, es sei denn Sie installieren auf den Volume-Header einer bootfähigen CD. Zum normalen Booten von der Festplatte, kann es beliebig benannt werden.

Verwenden Sie jetzt einfach dvhtool um zu prüfen, dass sie sich im Volume-Header befindet:

root #dvhtool --print-volume-directory
----- directory entries -----
Entry #0, name "sash64", start 4, bytes 55859

Die Datei arc.cf hat eine C-ähnliche Syntax. Für vollständige Details wie man sie konfiguriert, schauen Sie sich bitte die arcload Seite im Linux/MIPS Wiki an. Die Kurzfassung: Definieren Sie mit Hilfe der OSLoadFilename Variable eine Reihe von Optionen die beim Booten aktiviert und deaktiviert werden.

Filearc.cfBeispiel arc.cf

'"`UNIQ--pre-00000061-QINU`"'

This is a deprecated template. Help us update this template!

Beginnend mit arcload-0.5 können arc.cf und Kernel entweder im Volume-Header oder auf einer Partition gespeichert sein. Um diese neue Eigenschaft zu nutzen, können Sie die Dateien in der /boot/ Partition ablegen (oder / wenn es keine extra Boot Partition gibt). arcload verwendet den Dateisystemtreiber-Code des beliebten grub Bootloader und unterstützt somit den gleichen Umfang an Dateisystemen.

root #dvhtool --unix-to-vh arc.cf arc.cf
root #dvhtool --unix-to-vh /usr/src/linux/vmlinux new

CoLo für Cobalt MicroServer

CoLo installieren

Cobalt Server haben eine viel weniger leistungsfähige Firmware auf dem Chip installiert. Das Cobalt BOOTROM ist im Vergleich zum SGI PROM primitiv und weist eine Reihe erheblicher Limitierungen auf.

  • Es besteht eine (ungefähr) 675 KB Größenlimitierung des Kernels. Die aktuelle Größe von Linux 2.4 macht es nahezu unmöglich einen Kernel dieser Größe zu erzeugen. Linux 2.6 und 3.x stehen vollkommen außer Frage.
  • 64-Bit Kernel werden von der Original-Firmware nicht unterstützt (obwohl diese momentan sehr experimentell auf Cobalt Maschinen sind)
  • Die Shell ist im günstigsten Fall rudimentär

Um diese Limitierungen zu überwinden wurde eine alternative Firmware genannt CoLo (Cobalt Loader) entwickelt. Dies ist ein BOOTROM Abbild das entweder auf den Chip im Cobalt Server geflasht, oder von der existierenden Firmware geladen werden kann.

Notiz
Dieses Handbuch wird durch die Einrichtung von CoLo führen, damit es durch die Original-Firmware geladen wird. Dies ist der einzig wirklich sichere und empfohlene Weg um CoLo einzurichten.
Warnung
Wenn gewünscht kann dies in den Server geflasht werden um die Original-Firmware vollkommen zu ersetzen -- Sie sind in dieser Bestrebung jedoch völlig auf sich alleine gestellt. Falls etwas schief läuft entfernen sie das BOOTROM physikalisch und flashen Sie es erneut mit der Original-Firmware. Wenn das für Sie abschreckend klingt, flashen Sie die Maschine NICHT. Wir übernehmen keinerlei Verantwortung für das was passieren kann, wenn Sie diesen Ratschlag ignorieren.

Lassen Sie uns mit der Installation von CoLo weitermachen. Zuerst emergen Sie das Paket.

root #emerge --ask sys-boot/colo

Nach der Installation werfen Sie einen Blick in das Verzeichnis /usr/lib/colo/. Hier liegen die folgenden zwei Dateien:

  • colo-chain.elf (der "Kernel" der von der Original-Firmware geladen wird)
  • colo-rom-image.bin (ein ROM Abbild zum Flashen auf das BOOTROM)

Wir beginnen mit dem Mounten von /boot/ und dem Ablegen einer komprimierten Kopie von colo-chain.elf in /boot/, wo das System es erwartet.

root #gzip -9vc /usr/lib/colo/colo-chain.elf > /boot/vmlinux.gz

CoLo konfigurieren

Wenn das System bootet wird es CoLo laden, welches ein Menü auf dem LCD ausspuckt. Die erste Option (und die Voreinstellung, die nach ca. 5 Sekunden übernommen wird) ist das Booten von der Festplatte. Das System versucht dann die erste Linux Partition die es findet zu mounten und anschließend das Script default.colo zu starten. Die Syntax ist vollständig in der CoLo Dokumentation beschrieben (werfen Sie einen Blick auf /usr/share/doc/colo-X.YY/README.shell.gz -- wobei X.YY die installierte Versionsnummer ist) und sehr einfach.

Notiz
Nur ein Tipp: Bei der Installation eines Kernels ist es empfehlenswert zwei Kernel-Abbilder zu erzeugen: kernel.gz.working -- ein bekanntermaßen funktionierender Kernel und kernel.gz.new -- der Kernel der gerade kompiliert wurde. Es ist möglich symbolische Links zu nutzen, um auf die aktuellen "...new" und "...working" Kernel zu verweisen. Oder benennen Sie die Kernel-Abbilder einfach entsprechend um.
Filedefault.coloCoLo Beispielkonfiguration

'"`UNIQ--pre-00000064-QINU`"'

This is a deprecated template. Help us update this template!

Notiz
CoLo verweigert das Laden eines Skriptes, das nicht mit der Zeile #:CoLo:# beginnt. Sie können es als Äquivalent von #!/bin/sh in Shell Skripten ansehen.

Es ist ebenfalls möglich eine Farge nach dem zu bootenden Kernel und der Konfiguration mit einem Standard-Timeout zu stellen. Die nachfolgende Konfiguration tut genau dies: Die fragt den Benutzer welchen Kernel er verwenden möchte und führt das ausgewählte Abbild aus. vmlinux.gz.new und vmlinux.gz.working können entweder die eigentlichen Kernel-Abbilder, oder lediglich symbolische Links die auf Kernel-Abbilder auf dieser Festplatte verweisen sein. Das Argument 50 von select gibt an, dass mit der ersten Option ("Working") nach 50/10 Sekunden fortgefahren werden soll.

Filedefault.coloMenübasierte Konfiguration

'"`UNIQ--pre-00000067-QINU`"'

This is a deprecated template. Help us update this template!

Für mehr Informationen sehen Sie sich bitte die Dokumentation unter /usr/share/doc/colo-VERSION an.

Serielle Konsole einrichten

Die Linux Installation so wie sie jetzt ist würde booten aber voraussetzen, dass der Benutzer an einem physischen Terminal eingeloggt ist. Auf Cobalt Maschinen ist das besonders schlecht -- es gibt so etwas wie ein physisches Terminal nicht.

Notiz
Diejenigen die den Luxus eines unterstützten Video-Chipsatz haben, können wenn sie möchten diesen Abschnitt überspringen.

Öffnen Sie als erstes die Datei /etc/inittab mit einem Editor. Etwas weiter unten in der Datei betrachten Sie folgendes:

File/etc/inittabinittab Ausschnitt

'"`UNIQ--pre-0000006A-QINU`"'

This is a deprecated template. Help us update this template!

Entfernen Sie das Kommentarzeichen ("#") der Zeile c0. Als Standard ist sie darauf eingestellt eine Terminal-Baudrate von 9600 bps zu nutzen. Auf Cobalt Servern kann dies auf 115200 bps eingestellt werden, um der Baudrate die vom BOOT ROM festgesetzt ist zu entsprechen. Das folgende Listing zeigt wie der Abschnitt anschließend aussieht. Auf Bildschirmlosen Systemen (z.B. Cobalt Servern) empfehlen wir ebenfalls die Zeilen der lokalen Terminals (c1 bis c6) auszukommentieren, da diese die Angewohnheit haben sich schlecht zu verhalten, wenn sie /dev/ttyX nicht öffnen können.

File/etc/inittabinittab Beispielausschnitt

'"`UNIQ--pre-0000006D-QINU`"'

This is a deprecated template. Help us update this template!

Nun müssen wir dem System mitteilen, dass dem lokalen seriellen Anschluss als sicherem Terminal vertraut werden kann. Die Datei die wir dazu ändern müssen ist /etc/securetty. Sie enthält eine Liste von Terminals denen das System vertraut. Wir fügen einfach zwei weitere Zeilen hinzu, die der seriellen Verbindung Root-Logins gestatten.

root #echo 'ttyS0' >> /etc/securetty

In letzter Zeit benötigt Linux ebenfalls /dev/tts/0 -- deshalb fügen wir dies auch hinzu:

root #echo 'tts/0' >> /etc/securetty

SGI PROM Anpassung

Allgemeine PROM Einstellungen

Mit installiertem Bootloader, nach dem Neustart (zu dem wir in Kürze kommen), begeben Sie sich in das System Maintenance Menu und wählen Enter Command Monitor (5) so wie anfangs beim Netzboot des Systems.

CodeMenü nach dem Booten

'"`UNIQ--pre-00000070-QINU`"'

This is a deprecated template. Help us update this template!

Geben Sie den Speicherort des Volume-Header an:

>>setenv SystemPartition scsi(0)disk(1)rdisk(0)partition(8)

Automatisch Gentoo booten:

>>setenv AutoLoad Yes

Die Zeitzone setzen:

>>setenv TimeZone EST5EDT

Verwenden Sie die serielle Konsole - Benutzer von Grafikkarten sollten "g" anstelle von "d1" (eins) angeben:

>>setenv console d1

Stellen Sie die Baudrate der seriellen Konsole ein. Dies ist optional. Die Standardeinstellung ist 9600, wenngleich man Datenraten bis zu 38400 verwenden kann, falls gewünscht:

>>setenv dbaud 9600

Die nächsten Einstellungen hängen davon ab, wie das System gebootet wird.

Einstellungen für direktes booten vom Volume-Header

Notiz
Dies wird hier der Vollständigkeit halber abgedeckt. Wir empfehlen stattdessen, dass sich der Benutzer die Installation von arcload ansieht.
Notiz
Dies funktioniert nur auf Indy, Indigo2 (R4k) und Challenge S.

Ersetzen Sie <root device> durch die Root Partition von Gentoo, wie beispielsweise /dev/sda3:

>>setenv OSLoadPartition <root device>

Um die verfügbaren Kernel aufzulisten geben sie "ls" ein.

>>setenv OSLoader <kernel name>
>>setenv OSLoadFilename <kernel name>

Legen die zu übergebenden Kernel-Parameter fest:

>>setenv OSLoadOptions <kernel parameters>

Um einen Kernel zu versuchen ohne mit den Kernel-Parametern herumzuhantieren, verwenden Sie den boot -f PROM Befehl:

root #boot -f new root=/dev/sda5 ro

arcload Einstellungen

arcload verwendet die Option OSLoadFilename um festzulegen welche Optionen von arc.cf eingestellt werden. Die Konfigurationsdatei ist im Grunde ein Skript, das Boot-Abbilder auf der obersten Ebene für verschiedene Systeme definiert und innerhalb von diesen optionale Einstellungen. Somit zieht OSLoadFilename=mysys(serial) die Einstellungen für den mysys block herein und stellt weitere in serial überschriebene Optionen ein.

Im der Beispieldatei oben haben wir einen System-Block ip28 definiert, mit den Optionen working, new und debug. Wir definieren unsere PROM Variablen wie folgt:

Wählen Sie arcload als Bootloader:- sash64 oder sashARCS:

>>setenv OSLoader sash64

Verwenden Sie das "working" Kernel-Abbild, das im "ip28" Abschnitt von arc.cf definiert ist:

>>setenv OSLoadFilename ip28(working)

Beginnend mit arcload-0.5 müssen Dateien nicht länger im Volume-Header plaziert sein -- sie können statt dessen in einer Partition liegen. Um arcload mitzuteilen wo es nach seiner Konfigurationsdatei und Kernels suchen soll, müssen Sie die PROM Variable OSLoadPartition setzen. Der hier genau anzugebende Wert hängt davon ab, wo die Festplatte auf dem SCSI Bus liegt. Verwenden Sie die PROM Variable SystemPartition als Vorlage -- nur die Partitionsnummer sollte geändert werden müssen.

Notiz
Partitionen sind durchnummeriert beginnend mit 0, nicht 1 wie bei Linux.

Um vom Volume-Header zu laden, verwenden Sie Partition 8:

>>setenv OSLoadPartition scsi(0)disk(1)rdisk(0)partition(8)

Andernfalls geben Sie die Partition und den Dateisystemtyp an:

>>setenv OSLoadPartition scsi(0)disk(1)rdisk(0)partition(0)[ext2]


Neustart des Systems

Exit the chrooted environment and unmount all mounted partitions. Then type in that one magical command that initiates the final, true test: reboot.

root #exit
cdimage ~#cd
cdimage ~#umount -l /mnt/gentoo/dev{/shm,/pts,}
cdimage ~#umount -R /mnt/gentoo
cdimage ~#reboot

Vergessen Sie nicht die bootfähige CD zu entfernen, andernfalls könnte die CD anstelle des neuen Gentoo Systems erneut gebootet werden.

Nach dem Neustart in die neu installierte Gentoo Umgebung stellen sie Ihre Arbeit mit Abschluss der Gentoo Installation fertig.




MIPS Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Benutzerverwaltung

Hinzufügen eines Benutzers für den täglichen Gebrauch

Arbeiten als root in einem Unix/Linux System ist gefährlich und sollte, wenn immer möglich, vermieden werden. Wir empfehlen daher nachdrücklich das Einrichten eines Benutzers für die täglichen Aufgaben.

Die Gruppen, denen ein Benutzer angehört, definieren, welche Aktivitäten der User ausführen kann. Die folgende Tabelle listet die wichtigsten Gruppen, die Sie vermutlich benutzen wollen:

Group Description
audio Be able to access the audio devices.
cdrom Be able to directly access optical devices.
floppy Be able to directly access floppy devices.
games Be able to play games.
portage Be able to access portage restricted resources.
usb Be able to access USB devices.
video Be able to access video capturing hardware and doing hardware acceleration.
wheel Be able to use su.

For instance, to create a user called larry who is member of the wheel, users, and audio groups, log in as root first (only root can create users) and run useradd:

Login:root
Password: (Ihr root-Passwort)
root #useradd -m -G users,wheel,audio -s /bin/bash larry
root #passwd larry
Password: (Enter the password for larry)
Re-enter password: (Re-enter the password to verify)

If a user ever needs to perform some task as root, they can use su - to temporarily receive root privileges. Another way is to use the sudo package which is, if correctly configured, very secure.

Aufräumen der Festplatte

Entfernen der Tarballs

With the Gentoo installation finished and the system rebooted, if everything has gone well, we can now remove the downloaded stage3 tarball from the hard disk. Remember that they were downloaded to the / directory.

root #rm /stage3-*.tar.bz2*

Wie geht es weiter?

Dokumentation

Gratulation! Sie haben jetzt ein funktionierendes Gentoo-System. Aber wie geht es nun weiter? Welche Möglichkeiten bieten sich? Gentoo bietet seinen Nutzern viele Optionen und daher auch viele dokumentierte (und weniger gut dokumentierte) Eigenschaften.

Definitely take a look at the next part of the Gentoo Handbook entitled Working with Gentoo which explains how to keep the software up to date, install additional software packages, details on USE flags, the OpenRC init system, etc.

Apart from the handbook, readers should also feel encouraged to explore other corners of the Gentoo wiki to find additional, community-provided documentation. The Gentoo wiki team also offers a Documentation topic overview which lists a selection of wiki articles by category. For instance, it refers to the localization guide to make a system feel more at home (particularly useful for users who speak English as a second language).

Gentoo Online

Everyone is of course always welcome on our Gentoo forums or on one of our Gentoo IRC channels.

We also have several mailing lists open to our users.

Enjoy Gentoo!




Warning: Display title "Gentoo Linux mips Handbuch: Gentoo installieren" overrides earlier display title "Handbuch:MIPS/Komplett/Installation".