IRIX PROM, Booting and Recovery: Miniroot, sash and Single-User Mode

SGI IRIX series, part 6. Earlier parts: overview, admin commands (including nvram), software installs, disks and XFS and networking. This part is the firmware and recovery path: the PROM monitor, sash, single-user mode, the miniroot, and what to do when the system will not boot.

PROM commands and variables come from the IRIX 6.5.30 prom(1M) and nvram(1M) pages. Miniroot behavior comes from inst(1M) and the SGI installation guides cited below. Standalone fx boot lines are from fx(1M). This is a reference post, not a lab. I did not run these commands on IRIX hardware for this post. Work from the console or a serial terminal, not over the network, when you change boot variables or repair disks.

Prerequisites

  • Physical or serial console access. If the graphics console is unusable, attach a terminal to the first serial port and be ready to set console d (part 2).
  • The IRIX installation CD that matches your overlay level (and stream, if you are still on 6.5.22 or earlier), or a known-good network distribution. You need this to load the miniroot or standalone fx.
  • A backup, if the system still boots far enough to make one. Recovery tools can repair a filesystem or reinstall software; they cannot invent a missing backup.
  • The disk names from a previous hinv (or from hinv in the PROM / miniroot). Confirm the system disk before you run xfs_repair or fx.

The System Maintenance Menu

SGI systems boot from an ARCS PROM. At power-on there is a short countdown (on the order of ten seconds). Press Esc during that countdown to get the System Maintenance Menu instead of a normal IRIX boot. The usual items are:

  1. Start System — boot IRIX from the default disk and kernel.
  2. Install System Software — load the miniroot and start inst (part 3).
  3. Run Diagnostics — PROM or standalone diagnostics, depending on the system.
  4. Recover System — a recovery path that also uses the miniroot (restore from a system-recovery backup if you have one, or get a maintenance environment).
  5. Enter Command Monitor — the >> PROM prompt used in the rest of this post.

If the machine boots too quickly to reach the menu, set AutoLoad to No from a running system (nvram -v AutoLoad No) or from the Command Monitor, then reset. Part 2 covers nvram from IRIX.

Command Monitor

Option 5 gives a >> prompt. Useful commands:

CommandWhat it does
printenv / printenv nameList all PROM variables, or one variable.
setenv name valueSet a variable (the PROM spelling of nvram -v).
unsetenv name / resetenvRemove one variable, or reset non-volatile variables to factory defaults (not the PROM password).
hinvHardware inventory from the PROM, including disks and the CD drive.
bootBoot the default kernel using OSLoadPartition, SystemPartition and OSLoader.
singleBoot IRIX into single-user mode (when the PROM supports it as a command; otherwise use the boot flags below).
passwdSet or change the PROM password, if the system has one.
reset / init / offReset, reinitialize or power down, depending on the system.

Variables that affect boot

VariableMeaning
AutoLoadYes boots IRIX automatically. No stops at the System Maintenance Menu.
consoleg (or g0, g1) for graphics, d for the first serial port. A wrong value can make it look as if the machine is dead.
netaddrIPv4 address the PROM uses for network boot or network install.
OSLoadPartition, SystemPartition, OSLoaderWhere the kernel and the standalone loader (sash) live. Leave these at the defaults unless you are moving the system disk.
>> printenv
>> printenv AutoLoad
>> setenv AutoLoad No
>> setenv console d
>> hinv

Do not set console d unless a serial terminal is attached and set to the right speed (often 9600 8N1, but check the hardware manual for that system). resetenv is a last resort; it also clears site-specific network and boot settings.

sash and standalone programs

sash is the SGI standalone shell, stored in the volume header (partition 8) or loaded from CD. The PROM uses it as OSLoader to find and start the IRIX kernel. You also use it as a prefix when you boot a standalone program from a CD, which is how you start standalone fx. The fx(1M) page gives these Command Monitor lines, where ctlr is the CD-ROM controller (usually 0) and unit is its SCSI id:

# 32-bit ARCS PROM (Indy, Indigo2, O2, and similar)
>> boot -f dksc(ctlr,unit,8)sashARCS dksc(ctlr,unit,7)stand/fx.ARCS

# 64-bit ARCS PROM (Octane, Origin, Fuel, Tezro, and similar)
>> boot -f dksc(ctlr,unit,8)sash64 dksc(ctlr,unit,7)stand/fx.64

Use standalone fx when you must change the system disk label or partitions (part 4). The IRIX fx command cannot safely do that while the disk is in use.

Single-user mode

Single-user mode is IRIX at run level 1: a root shell, disks mounted only as far as the system disk, networking and the desktop not started. Use it for fstab mistakes, a failed service that blocks multi-user boot, or a quick root-password recovery on a lab machine.

From a running system:

# example: go to single-user from multi-user
shutdown -y -g0 -i1
# or: init 1

From the PROM, boot single-user if the Command Monitor offers single, or pass a single-user boot to the kernel (the exact flag can vary; on many 6.5 systems boot -s or selecting a single-user start from the menu is the documented path). You will need the root password unless the system was left without one — and if it has no root password, set one before you put the machine back on any network (part 2).

When you are done, init 2 returns to the normal IRIX multi-user run level (IRIX uses 2, not 3, as the default multi-user state).

The miniroot

The miniroot is a small IRIX environment that the PROM loads into the swap partition. It contains a kernel, inst, and enough tools to install software and repair the system disk. After it loads, the real root and /usr filesystems are mounted as /root and /root/usr. This is the environment you use to:

  • Install or upgrade IRIX overlays and any product that cannot be installed live (part 3). inst starts automatically after a normal miniroot load from Install System Software.
  • Run xfs_repair on the root filesystem, which you must not repair while it is mounted as /.
  • Fix files under /root/etc (for example a broken fstab or sys_id) when the system will not reach multi-user mode.

To load it, put the matching IRIX installation CD in the drive (or point the PROM at a network distribution), choose Install System Software from the System Maintenance Menu, and follow the prompts for the local CD or the remote source. The inst(1M) page notes that loading the miniroot from tape is not possible as of IRIX 6.2.

Once you have a miniroot shell (quit inst or choose a recovery shell, depending on the path you took), the system disk is visible under /root. Examples of the kind of commands you run there:

# examples in the miniroot — device names must match THIS machine
df -k
ls /root /root/usr /root/etc
# repair a dirty or damaged root filesystem (unmount first if it is mounted)
xfs_repair -n /dev/dsk/dks0d1s0
xfs_repair /dev/dsk/dks0d1s0
# inspect or edit configuration as it will be seen after reboot
view /root/etc/fstab
view /root/etc/sys_id

When you leave the miniroot, the swap partition is returned to use as swap, so do not leave anything you care about only in miniroot memory or on the swap device. Reboot into the installed system and confirm it comes up.

A practical recovery order

  1. Get a console. If there is no video, try a serial terminal and setenv console d only when the terminal is attached.
  2. Stop at the System Maintenance Menu (Esc, or AutoLoad No).
  3. Try Start System once, so you know whether the failure is consistent.
  4. If IRIX starts but is unusable, boot single-user and fix /etc/fstab, failed boot scripts, or disk space.
  5. If the kernel does not start, or root is dirty, load the miniroot and run xfs_repair on the root device, then try Start System again.
  6. If the label or partition table on the system disk is wrong, boot standalone fx from the CD (part 4). Do this only when you understand the current layout; a wrong auto on the system disk is catastrophic.
  7. If the OS installation itself is broken, stay in the miniroot and use inst to reinstall or overlay from the matching media (part 3). Do not mix m and f overlay streams.
  8. If you have a System Recovery backup made from this machine, Recover System is the path to restore it. A backup from a different host or overlay level is not a shortcut.

Verification checklist

  • You can reach the System Maintenance Menu and the Command Monitor, and printenv shows the console, AutoLoad and load-partition variables you expect.
  • A normal boot or Start System reaches a login (or the desktop) after a repair.
  • After a miniroot session, uname -R still shows the overlay you intended, and versions changed has been reviewed (parts 2 and 3).
  • If you changed console or AutoLoad, a reset still leaves you with a usable console.
  • Swap works after you leave the miniroot (swap -l from IRIX).

Troubleshooting

ProblemLikely causeFix
No video and no obvious bootconsole set to serial, a bad graphics board, or AutoLoad looping on a broken kernelAttach a serial terminal before changing console. Use the menu to reach the Command Monitor and boot the miniroot.
Countdown is too fast to hit EscAutoLoad Yes and a short delaySet AutoLoad No from IRIX with nvram while you still can, or catch Esc on a power cycle.
Miniroot will not load from tapeRemoved as of IRIX 6.2Use a CD or a network distribution directory.
xfs_repair in miniroot reports the wrong deviceSystem disk is not unit 1, or root is not partition 0Use PROM hinv and the volume label (part 4); do not guess.
System boots back into a half-finished installinst did not finish, or a reboot was required and did not happenReturn to the miniroot, finish conflicts and go, then reboot cleanly (part 3).
No console after setenv console dNo terminal on the serial portAttach one, or use the hardware password-jumper / graphics-restore method described in the hardware manual and prom(1M).

AlmaLinux equivalents

  • Firmware menu: UEFI setup, not an ARCS PROM. Boot loader: GRUB 2 (grub2-editenv, efibootmgr).
  • Single-user / rescue: systemd rescue.target or rd.break, and the AlmaLinux installation media in rescue mode, which is the closest equivalent of the miniroot.
  • Repair the root XFS filesystem from the rescue environment, not while it is mounted as /: xfs_repair.
  • There is no sash and no volume-header standalone fx.

Next in this series

Part 7, the last IRIX post in this series, is a tour of the Indigo Magic desktop and the applications these machines were known for: Maya, Softimage, Inventor, Performer, Showcase and the MIPSpro compilers.

Sources

  • IRIX 6.5.30 reference pages: prom(1M), nvram(1M), inst(1M), fx(1M), as published on man.irix.fans.
  • SGI, IRIX Admin: Software Installation and Licensing (document 007-1364) and IRIX 6.5 Installation Instructions (document 007-3862).
  • SGI, IRIX Admin: System Configuration and Operation (document 007-2859).
  • AlmaLinux and RHEL documentation for rescue mode, GRUB and xfs_repair.

Leave a Reply

Your email address will not be published. Required fields are marked *