Installation procedure for Linux on MIPS Atlas board

This install procedure describe how to install a big-endian linux system on the Atlas board, but the little endian system is installed in a similar way (replacing big and eb with little and el). The fdisk program used for partitioning the hard drive are different for the two endianess. The big endian system use the SGI disklabel partition table, inherited from SGI. This is described below.

What you need to install and run linux on Atlas

  • A MIPS Atlas board with a core card (make sure it runs big-endian).

  • Supported Core cards include CoreLV with any 4Kc or 5Kc core, as well as the MIPS Core card with a QED RM5261 CPU. The TLB style MMU is required by Linux.

  • A serial cable, 10baseT ethernet cable, SCSI cable, a SCSI disk and SCSI terminator.

  • Another system (for example, a SUN solaris system or PC running Linux) for providing remote boot of the kernel via TFTP and NFS services for installation, as well as a serial console for the installation. -

  • A local area network to connect host and target.

  • The CD-ROM with the tarball userland.mips.eb-01.02.tar.gz and the kernel image vmlinux-2.2.12.mips.atlas.eb-01.04.srec.  These files can also be downloaded from the MIPS FTP server.

Note: The userland distribution is almost identical to SGIs MIPS port of the MontaVista HardHat 5.1 release, which in turn is a variant port of RedHat's Manhattan (5.1) distribution. The kernel image and sources are based on the 2.2.12 linux kernel code and are ported to the MIPS Atlas board and Algorithmics P5064 board, while retaining support for the SGI Indy workstation.

 Setting up the hardware

Make sure that the S5 big-endian selector switch on the Atlas board (S5-2) is in the right position (down for big-endian, see the Atlas user manual for details).

Cable the SCSI disk to the Atlas SCSI connector. If the drive is a newer, LVD-style drive, a separate external terminator may be required on the chain, and the single-ended ("SE") mode of operation may need to be selected on the drive. Make sure the SCSI ID of the drive isn't set to 7 (setting SCSI ID to zero is not a bad choice).

Cable the Atlas 10baseT connector to a hub on the same local network as the host server.

Cable the upper serial connector of the Atlas to a dumb terminal or to a serial port on the host platform, and configure terminal emulation software so that the Atlas YAMON monitor is communicating with the host. A null modem cable may be necessary.

Setting up Userland Distribution

To install the Userland distribution on your host system and setup NFS and TFTP services, you need administrative/root privileges.

Please contact your IT-department or system administrator to help setting up the host system. In the following is described how to set up a SUN (solaris) and/or a linux (PC) host system.

Installing Userland distribution on the boot/NFS server

While logged in with administrative/root privileges:

Make a directory (e.g. /linux) on your host's local disk and untar the tarball.  The example here shows untar from a distribution CD-ROM, but the same principles apply to a downloaded image.

mkdir /linux
cd /linux
tar xvfz cdrom:/linux/userland.mips.eb-01.02.tar.gz
cp cdrom:/linux/vmlinux-2.2.12.mips.atlas.eb-01.04.srec /linux/mipseb/vmlinux

If you are not running as root, the un-taring of the userland tarball will fail since it needs to create a few device files.

This will copy the linux kernel and untar the userland distribution to the directory /linux/mipseb. The "eb" in mipseb indicates that it's a big-endian distribution.

After the steps above, check that the entire path to the kernel image (/linux/mipseb/vmlinux) have world read access rights. If this is not the case, you can change the permissions mode of the linux tree to the correct values by executing:

chmod -R go=u-w /linux

Setup TFTP (on a SUN)

While logged in with administrative/root privileges, add or modify the TFTP configuration in /etc/inetd.conf:

tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /linux/mipseb

Restart inetd:

kill -1 <inetd_process_id>

You can get the inetd process ID by issuing the command 'ps -A | grep inetd'.

Setup NFS (on a SUN)

While logged in with administrative/root privileges, add the following to /etc/dfs/dfstab:

share -F nfs -o rw,root= -d "Atlas Linux" /linux/mipseb

Issue the command '/etc/init.d/nfs.server start' to run the NFS daemon processes and the share command.

File paths and procedures will differ slightly on non-Solaris hosts.

Setup TFTP (on a Linux PC)

While logged in with administrative/root privileges, add or modify the TFTP configuration in /etc/inetd.conf:

tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /linux/mipseb

Restart inetd:

/etc/rc.d/init.d/inet restart

Setup NFS  (on a Linux PC)

Add the following to /etc/exports:

/linux/mipseb <IP-address-of-board> (no_root_squash,rw)

Issue the command 'exportfs -a' in order to make the rpc.nfsd and rpc.mountd daemons reread the /etc/exports file.

If the nfsd and mountd daemons are not running, start it by issuing the following command:

/etc/rc.d/init.d/nfs start

Note: In order to do the above make sure that the nfs-server RPM package is installed.

Boot the linux kernel on the Atlas board

Connect to the Atlas board through the serial line using a terminal or a terminal emulation program on another computer. See the Atlas User's Manual for details on baudrate, flowcontrol, cabling etc.

First you need to set the IP-address of the Atlas board (get the address from you IT-department or system administrator). To set the IP-address, enter the following in the PROM monitor (YAMON):

set ipaddr <IP-address-of-Atlas-board>
set subnetmask <subnet-mask-of-Atlas-board>

Make sure the date and time is set correct, use the YAMON command 'date'. Set the time in UTC/GMT.

Load the linux kernel by entering the following command:

load tftp://<IP-address-of-host>/vmlinux

after the download, start the RedHat install program:

go . nfsroot=<IP-address-of-host>:/linux/mipseb ip= <IP-address-of-board>

Now you should be in business. If that is not the case and the kernel panic with the message "unable to mount root fs", check your NFS setup and reboot the Atlas board and try again.

RedHat Install program

Follow the guidelines in the install program.

  1. Choose Install

  2. Choose Edit to partitioning the disk. Now you should enter the fdisk program.
    For a big endian system:
    - Type 's' to create a new empty SGI disklabel. The current big-endian fdisk does not allow for DOS-style partition tables. Say "0" to select custom label (automatic won't work).
    - Make the partition table as you prefer it. If you just press enter a number of times, you will get a default partitioning. By default, fdisk will assign most of the disk to the sda1 partition, and a much smaller sda2 partition intended for swap use. Don't worry about the sda9 and sda11 partitions automatically created.
    For a little endian system:
    - Type 'c' to disable DOS Compatibility.
    - Type 'n' to add new partitions. Make the partition table as you prefer it, but at least you should create one big partition (sda1) and a much smaller sda2 partition intended for swap use.
    - Don't forget to change the swap partition (sda2) to the type "Linux swap" using the 't' command. The value for "Linux swap" type is 82.
    For either endianness:
    - After creating your partition table make sure to exit with 'w' to write the table to the disk.
    Choose Done to continue.

  3. Choose the partitions and Edit to set the right mounting point. - mount /dev/sda1 on / (root) if the default partitioning is used. Otherwise, assign partitions to mount points as desired, but there must be a valid partition assigned to root. When done choose Ok.

  4. Choose Ok to use sda2 as swap space. Modify default if necessary. There is no need to do bad block check on a SCSI disk.

  5. Press 'space' to select the partition you will format. You should definitely format /dev/sda1 (/) unless you know what you are doing. There is no need to do bad block check on a SCSI disk.

  6. Press 'space' to select the components to install (if you're not happy with the defaults).

  7. Say 'Ok' to the following and the installation will begin.

  8. After installation setup LAN support, etc.

Booting linux on Atlas

Now you can boot the linux system on your Atlas board. In the PROM monitor (YAMON) on the Atlas board, download the kernel as before:

load tftp://<IP-address-of-host>/vmlinux

after the download, start the kernel with the root on scsi.

go . root=/dev/sda1

Linux is now alive on Atlas, hopefully. ;-)  If typing the IP address of the boot server and the name of the kernel image file becomes tedious, you can set the YAMON environment variables bootserver and bootfile to the appropariate values and download by simply typing:

load

Running linux

Now you should be able to login as root on the console (via the serial port). Note that it may *not* be possible to login as root via the network since the /etc/securetty file prevents this. If you wish to remove this restriction, remove or rename the securetty file.

In order to make the serial console work as one would expect, when using 'top', 'vi', etc, you might need to change the terminal characteristics or terminal type settings.

The on-board Ethernet controller on the early revs of the Atlas board delivers mediocre performance at 10Mbps, and misbehaves badly at 100Mbps.  If the Atlas/Linux system is to be heavily used on a LAN, a PCI Ethernet card for the Atlas PCI expansion slot might be a good idea.  The standard kernel distribution includes a driver for the AMD PCNet32 card which is known to work pretty well in either endianness.