1. What can('t) I do ?
OK, here's what you can and what you can not do with a standard Indigo2.You can:
- Install Linux
- Use the serial console
- Use the SCSI Controller
- Use the NIC (Network)
- Use the Monitor a whole lot (at this moment there is neither a console on the monitor nor X available for the Indigo2),
- Use the audio processor as of this point (But it's under construction)
2. What do I need ?
- A boot server with network card
- A system to use the serial console (might be the boot server)
- A Serial Console Cable
- Some software (e.g. a debian base system)
- And last but not least an Indigo2
- Oh, and a lot of patience and coffee
2.1. Boot server
You will need a system of your choice to boot your Indigo2 over network because it's not possible to boot it directly at the moment. You can use any arch which has the necessary packages ported. But I advise to use either an Alpha, Sparc or Intel system because these ports are pretty stable these days.. You need to install a BOOTP server on it and an NFS server. The BOOTP server will send the Kernel to your Indigo2 using TFTP (so you also need a TFTP server). Then the kernel will contact the NFS server and mount a NFS volume as root device.2.2. Serial Console
The only way to see some output from the Indigo2 is the serial console (there is indeed the PROM console, but this works only for kernel messages and is therefor not really usefull). This is due to a massive lack of open documentation. Again: We have no documentation and the graphics hardware is very complicated so it's currently not possible to get any output. A serial console means that you have a serial null modem cable from one system to an other and that the kernel uses the serial device to output any message. Also the user mode programs use this console when the kernel has booted.Anyways, to make life more interesting the SGI Indigo2 doesn't have a standard DB9 or DB25 serial connector. Instead it has a connector which looks like a PS/2 keyboard one but has 8 pins. This beast is called DIN-8 connector. Obviously the macs also have such a connector. So if you know where you might get one you can order a so called MAC Serial Cable. It'll work then. Don't forget to get a crossed cable od a cross adapter, otherwise you won't be very successful.
If you can't get a MAC Cable you will probably need to solder the thingy yourself. You can find the pinout in the man pages of Irix or here.
On the other side you will need a terminal. This may be a usual hardware terminal or a software terminal like minicom. You need to set 9600 baud, 8 bits and one stop bit.
3. Setup of boot server
As a first thing you will need some software. Depending on your distribution you may have packages or need to download the source and compile the stuff yourself. You need the DHCP3 software or the BOOTP server package, the netkit-tftp package and a NFS server.The NFS server will be your root filesystem for the first boot (you can change to disks later). It's usually not problem to configure NFS. Install the package, edit your /etc/exports file, and start the NFS deamons. Your /etc/exports might look like this:
/mnt/mips 192.168.1.3(no_root_squash,rw)
if you want to have your files for the root filesystem under /mnt/mips and if your Indigo2 will use the IP 192.168.1.3. Now you need to place a usable root filesystem under /mnt/mips . Depending on which distribution you want to use either unpack the things you need or the single tar.gz file. Then you need to install the tftp package. It should be no problem except that you have to make an entry into your inetd.conf (maybe your distribution packaging system does that for you - if so you need to check it abyways). It's looking like this:
tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /mnt/mips/
The last and most complicated part is the BOOTP server. one way to set it up is to use bootp - but I'm unsure if this package is still available. Anyways - if you want to use bootp then you need to do the following: Install the package and put a line like the following into your inetd.conf:
bootps dgram udp wait root /usr/sbin/bootpd /etc/bootptab
Now you also need the file /etc/bootptab which will look about the following way:
ivy:hd=/mnt/mips:\
:rp=/mnt/mips:\
:ht=ethernet:\
:ha=080069078f53:\
:ip=192.168.1.3:\
:bf=vmlinux:\
:sm=255.255.255.0:\
:to=7200:
In this case ivy is the hostname of your Indigo2, 080069078f53 is the MAC address (you can look this up in the PROM command monitor) and vmlinux is the boot file (your kernel file). This should be everything you need.
If you want to use DHCP you need to find out how to configure it on your own because I have not done this yet. If you know how to do this please email me so that I can add this procedure here. Also please see the section Pitfalls to avoid problems when using DHCP.
4. First boot
Now you have set up your boot server and your serial cable. The next step is to boot the system for the first time. Depending on how you're using your Indigo2 you either have a Monitor and Keyboard or only a serial cable. In any case you still need a power cable and network cable ;-) .
Version a) You have a Monitor and Keyboard
Start the system, you will hopefully hear the sound from the speaker.
Now the Indigo2 is going to power up the SCSI drives in order of their IDs.
When it has done so you will see a window with a "Stop for maintainence" button.
Press this button and then click on "Command Monitor". Now you need to set
your netaddr. This is the IP your system will have. Do a "setenv netaddr 192.168.1.10" if
you want your Indigo2 to have this IP. If you've done so, enter "bootp():vmlinux"
which will hopefully download the kernel and start it.
Version b) You have a serial cable
When the system powers up it will detect that there's no keyboard
and monitor but instead a serial cable. So it will use this one for the output
of the PROM stuff. You'll either get prompted anyways ort have to press ESC
on your terminal to get the menu. Then choose option 5 and enter the same
line as shown above ("bootp():vmlinux"). After doing so, the kernel should boot.
HINT: I will not cover the installation of the software - you need to find out about that yourself because it heavily depends on which root image you have choosen.
5. Automatization
This will describe how you get your Indy or Indigo2 to automatically boot without having to type bootp():vmlinux blah all the time. First you need to enter the command monitor of the PROM. If you type printenv you'll see all system variables which are set. You use unset to unset the variables which begin with OS (like OSLoader, OSLoadPartition and so on). Then usesetenv -p SystemPartition "bootp():vmlinux"
This will make your system execute bootp():vmlinux at start up.
Guido Guenther has reported, that it's now possible to boot the Indy from harddisk. This is done by a so called dvhtool which will place the kernel in the right location (into the volume header) so that it will be executed by the prom. At the moment he says the steps to get it working are about the following:
- build ecoff kernel
- dvhtool -d /dev/sda --unix-to-vh vmlinux.ecoff linux
- go into prom:
- setenv OSLoader linux
- setenv OSLoadPartition /dev/sda1
- reboot
6. Pitfalls
- One of the most common pitfalls is, that your kernel is not working for your system.
For example you have a kernel which is compiled for an Indy (using the Indy PROM console)
and you want to use it on your Indigo2. This is not gonna work because the Indigo2
doesn't have such a PROM console as the Indy has.
- If your machine is replying to the BOOTP packets (you may verify this using a packet sniffer
like tcpdump or ethereal) but doesn't download the kernel from your BOOTP server, your boot
server is probably running a kernel of the 2.3 series or higher. These kernels by default
are allowed to fragment packets which is not understood by the PROM of the SGI machines.
The problem may be circumvented by doing a "echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc"
as root on your boot server.
- When using DHCP version 2 you might see the following problem: Your machines receives it's
BOOTP reply 3 times but refuses to start TFTP. You can fix this by doing a "unsetenv netaddr"
in the PROM command monitor before you boot your system. DHCP version 3 fixes that problem.
- You see about the following messages:
>> boot bootp()/vmlinux
73264+592+11520+331680+27848d+3628+5792 entry: 0x8df9a960
Setting $netaddres to 192.168.1.5 (from server deadmoon)
Obtaining /vmlinux from server deadmoon
Cannot load bootp()/vmlinux
Illegal f_magic number 0x7f45, expected MIPSELMAGIC or MIPSEBMAGIC.This problem only happens for Indys with very old PROM versions which cannot handle the ELF binary format which Linux uses. A solution for this problem is in the works.
HINT: Florian Lohoff reported that it might work if you use the ecoff variant of the Linux kernel.
- My self compiled 2.2 kernel crashes. On an Indy the crash message looks like the following;
the same problem hits other machines as well but may look completely different.
Exception:
Status register: 0x300004803
Cause register: 0x8008
Exception PC: 0x881385cc, Exception RA: 0x88002614
exception, bad address: 0x47c4
Local I/O interrupt register 1: 0x80
Saved user regs in hex (&gpda 0xa8740e48, &_regs 0xa8741048):
arg: 7 8bfff938 8bfffc4d 880025dc
tmp: 8818c14c 8818c14c 10 881510c4 14 8bfad9e0 0 48
sve: 8bfdf3e8 8bfffc40 8bfb2720 8bfff938 a8747420 9fc56394 0 9fc56394
t8 48 t9 8bfffee66 at 1 v0 0 v1 8bfff890 k1 bad11bad
gp 881dfd90 fp 9fc4be88 sp 8bfff8b8 ra 88002614
PANIC: Unexpected exceptionThis problem is caused by a still unfixed bug in Binutils newer than version 2.7. As a workaround, change the following line in arch/mips/Makefile from:
LINKFLAGS = -static -N
to:
LINKFLAGS = -static- If you only see bogus characters in your serial console window then your settings for the baudrate or other serial options are probably wrong - remember to use 9600 8N1 !
- If you're getting all kernel messages over the serial console and nothing from userland then you probably forgot to link /dev/console to /dev/ttyS0.
- In case that your serial console behaves strange under minicom (minicom switches between online and offline mode during bootup) you need to turn off hardware flow control under minicom.
- If you only see bogus characters in your serial console window then your settings for the baudrate or other serial options are probably wrong - remember to use 9600 8N1 !
7. Troubleshooting
First try to find out what's wrong. If your system isn't able to download the kernel then your problem is the BOOTP or TFTP server. If it can't mount the NFS root you have trouble with your NFS server. In both cases you should take a close look at the configuration and Section 6 (Pitfalls).8. Links
9. Soldering a serial console cable
This is the way you need to solder your cable.
Crossed Serial Cable Pinout
SGI-Mini-DIN-8 | Sub-D 25
(male) | (female)
----------------------------------------------------------------------
6 7 8 | 13 12 11 10 9 8 7 6 5 4 3 2 1
3 4 5 | 25 24 23 22 21 20 19 18 17 16 15 14
1 2 |
----------------------------------------------------------------------
DTR - Data Terminal Ready 1 | 6 DSR - Data Set Ready
CTS - Clear To Send 2 | 4 RTS
TD - Transmit Data 3 | 3 RD
SG - Signal Ground 4,8 | 7 SG
RD - Receive Data 5 | 2 TD
RTS - Request To Send 6 | 5 CTS
DCD - Data Carrier Detect 7 | 20 DTR
Shield | 1 Protective Ground
Thiemo also said that it might be needed to have a connection
between pin 20 and pin 8 on the Sub-D 25 connector to have your terminal
do a carrier detect.Both numberings are done looking to the front of the connectors - not the soldering site ! (Note the male / female).
10. Credits
Credits go to Thiemo Seufer for providing the pin out of a serial console cable for the I2 and to Guido Guenther for various comments.11. Disclaimer
I'm not responsible for any damage, problems, accidents, power failures or other things which you might produce when using this HOWTO. If you have comments or suggestions please email me at spock@mgnet.de

