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

Handbook:MIPS/Installation/Media/de

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:MIPS/Installation/Media 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


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.