Handbook:MIPS/Blocks/HWReqs/ru

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:MIPS/Blocks/HWReqs and the translation is 37% complete.


CPU (Big Endian port) MIPS3, MIPS4, MIPS5 or MIPS64-class CPU
CPU (Little Endian port) MIPS4, MIPS5 or MIPS64-class CPU
Память 128 МБ
Место на диске 3.0 ГБ (кроме swap раздела)
Swap раздел Как минимум 256 МБ

Для более подробной информации обратитесь к MIPS требования к аппаратному обеспечению.

Замечания по установке

На многих архитектурах, процессор прошел через несколько поколений, каждое новое поколение создается на основе предыдущего. MIPS не является исключением. Есть несколько поколений CPU попадающих под архитектуру MIPS. Для того, чтобы при загрузке с сети выбрать правильный образ архива и CFLAGS-флаги надлежащим образом, необходимо, быть в курсе, какое у системы поколение CPU. Эти семейства называют Instruction Set Architecture.

MIPS ISA 32/64 бит Поддерживаемые процессоры
MIPS 1 32 бит R2000, R3000
MIPS 2 32 бит R6000
MIPS 3 64 бит R4000, R4400, R4600, R4700
MIPS 4 64 бит R5000, RM5000, RM7000 R8000, R9000, R10000, R12000, R14000, R16000
MIPS 5 64 бит Пока никаких
MIPS32 32 бит Серия AMD Alchemy, 4kc, 4km и множество других… Существует несколько ревизий в MIPS32 ISA.
MIPS64 64 бит Broadcom SiByte SB1, 5kc и прочие… Существует несколько ревизий MIPS64 ISA.
Заметка
Уровень MIPS ISA был разработан Silicon Graphics в 1994 году, но никогда не использовался в реальных процессорах. Он существует в рамках MIPS64 ISA.
Заметка
The MIPS32 and MIPS64 ISAs are a common source of confusion. The MIPS64 ISA level is actually a superset of the MIPS5 ISA, so it includes all instructions from MIPS5 and earlier ISAs. MIPS32 is the 32-bit subset of MIPS64, it exists because most applications only require 32-bit processing.

Also, another important concept to grasp is the concept of endianness. Endianness refers to the way that a CPU reads words from main memory. A word can be read as either big endian (most significant byte first), or little endian (least significant byte first). Intel x86 machines are generally Little endian, whilst Apple and Sparc machines are Big Endian. On MIPS, they can be either. To separate them apart, we append el to the architecture name to denote little endian.

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:

Netbooting overview

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.

Depending on the machine, there is a certain amount of hardware that is needed in order to successfully netboot and install Linux.

  • In General:
    • DHCP/BOAMD Alchemy series, 4kc, 4km, many others... There are a few revisions in the MIPS32 ISA.OTP server (ISC DHCPd recommended)
    • Patience -- and lots of it
  • For Silicon Graphics workstations:
    • TFTP server (tftp-hpa recommended)
    • When the serial console needs to be used:
      • MiniDIN8 --> RS-232 serial cable (only needed for IP22 and IP28 systems)
      • Null-modem cable
      • VT100 or ANSI compatible terminal capable of 9600 baud
  • For Cobalt Servers (NOT the original Qube):
    • NFS server
    • Null-modem cable
    • VT100 or ANSI compatible terminal capable of 115200 baud
Заметка
SGI machines use a MiniDIN 8 connector for the serial ports. Apparently Apple modem cables work just fine as serial cables, but with Apple machines being equipped with USB & internal modems, these are getting harder to find. One wiring diagram is available from the Linux/MIPS Wiki, and most electronics stores should stock the plugs required.
Заметка
For the terminal, this could be a real VT100/ANSI terminal, or it could be a PC running terminal emulation software (such as HyperTerminal, Minicom, seyon, Telex, xc, screen - whatever your preference). It doesn't matter what platform this machine runs - just so long as it has one RS-232 serial port available, and appropriate software.
Заметка
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 и DHCP

As mentioned earlier -- this is not a complete guide, this is a bare-bones config that will just get things rolling. Either use this when starting a setup from scratch, or use the suggestions to amend an existing setup to support netbooting.

It is worth noting that the servers used need not be running Gentoo Linux, they could very well be using FreeBSD or any Unix-like platform. However, this guide will assume to be using Gentoo Linux. If desired, it is also possible to run TFTP/NFS on a separate machine to the DHCP server.

Предупреждение
The Gentoo/MIPS Team cannot help with setting up other operating systems as netboot servers.

First Step -- configuring DHCP. In order for the ISC DHCP daemon to respond to BOOTP requests (as required by the SGI & Cobalt BOOTROM) first enable dynamic BOOTP on the address range in use; then set up an entry for each client with pointers to the boot image.

root #emerge --ask net-misc/dhcp

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

ФАЙЛ /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;
}

With that setup, one can then add any number of clients within the subnet clause. We will cover what to put in later in this guide.

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

This will create /tftproot to store the netboot images. Move this elsewhere if necessary. For the purposes of this guide, it is assumed that it is kept in the default location.

Сетевая загрузка на станциях SGI

Скачивание образа сетевой загрузки

Depending on the system the installation is meant for, there are several possible images available for download. These are all labelled according to the system type and CPU they are compiled for. The machine types are as follows:

Кодовое имя Машины
IP22 Indy, *Indigo 2, Challenge S
IP26 *Indigo 2 Power
IP27 Origin 200, Origin 2000
IP28 *Indigo 2 Impact
IP30 Octane
IP32 O2
Заметка
Indigo 2 — часто ошибочно путают IRIS Indigo (IP12 с процессором R3000 или IP20 с процессором R4000, которые не могут запускать Linux), Indigo 2 (IP22, которые отлично работают с Linux), Indigo 2 Power на базе R800 (которые совершенно не работают с Linux) и Indigo 2 Impact на базе R10000 (IP28, являющиеся экспериментальными). Помните, что это совершенно разные машины.

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 configuration for an 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.

ФАЙЛ /etc/dhcp/dhcpd.confsnippet for SGI Workstation
subnet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx {
  # ... usual stuff here ...
  
  # SGI Workstation... change 'sgi' to your SGI machine's hostname.
  host sgi {
  
    # MAC Address of SGI Machine. Normally this is written on the back
    # or base of the machine.
    hardware ethernet 08:00:69:08:db:77;
  
    # TFTP Server to download from (by default, same as DHCP server)
    next-server 192.168.10.1;
  
    # IP address to give to the SGI machine
    fixed-address 192.168.10.3;
  
    # Filename for the PROM to download and boot
    filename "/gentoo-r4k.img";
  }
}

Параметры ядра

We're almost done, but there's a couple of little tweaks still to be done. Pull up a console with root privileges.

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

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

Set the port range usable by the SGI PROM:

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

This should be sufficient to allow the Linux server to play nice with SGI's PROM.

Запуск сервисов

At this point, start the daemons.

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.

An easy way to verify if the tftp daemon is running is to type the following command and confirm the output:

root #netstat -al | grep ^udp
udp        0      0 *:bootpc                *:*
udp        0      0 *:631                   *:*
udp        0      0 *:xdmcp                 *:*
udp        0      0 *:tftp                  *:* <-- (look for this line)

Netbooting the 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?

Type in 5 to enter the command monitor. On the monitor, start the BootP process:

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

From this point, the machine should start downloading the image, then, roughly 20 seconds later, start booting Linux. If all is well, a busybox ash shell will be started as shown below and the installation of Gentoo Linux can continue.

КОД Когда всё идет по плану…
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.

Устранение проблем

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)

If everything on the server is checked, and timeouts or other errors occur on the SGI machine, try typing this into the console.

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

Netbooting on Cobalt stations

Overview of the netboot procedure

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.

Downloading a Cobalt netboot image

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

Since this machine uses NFS to download its image, it is necessary to export /nfsroot/ on the server. Install the net-fs/nfs-utils package:

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

Once that is done, place the following in the /etc/exports file.

ФАЙЛ /etc/exportsЭкспорт каталога /nfsroot
/nfsroot      *(ro,sync)

Now, once that is done, start the NFS server:

root #/etc/init.d/nfs start

If the NFS server was already running at the time, tell it to take another look at its exports file using exportfs.

root #exportfs -av

DHCP configuration for a Cobalt machine

Now, the DHCP side of things is relatively straightforward. Add the following to the /etc/dhcp/dhcpd.conf file.

ФАЙЛ /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";
  }
}

Запуск сервисов

Now start the daemons. Enter the following:

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.

Netbooting the Cobalt machine

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.

The back panel should display "Net Booting", and some network activity should be visible, closely followed by CoLo kicking in. On the rear panel, scroll down the menu until the "Network (NFS)" option then press Enter. Notice that the machine starts booting on the serial console.

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

A busybox ash shell will pop up as shown below, from which the Gentoo Linux installation can continue.

КОД Когда всё идёт по плану…
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.

Устранение проблем

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.