Skip to main content.

NetBSD/sgimips: Frequently Asked Questions

General Questions

Other sources of information


General Questions

Things worth knowing about the Indy serial console (top)

Note this information may apply to other models too. To get the machine boot up with a serial console, make sure the keyboard is unplugged when turning on the machine. The serial console runs on serial #1, at 9600, 8N1 by default.

It is also possible to do a "setenv console d" in the PROM monitor to get the console to serial #1, or a "setenv console d2" to get it to serial #2 (default is "g"). Optionally, the console's speed can be set with "setenv dbaud <bps>". After setting these PROM variables either do an "init" or a reboot of the machine is needed.

When booting up Irix on the console, logins on the serial console might be disabled. You can enable them by editing /etc/inittab and adding the following line:

st:23:respawn:/sbin/getty systty co_9600        # serial console - HF

Don't forget to re-read the inittab then with "init q".

The serial port pinouts are the same as SPARC systems' serial ports, so Macintosh serial cables work great for serial-console cables, as long as you are willing to do it without hardware handshaking lines. See the NetBSD Serial Port Primer for more information.

How to bootstrap NetBSD/sgimips? (top)

  • Since NetBSD 3.0 the sgimipscd.iso image is bootable. The easiest way to install NetBSD on your machine is to burn this image to a CD and boot it. Instructions how to boot from a CD can be found here: ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-4.0/sgimips/INSTALL.html#Install%20via%20a%20bootable%20CD-ROM. Of course this assumes your machine has a CD drive. If not, you want to try a netboot.

  • If you do not have a CD drive, you need to netboot the kernel using the SGI's ARCS firmware. See the Diskless NetBSD HOW-TO for more information on setting up netbooting. Some rough steps are:

    1. Unpack the etc.tgz and base.tgz e.g. in /home/indy/root. Run "sh MAKEDEV all" in the root/dev dir.
    2. Go into the machine's PROM, and retrieve the MAC address. Use "printenv eaddr" to do so.
    3. Setup DHCP. Put something like this into /etc/dhcpd.conf:

      ddns-update-style       none;
      subnet 10.0.0.0 netmask 255.255.255.0 {			# Adjust
      	host indy {
      		hardware ethernet 08:00:69:09:93:78;    # Adjust to your MAC address
      		fixed-address 10.0.0.15;                # Adjust
      		#filename "/netbsd";                    # XXX Do NOT set!
      		option root-path "/home/indy/root";
      		server-name="10.0.0.3";
      	}
      }

      Make sure you don not set the "filename", else you cannot specify a different name for the kernel on the PROM's boot command later.

    4. Enter the machine's PROM again, and be sure the IP address is set properly:
      >> printenv netaddr
      netaddr=1.2.3.4
      >> setenv netaddr 10.0.0.15
      >> printenv netaddr
      netaddr=10.0.0.15
    5. Make sure you have tftp enabled in /etc/inetd.conf, then drop a proper kernel into /tftpboot, e.g. netbsd.IP22.
    6. Tell the PROM to do a netboot, loading the "netbsd.IP22" kernel:
      >> boot -f bootp():/netbsd.IP22
      Setting $netaddr to 10.0.0.15 (from server 10.0.0.3)
      Obtaining /netbsd-IP22 from server 10.0.0.3
      ...
    7. When asked for root device, enter "?" to get a list of choices. E.g. "sq0" is the Indy's ethernet.
    8. Just press RETURN for the dump device
    9. Unless you have prepared your disk to boot from it, your root filesystem will most probably be via nfs, so give that for root device: "nfs".
    If you encounter trouble, use tcpdump(8) or pkgsrc/net/wireshark to debug the network traffic. See the Irix prom manpage for more help on PROM commands.
  • Then prepare a second hard disk with NetBSD's FFS and disklabel. You then tell the kernel to use root/swap on the second disk. The firmware can't currently boot the kernel from an FFS filesystem, though, and you'll need to boot that via the net for now.

To start bootstrapping, the following files are needed:

How to crosscompile a sgimips kernel? (top)

NetBSD 1.6 and later systems have full support for cross-compilation of the base system, even as a non-root user and even on non-NetBSD hosts. See the Cross-building NetBSD under NetBSD Documentation pages for details.

How can I cross-build an sgimips bootable install CD? (top)

Follow the crosscompiling instructions to cross-build an sgimips release (ie build.sh release), then go to the src/etc directory and use the nbmake-sgimips wrapper created in your tool directory to make a bootable cd:

$TOOLDIR/bin/nbmake-sgimips iso-image

The resulting image can be burnt to CD-RW using your regular cd-writing tools.

How to reset $eaddr on IP22 etc.? (top)

Here's a method to set the ethernet address that works on at least the Indy, and perhaps also other machines with HPC3's.

All disclaimers apply yadda yadda.

At the PROM prompt:

dump -w -x 0xbfbe04e8

Sanity check the output here to see if it matches the address given in the 'ec0: bad ethernet address' error message. If not, you may not want to overwrite whatever is there instead.

fill -w -v 0xGG 0xbfbe04e8
fill -w -v 0xHH 0xbfbe04ec
fill -w -v 0xII 0xbfbe04f0
fill -w -v 0xJJ 0xbfbe04f4
fill -w -v 0xKK 0xbfbe04f8
fill -w -v 0xLL 0xbfbe04fc

Where GG:HH:II:JJ:KK:LL is the intended ethernet address. It's a very good idea to reuse the address the machine was shipped with. Check the back of the machine if you cannot remember it.

Power down, wait one full minute and then power up. All variables will have been reset as with the resetenv command, except $eaddr.

PROM tftp client failing with default NetBSD tftpd settings (top)

The PROM tftp client on SGI machines can fail with default NetBSD tftpd settings. The problem is that your current PROM may not support port numbers with the sign bit set. The workaround is to limit the port numbers of anonymous connections to 32767. The following tunables should fix your problem:

# sysctl -w net.inet.ip.anonportmin=20000
# sysctl -w net.inet.ip.anonportmax=32767

Other PROM issues you might encounter (top)

There are a few gotchas depending on your PROM version and the OS (SASH) version installed:

  1. Old versions of SASH have an issue with incorrectly reporting the memory map... If the kernel panics with a UVM related msg on boot (even before the copyright message), try booting the kernel directly from the PROM rather than via sash (An I2 also had this problem before upgrading to IRIX 6.x -- it was running 5.3 before).
  2. Another old PROM issue -- old PROMs don't understand ELF, so you may need an ECOFF kernel. A workaround for this is to use sash, which seems to understand ELF even in IRIX 5.x, but see problem #1.

How to boot from a local drive (using sgivol) (top)

When installing NetBSD, leave space at the start of the disk for the partition that will be using by the PROM to load the bootloader, etc. This partition is called the Volume Header. This needs to be a minimum of 3135 blocks (see SGI_BOOT_BLOCK_SIZE_VOLHDR in /usr/include/sys/bootblock.h). An example disklabel is shown below. Partition i will be used for the Volume Header as is SGI convention.

sgimips# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: mydisk
label: fictitious
flags:
bytes/sector: 512
sectors/track: 135
tracks/cylinder: 8
sectors/cylinder: 1080
cylinders: 4078
total sectors: 4404240
rpm: 7200
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   3377306      3183     4.2BSD   1024  8192 45640  # (Cyl.      2*-    3130*)
 b:   1024000   3380489       swap                     # (Cyl.   3130*-    4078+)
 c:   4404489         0    unknown                     # (Cyl.      0 -    4078+)
 i:      3183         0    unknown                     # (Cyl.      0 -       2*)

After installing NetBSD, you can use the sgivol utility (located in /usr/mdec) to manipulate this partition. First, it must be initialised:

sgivol -i sd0
Next, copy the appropriate bootloader as filename 'boot' into the volume header:
sgivol -w boot /usr/mdec/ip2xboot sd0
To upgrade the bootloader (or change it if the disk is moved to a different model of machine), first delete the existing file before copying the new file (as above):
sgivol -d boot sd0

The contents of the volume header can be viewed by using the following command:

sgivol sd0

Example output is shown below:

disklabel shows 4404240 sectors
checksum: 00000000
root part: 0
swap part: 1
bootfile: /netbsd

Volume header files:
sgilabel offset    2 blocks, length      512 bytes (1 blocks)
ide      offset    3 blocks, length   322048 bytes (629 blocks)
sash     offset  632 blocks, length   322048 bytes (629 blocks)
boot     offset 1261 blocks, length    53296 bytes (105 blocks)

SGI partitions:
 0:a blocks  3377306 first     3183 type  4 (BSD4.2)
 1:b blocks  1024000 first  3380489 type  3 (Raw)
 8:i blocks     3199 first        0 type  0 (Volume Header)
10:k blocks  4404489 first        0 type  6 (Volume)

Other sources of information

Other NetBSD Documentation (top)

Other Off-Site Documentation (top)


Back to  NetBSD/sgimips Port Page