★ wanayoo — archive 1999 http://reality.sgi.com/raju/SGI-Linux-mini-HOWTO.htmlNouvelle recherche | Portail wanayoo

SGI Indy/Linux mini-HOWTO

Raju Mathur (raju@sgi.com)

Version: 0.2
Date: 990416
Primary Site: http://reality.sgi.com/raju/SGI-Linux-mini-HOWTO.html

Introduction

This document details the steps I took to get Linux installed and booting in my network within SGI. In general, the steps detailed here should work anywhere where you need to do the initial booting off an SGI IRIX machine (instead off another Linux system as detailed in http://www.linux/mips/manhattan/).

If you want to use this document to install Indy/Linux off another system type (i.e. not another IRIX system), you can use portions of this document; just modify the steps ``Setup TFTP on IRIX'', ``Setup DHCP on IRIX'' and ``Setup NFS on the IRIX system'' for your OS. The Manhattan document mentioned earlier gives examples of theses steps for a Linux system.

Disclaimer and Copyright

This document is not gospel. Nobody is responsible for what happens to your hardware but yourself. If your hardware goes up in smoke (...nearly impossible!) I take no responsibility. ie. THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE TO ACTIONS TAKEN BASED ON THE INFORMATION INCLUDED IN THIS DOCUMENT.

This document is Copyright (C) 1999 by Raju Mathur.

This document may be copied according to the conditions of the GNU General Public License, version 2, included herein by reference. See the file linux/COPYING that comes with the Linux kernel for full details.

If you are intending to incorporate this document into a published work, please contact me, and I will make an effort to ensure that you have the most up to date information available. In the past, out of date versions of the Linux howto documents have been published, which caused the developers undue grief from being plagued with questions that were already answered in the up to date versions.

Assumptions

I'm assuming the following configuration of IP addresses and directories:

What You Need

In order to follow the steps in this document you'll need to have access to the following:

Overview

A short summary of the steps you'll have to take to boot Linux on your SGI Indy system:

Getting the HardHat Release

Please download the ~250MB hardhat-sgi-5.1.tar.gz from a mirror near you. The list of sites is available at:
http://www.linux/mips/manhattan/
Please also read the instructions on that page -- they complement this document to some extent.

Setting up HardHat on your IRIX disk

Make a /linux directory on your disk and untar the distribution into it:
      mkdir /linux
      cd /linux
      gzip -dc .../hardhat-sgi-5.1.tar.gz | tar xopf -
This will create a directory called /linux/mipseb and install the required files into that. You may use another top-level directory instead of /linux, but then you'll have to adjust the pathnames in some of the examples given below to suit your setup.

Setup TFTP on IRIX

Add (or uncomment) the following line to /etc/inetd.conf:
      tftp	dgram	udp	wait	guest	/usr/etc/tftpd -h /linux/mipseb
    
Restart inetd:
      killall -1 inetd
    

Setup DHCP on IRIX

Note: Simple BOOTP will not work! You have to setup DHCP on your IRIX box to complete the final IRIX configuration before moving to the target Indy. First, if you have ordinary (vanilla) bootp enabled in /etc/inetd.conf, disable it (comment it out). Next uncomment or add the following line in /etc/inetd.conf:
      bootp	dgram	udp	wait	root	/usr/etc/dhcp_bootp	dhcp_bootp
    
Now you have to setup a DHCP config file for your network. The file is called /var/dhcp/config/config.AA.BB.CC where AA.BB.CC is your network in standard octet notation. E.g. my network is 134.14.90, so my file is called /var/dhcp/config/config.134.14.90 The file looks something like this:
      # The Serve_This_Network flag is required to be enabled (1) if you want the
      # server to respond to clients on that subnet. This flag can be effectively
      # used to restrict serving specific subnets by creating the appropriate
      # config file for those subnets and disabling the Serve_This_Network in them.
      Serve_This_Network: 1
      pro_address_counter: 1
      pro_host_pfx_counter: 1
      pro_netmask: 0xffffff00 (CHANGE!)
      pro_lease: 0x5a39a80
      pro_host_prefix: linux- (CHANGE!)
      pro_choose_name: 1
      pro_ipaddress_range: 64 (CHANGE!) (YOUR LINUX IP HERE)
      pro_router_addr: 134.14.90.1,134.14.90.52 (CHANGE!)
      pro_bootfile_size: 
      pro_time_offset: 
      pro_meritdump_pathname: 
      pro_root_pathname: /linux/mipseb (CHANGE!)
      pro_extensions_pathname: 
      pro_TFTPserver_name: 
      pro_bootfile_name: vmlinux
      pro_dns_domain: newdelhi.sgi.com (CHANGE!)
      pro_dnsserver_addr: 134.14.90.52 (CHANGE!)
      pro_propel_server: 
      pro_timeserver_addr: 
      pro_logserver_addr: 
      pro_cookieserver_addr: 
      pro_LPRserver_addr: 
      pro_resourceserver_addr: 
      pro_swapserver_addr: 
      pro_nameserver116_addr: 
      pro_impressserver_addr: 
      pro_NTPserver_addr: 
      pro_X_fontserver_addr: 
      pro_X_displaymgr_addr: 
      pro_mobileIP_homeagent_addr: 
      pro_SMTPserver_addr: 
      pro_POP3server_addr: 
      pro_NNTPserver_addr: 
      pro_WWWserver_addr: 
      pro_fingerserver_addr: 
      pro_IRCserver_addr: 
      pro_StreetTalkserver_addr: 
      pro_STDAserver_addr: 
      pro_NetBIOS_nameserver_addr: 
      pro_NetBIOS_distrserver_addr: 
      pro_NetBIOS_nodetype: 
      pro_NetBIOS_scope: 
      pro_nis_domain: nis.com
      pro_nisserver_addr: 
      pro_nisplus_domain: 
      pro_nisplusserver_addr: 
      pro_IPforwarding: 
      pro_source_routing: 
      pro_policy_filter: 
      pro_max_reassy_size: 
      pro_IP_ttl: 
      pro_pathmtu_timeout: 
      pro_pathmtu_table: 
      pro_mtu: 1600
      pro_allnets_local: 1
      pro_broadcast: 134.14.90.255 (CHANGE!)
      pro_domask_disc: 0
      pro_resp_mask_req: 0
      pro_do_router_disc: 
      pro_router_solicit_addr: 
      pro_static_routes: 
      pro_trailer_encaps: 
      pro_arpcache_timeout: 
      pro_ether_encaps: 
      pro_TCP_ttl: 
      pro_TCP_keepalive_intrvl: 
      pro_TCP_keepalive_garbage: 
    
You'll need to change some or all of the entries marked with (CHANGE!) your your network.

Restart inetd:
      killall -1 inetd
    
Finally, add an entry mapping the target Indy's MAC address to its IP: add the following line to /etc/ethers:
      08:00:69:0a:42:80       134.14.90.64
    
Change both addresses for your setup. The Indy's MAC address can be got by booting into the PROM, typing printenv and looking at the value of the eaddr variable.

Setup NFS on the IRIX system

Yes, you need NFS here. Export the directory /linux/mipseb so that it is mountable read-write by your target system (134.14.90.64 in our example) by adding the following line to /etc/exports:
      /linux/mipseb        -root=134.14.90.64,rw
    
and run
      exportfs -a
    
This mount point should show up when you confirm with:
      showmount -e
    

Prepare the Indy Hard Disk

I'm assuming that, like me, you're not overwhelmed with resources and have only one hard disk on your target Indy, on which you're going to zap IRIX and install Linux. You need to setup a standard rootdisk partition structure on the disk. If you have a CDROM drive and an IRIX 5.3 CD, with your IRIX 5.3 install CD and load fx to partition the hard disk. At the PROM, type:
      boot -f dksc(0,6,8)sashARCS dksc(0,6,7)stand/fx.ARCS --x
    
Partition the hard disk here. Once that is done, exit fx and reboot. Stop for system maintainence and select the second option, Install System Software. This will load the miniroot and start inst. Within inst, select Option 11 (Admin) and then select Option [something] (mkfs). Exit and reboot.

If you don't have these, or don't want to use this method, you'll have to consult the IRIX manuals to figure out how to repartition your hard disk if necessary.

Note: I doubt if the EFS mkfs is required in the disk preparation phase, but I haven't tried loading Linux without it.

Boot Linux for Base Install

You should now be able to boot the base Linux with going to the PROM command prompt on the Indy and typing:
      bootp():vmlinux
    
If all goes well you should get familiar the Linux boot messages and your root should get NFS-mounted on your IRIX box. RedHat install should start automatically. Create an EXT2 filesystem on the primary partition (/dev/sda1) and install the base system (i.e. ONLY the packages selected by default). I tried to ``Select All'' packages a couple of times but each time the install died half-way through due to a segfault; this could be a hardware problem, but no point in taking chances, right?

Do the standard things to setup your system from then on. DO NOT enable swap, since the HardHat kernel has problems with that. I managed to get a precompiled 2.2.1 kernel later and get swap working fine with that subsequently. DO NOT install printer support: the Indy printer drivers aren't in place yet.

Rebooting Linux

This time through you should be able to reboot and mount the local SCSI disk partition as root. At the Indy PROM, type:
      bootp():vmlinux root=/dev/sda1
    
This should boot and mount your local harddisk as root.

You can mount your NFS-exported partition on your Linux system now and install the remaining rpm's from there.

You can also get various precompiled kernels from ftp://ftp.linux.sgi.com/pub/linux/mips/test/ or a mirror. I'm using a 2.2.1 kernel which works quite well and does swap.

Caveats

There's currently no way I know of to boot Linux off the local disk, since the Indy boot loader doesn't know how to get a file off an ext2fs. Of course, you could keep an EFS partition handy, copy your vmlinux to that and boot from there.

The SGI IRIX server with DHCP has to remain on the network for the system to continue booting, since the kernel checks sends BOOTP requests just before mounting the root partition, for some reason.

The X server does not work as of time of writing.

Parallel port does not work as of time of writing.

ISDN is not supported as of time of writing.

Common problems

1. Make sure you use:
      bootp():vmlinux
    
at the PROM command line, and NOT
      bootp:/vmlinux
    
TFTP doesn't seem to like the second form; I'm sure there's some reason, but I haven't read the docs in detail to find out what yet.

2. An XZ graphics system wouldn't boot for me. Changing it to an 8-bit system solved the problem. I'd presume that 24-bit systems would face no problems either.

3. I understand that extra devices on the SCSI bus can create problems in some (all?) of the kernels. Switch off all CDROMS, Flopticals, tapes, etc before booting. Disconnect all disks which you don't need for the install.

Acknowledgements

Thanks to:

Resources

The SGI/Linux home page
http://www.linux.sgi.com/

Installing Linux on the SGI Indy
http://www.linux.sgi.com/mips/manhattan/

Linux kernel home
http://www.linuxhq.com/

My Linux page :-)
http://reality.sgi.com/raju/linux.html

Changelog

Version 0.2, 990416 Version 0.1, 990415
Raj Mathur
Last modified: Fri Apr 16 11:17:59 IST 1999