Handbook:MIPS/Installation/Media/en
Hardware requirements
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 |
For more information, read MIPS Hardware Requirements.
Installation notes
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. |
The MIPS5 ISA level was designed by Silicon Graphics back in 1994, but never actually got used in a real life CPU. It lives on as part of the 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:
- Linux/MIPS Website: MIPS ISA
- Linux/MIPS Website: Endianness
- Linux/MIPS Website: Processors
- Wikipedia: Instruction Set
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.
Setting up TFTP and 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.
# 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.
Netbooting on SGI stations
Downloading a netboot image
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:
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 |
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 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.
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";
}
}
Kernel options
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.
Starting the daemons
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.
Troubleshooting
If the machine is being stubborn and refusing to download its image, it can be one of two things:
- The instructions were not followed correctly, or
- 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 server configuration
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.
/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.
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";
}
}
Starting daemons
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.
Troubleshooting
If the machine is being stubborn and refusing to download its image, it can be one of two things:
- the instructions have not been followed correctly, or
- 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.
Using an installation CD
On Silicon Graphics machines, it is possible to boot from a CD in order to install operating systems. (This is how one installs IRIX for instance) Recently, images for such bootable CDs to install Gentoo have been made possible. These CDs are designed to work in the same way.
At the moment the Gentoo/MIPS Live CD will only work on the SGI Indy, Indigo 2 and O2 workstations equipped with R4000 and R5000-series CPUs, however other platforms may be possible in future.
The Live CD images can be found under the experimental/mips/livecd/ directory on a Gentoo mirror.
These CDs are highly experimental at this time. They may or may not work at this time. Please report success or failures either on Bugzilla, this forum thread or in the #gentoo-mips IRC channel.