NetBSD/sgimips: Frequently Asked Questions
- Things worth knowing about the Indy serial console
- How do I reset $eaddr on IP22 etc.?
- PROM tftp client failing with default NetBSD tftpd settings
- Other PROM issues you might encounter
- Updating the bootloader (using sgivol)
Things worth knowing about the Indy serial console (top)
Note that this information may apply to other models too. To get the machine to 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
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 "
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 do I 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:
- Old versions of SASH have an issue with incorrectly reporting the memory map. If the kernel panics with a UVM related message 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).
- 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.
Updating the bootloader (using sgivol) (top)
When installing NetBSD using sysinst, it will leave space at the start of the
disk for the partition that will be used 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 (partition 8).
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. If not set up already, it must be initialised (N.B. sysinst will set this up correctly):
sgivol -i sd0
To upgrade the bootloader (or change it if the disk is moved to a different model of machine), first delete the existing file:
sgivol -d boot sd0
Next, copy the appropriate bootloader as filename 'boot' into the volume header:
sgivol -w boot /usr/mdec/ip2xboot sd0
You can have multiple bootloaders present (with different names). This is very useful when booting different versions of NetBSD (e.g., to upgrade from NetBSD 3 to 5.0 using a new INSTALL kernel) as changes in bootinfo mean that NetBSD 4.0 and earlier kernels will not work with a newer bootloader.
The contents of the volume header can be viewed by using the following command:
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)