Posts by Category

Buttons

Pure New Zealand

This site is driven by Blosxom

T
his site was written in vi

SDF is driven by NetBSD

Subscribe to this sites RSS/XML feed

This site has a Tableless Stylesheet

Email me
home :: tech :: unix :: irix

Sep 06, 2006

End of the line for IRIX

I guess SGI were going down the drain anyway but its still a shame to see them turn into YALV (Yet Another Linux Vendor) - SGI To Drop MIPS, Irix, Moves to Itanium, Linux.

I guess there problems came as a result of over-pricing their gear, not forseeing the graphics-card revolution on the PC and their doomed foray into NT workstations.

Sigh.

I quite liked IRIX.

And then there were three - Solaris, AIX and HP-UX . . .

Permalink | 2006.09.06-20:58.00

Dec 29, 2004

Useful Irix Information

Booting from another drive

Boot into PROM monitor, and perform the following commands:

setenv SystemPartition scsi(0)disk(2)rdisk(0)partition(8)

setenv OSLoadPartition scsi(0)disk(2)rdisk(0)partition(0)

setenv root dks0d2s0

Then when you load the miniroot in the install process, you will be pointed to the drive you want(obviously the disk and root must be set to the correct IDs, not necessarily the above).

Also, if you ever need to do a one-time boot off an alternate drive, you can boot the PROM monitor and issue the following command:

boot -f dksc(0,2,8)sash dksc(0,2,0)unix root=dks0d2s0

This is useful if you are installing/configuring multiple systems using a build disk.

 

Disk Clone Script (use with extreme caution it)

This is taken from the google cache (the original page no longer exists).

Information on the script taken from the original web page is here followed by the original script (save to file, chmod +x it and then run it).

The Solution -- SCSI Cloning


The modern SGI models (O2's, OCTANEs, and Origins/Onyx2's) all feature sled-mounted internal SCSI drives that get their ID number from the slot that they are placed in. Better yet, with the exception of the R10K/R12K O2) all the machines have an available internal slot for a second disk (in the high-end O2 the larger CPU takes up the second disk slot).


With a little scripting it's possible to use the second disk slot to build a ``clone'' of the system disk in 10-15 minutes. This cloned disk can be moved to another machine (thus allowing rapid duplication of a ``lab's worth'' of system disks) or kept on hand as a backup in case of disk failure.


One of the many advantages to this is better security. The sysadmin can bring up a single workstation and configure it as necessary (closing the ``deadly 7'' open accounts, installing tcp wrappers and ssh, turning off unnecessary services, etc) before it is placed on the network. Clones of the system then inherit the secure configuration without going through a ``window of vulnerability'' during the network installation/configuration.


The dupit Script


My cloning script is named "dupit'' (the name borrowed from a script with a similar function that was in use internally at SGI). Without options the script makes a copy of the current system disk (drive 1) on drive two (though the destination drive can be specified with the -d flag. The script also:
Repartitions the drive so that the swap partition is 256 MB. The default can be changed by editing the script, or the user can specify any size in MB using the -s flag.
Turns off networking on the new system (so that the admin can reconfigure it once the new workstation is brought up. The -c flag will defeat this and make the cloned disk an exact copy of the current system disk (useful when making a backup system disk).
The script runs correctly in both single-user and multi-user states, though I usually use single user mode to help insure the duplication (most of which is accomplished using xfsdump) goes smoothly. When using it to install lab machines, I usually make a single ``test machine'' with the dupit script installed at /etc/dupit that is left running in the lab for students and faculty to use. Once I'm sure the test machine works as designed, I then use it as a ``master'' to create clone disk(s), which I can install in other workstations. Bringing up a cloan is as simple as booting, login in as root and configuring networking. Since all machines have dupit installed, I can ``rebuild'' a crashed disk from any working machine in the lab.

The Source


#!/bin/sh
# the magical, mystical dupit script
# All new sh version by D. Southard
# comments to dsouth@nd.edu

# Defaults
KLOANDEV=dks0d2s0
SWAPMB=256


#
# Get the options/parameters to the program
#

while getopts cs:d: i
do
case $i in
c) EXACTCOPY="yes"
;;
s) SWAPMB=${OPTARG}
;;
d) KLOANDEV=${OPTARG}
;;
*) echo "the magical, mystical, dupit script"
echo "all new by Dale Southard <dsouth@nd.edu>"
echo "Usage:"
echo " dupit -c [-s <swap in MB>] [-d <cloan's dks?d?s?>]"
exit 1
;;
esac
done


#
# Sanity check the destination drive
#
if ! [ -c /dev/rdsk/${KLOANDEV} ] ; then
echo "The destination device must exist <dks?d?s0>"
exit
elif [ ${KLOANDEV} != ${KLOANDEV%s0}s0 ] ; then
echo "The destinaion device must be lun 0 <dks?d?s0>"
exit
fi
umount /dev/dsk/${KLOANDEV} > /dev/null 2>&1


#
# Create the temporary fx script file
#
FXSCRIPT=/var/tmp/fx.script
rm -rf $FXSCRIPT

echo "${KLOANDEV} standard root" >> $FXSCRIPT
if [ $SWAPMB != "" ] ; then
SWAPBLKS=`expr $SWAPMB \* 2048`
echo "${KLOANDEV%s0}s1 followspart8:${SWAPBLKS} swap" >> $FXSCRIPT
echo "${KLOANDEV} followspart1:remainder xfs" >> $FXSCRIPT
fi


#
# Repartition the drive based on the script
#
/usr/bin/fx -x -s $FXSCRIPT
rm -rf $FXSCRIPT


#
# Create the file system and mount it
#
/sbin/mkfs_xfs /dev/rdsk/${KLOANDEV}
if ! [ -d /mnt ] ;then
mkdir /mnt
fi
mount /dev/dsk/${KLOANDEV} /mnt


#
# Dump the source drive to the destination drive
#
hostname `cat /etc/sys_id`
xfsdump -J -l 0 - / | xfsrestore - /mnt


#
# Copy the volume header files.
#

VOLHDR_FILES=`dvhtool -v list | grep -v File | grep -v Current | grep -v sgilabel | grep -v '^$' | awk '{} {printf "%s ",$1}'`

for VHFILE in $VOLHDR_FILES; do
rm -rf /var/tmp/$VHFILE
dvhtool -v get $VHFILE /var/tmp/$VHFILE /dev/rdsk/dks0d1vh
dvhtool -v create /var/tmp/$VHFILE $VHFILE /dev/rdsk/${KLOANDEV%s0}vh
rm /var/tmp/$VHFILE
done

#
# If we are making an exact clone, skip the rest
#
if ! [ ${EXACTCOPY} = "yes" ]; then

#
# Turn off networking on the new disk
#

echo "off" > /mnt/etc/config/network

# If your site needs anyting else removed/turned off
# (ssh_host_key, AFS/DFS, etc) this would be a
# good place to do it.

fi

#
# Done.
#

echo " "
echo "You're done. shutdown, move the disk and configure networking."
exit 0


Adding / Preparing Disks under IRIX

From http://www.uwsg.iu.edu/usail/peripherals/disks/adding/sgi.html

Adding Disks under IRIX
Once the disk has been physically installed and the machine has been rebooted, the hinv command can be used to check if it is recognized:

# hinv | grep Disk
Disk drive: unit 5 on SCSI controller 0
Disk drive: unit 1 on SCSI controller 0

Under IRIX, device nodes are in the format /dev/[r]dsk/dksSdDsS, where S is the disk controller number, D is the SCSI ID of the disk, and S is the partition number. In our example, we'll be working with the disk on SCSI ID 5, so we will use /dev/[r]dsk/dks0d5s*.
Labeling the Disk The fx command is used to label and partition the disk. It should be invoked in expert mode, using the -x option:

edcert23 2# fx -x
fx version 5.3, Oct 18, 1994
fx: "device-name" = (dksc)
fx: ctlr# = (0)
fx: drive# = (1) 5
...opening dksc(0,5,)
...controller test...OK
Scsi drive type == HP C3724S 5153
fx: Warning: no sgilabel on disk
fx: Warning: can't read sgilabel on disk

creating new sgilabel

----- please choose one (? for help, .. to quit this menu)-----
[exi]t [d]ebug/ [l]abel/
[b]adblock/ [exe]rcise/ [r]epartition/
fx>

Since this is a new disk, fx gives a warning that it is not yet labeled with an SGI disk label. The label submenu is used to put a new label on the disk:

----- please choose one (? for help, .. to quit this menu)-----
[exi]t [d]ebug/ [l]abel/ [a]uto
[b]adblock/ [exe]rcise/ [r]epartition/ [f]ormat
fx> label

----- please choose one (? for help, .. to quit this menu)-----
[sh]ow/ [sy]nc [se]t/ [c]reate/
fx/label> create

----- please choose one (? for help, .. to quit this menu)-----
[p]artitions [s]giinfo [b]ootinfo [d]irectory [a]ll
fx/label/create> all

...creating default bootinfo
...creating default partitions
...creating default sgiinfo
...creating default volume directory

----- please choose one (? for help, .. to quit this menu)-----
[p]artitions [s]giinfo [b]ootinfo [d]irectory [a]ll
fx/label/create> ..

----- please choose one (? for help, .. to quit this menu)-----
[sh]ow/ [sy]nc [se]t/ [c]reate/
fx/label> ..

----- please choose one (? for help, .. to quit this menu)-----
[exi]t [d]ebug/ [l]abel/ [a]uto
[b]adblock/ [exe]rcise/ [r]epartition/ [f]ormat
fx> exit

label info has changed for disk dksc(0,5,). write out changes? (yes) yes

Partitioning the Disk
To partition the disk, the partition submenu is entered:

fx> repartition

----- partitions-----
part type cyls blocks Megabytes (base+size)
0: efs 4 + 73 2800 + 51100 1 + 25
1: raw 77 + 117 53900 + 81900 26 + 40
8: volhdr 0 + 4 0 + 2800 0 + 1
10: volume 0 + 3363 0 + 2354100 0 + 1149

capacity is 2354660 blocks

----- please choose one (? for help, .. to quit this menu)-----
[ro]otdrive [o]ptiondrive [e]xpert
[u]srrootdrive [re]size
fx/repartition>

To create new partitions, enter expert mode. In this case, two similar-sized partitions will be created:

fx/repartition> expert

Warning: you will need to re-install all software and restore user data
from backups after changing the partition layout. Changing partitions
will cause all data on the drive to be lost. Be sure you have the drive
backed up if it contains any user data. Continue? yes
Enter .. when done
fx/repartition/expert: change partition = (0) <RETURN>
before: type efs base: 4 cyls, 2800 blks, 1 Mb
len: 73 cyls, 51100 blks, 25 Mb
fx/repartition/expert: partition type = (efs) <RETURN>
fx/repartition/expert: base cyl = (4) <RETURN>
fx/repartition/expert: number of cyls (max 3359) = (73) 1675
after: type efs base: 4 cyls, 2800 blks, 1 Mb
len: 1675 cyls, 1172500 blks, 573 Mb
fx/repartition/expert: change partition = (1) <RETURN>
before: type raw base: 77 cyls, 53900 blks, 26 Mb
len: 117 cyls, 81900 blks, 40 Mb
fx/repartition/expert: partition type = (raw)efs
fx/repartition/expert: base cyl = (77) 1679
fx/repartition/expert: number of cyls (max 1684) = (117) 1684
after: type efs base: 1679 cyls, 1175300 blks, 574 Mb
len: 1684 cyls, 1178800 blks, 576 Mb
fx/repartition/expert: change partition = (6) ..

----- partitions-----
part type cyls blocks Megabytes (base+size)
0: efs 4 + 1675 2800 + 1172500 1 + 573
1: efs 1679 + 1684 1175300 + 1178800 574 + 576
8: volhdr 0 + 4 0 + 2800 0 + 1
10: volume 0 + 3363 0 + 2354100 0 + 1149

capacity is 2354660 blocks

----- please choose one (? for help, .. to quit this menu)-----
[ro]otdrive [o]ptiondrive [e]xpert
[u]srrootdrive [re]size
fx/repartition> ..

----- please choose one (? for help, .. to quit this menu)-----
[exi]t [d]ebug/ [l]abel/ [a]uto
[b]adblock/ [exe]rcise/ [r]epartition/ [f]ormat
fx> exit

label info has changed for disk dksc(0,5,). write out changes? (yes) <RETURN>

The partition table can also be viewed using the prtvtoc command:

edcert23 10# prtvtoc /dev/rdsk/dks0d5s0
* /dev/rdsk/dks0d5s0 (bootfile "/unix")
* 512 bytes/sector
* 140 sectors/track
* 5 tracks/cylinder
* 3363 cylinders
* 4 cylinders occupied by header
* 3359 accessible cylinders
*
* No space unallocated to partitions

Partition Type Fs Start: sec (cyl) Size: sec (cyl) Mount Directory
0 efs 2800 ( 4) 1172500 (1675)
1 efs 1175300 (1679) 1178800 (1684)
8 volhdr 0 ( 0) 2800 ( 4)
10 volume 0 ( 0) 2354100 (3363)

Creating New Filesystems
Once the drive has been partitioned and labeled, mkfs is used to create new filesystems on the partitions, and fsck is used to check the integrity of the new filesystem:

edcert23 11# mkfs /dev/dsk/dks0d5s0
mkfs_efs: /dev/dsk/dks0d5s0: blocks=1172500 inodes=123264
mkfs_efs: /dev/dsk/dks0d5s0: sectors=140 cgfsize=32561
mkfs_efs: /dev/dsk/dks0d5s0: cgalign=1 ialign=1 ncg=36
mkfs_efs: /dev/dsk/dks0d5s0: firstcg=289 cgisize=856
mkfs_efs: /dev/dsk/dks0d5s0: bitmap blocks=287
edcert23 12# fsck -y /dev/rdsk/dks0d5s0

fsck: checking /dev/rdsk/dks0d5s0

** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
FREE INODE COUNT WRONG IN SUPERBLK
FIX? yes

** Phase 5 - Check Free List
2 files 22 blocks 1141358 free
CHECKSUM WRONG IN SUPERBLK
FIX? yes

***** FILE SYSTEM WAS MODIFIED *****

Permalink | 2004.12.29-20:04.00

Nov 11, 2004

Irix Upgrade Procedure

Irix 6.5 is the current base OS. It is possible to update 6.5 'live' while the system is running and then reboot for changes to take affect. Irix OS installs prior to this will require an offline OS upgrade by booting off an external CD or trying a network boot. Pre-Irix 6 (many old Indigo and Indy machines have 5.3/5.4 installed) the disk will need to be reformated so any data will be lost unless its backed up.

Overlays (like Windows Service Packs and SUS Updates) keep the Irix OS up to date with new features and patches.

At the time of writing Irix 6.5 Overlay 26 is current (often referred to as just 6.5.26).

The most recent updates can be obtained from the SGI support site.

Odd things happen to some of our products when you update beyond 6.5.18 so be very wary of updating beyond this level unless specifically requested. The problems tend to relate to changes in particular Fortran calls in newer overlays - these seemed to have happened between 6.5.18 and 6.5.20 onwards.

Another big change of note specifically to IT is that autofs became a peer service - no need to mess around with amd. Autofs stabilised around 6.5.14 so where possible we should convert machines to using this in place of amd.

What I tend to do is download each CD and uncompress the contents to our IT SGI in vema:/export/sgi_install seperate from the core 6.5 CD's. Where possible I try to keep an older Overlay set around for compatibility reasons (6.5.16 is the old Overlay on vema:/export/sgi_install). If we had enough SGI machines we might automate updates with Roboinst.

There is an installation 'gotcha' - if you get these errors when opening an overlay for installation

WARNING: Invalid filetype "X" at line 172 of x_eoe_6524m.idb

WARNING: Invalid filetype "X" at line 520 of x_eoe_6524m.idb

WARNING: Invalid filetype "X" at line 636 of x_eoe_6524m.idb

WARNING: Invalid filetype "X" at line 1878 of x_eoe_6524m.idb

WARNING: Invalid filetype "X" at line 1879 of x_eoe_6524m.idb

WARNING: Invalid filetype "X" at line 1880 of x_eoe_6524m.idb

You need to install Patch 5086 if you make the jump from a pre 6.5.20 install to a current Irix Overlay (eg installing from 6.5.16 to 6.5.24 -> install the patch first). The patch is in /export/sgi_install/patches on vema.

You need to be root to run 'inst' the Irix software installer - here you can see a) becoming root, b) mounting the sgi_install directory and c) checking its contents d) running inst

bash-2.00$ su

Password:

octagon# bash

# cd /

# ls

CDROM/ debug/ etc/ hw/ lib64/ ns/ proc/ sbin/ tmp/ unix* var/ Desktop/ dev/ export/ lib/ mnt/ oSYSLOG root/ stand/ tmp_mnt/ usr/ web/ bin/ dumpster/ hosts/ lib32/ mnt_tmp/ opt/ s/ t@ u/ v/

# cd /export

# ls

octagon/ temp/

# ls temp

# mount vema:/export/sgi_install temp

# ls temp

6.5.16_Inst_Overlay1/ 6.5_Aug2002_Apps/ 6.5_Found1/ 6520_Inst_Overlay1/ 6524/ FW_Nov2002_Pt4/ 6.5.16_Inst_Overlay2/ 6.5_Dev_Found/ 6.5_Found2/ 6520_Inst_Overlay2/ FW_Nov2002_Pt1/ MIPSpro_7.3/ 6.5.16_Inst_Overlay3/ 6.5_Dev_Found_1.2/ 6.5_NFS/ 6520_Inst_Overlay3/ FW_Nov2002_Pt2/ oracle/ 6.5.16_Inst_Overlay4/ 6.5_Dev_Lib/ 6519_Apps/ 6520_Inst_Overlay4/ FW_Nov2002_Pt3/

# cd temp

# cd 6524

# ls

6524_Apps/ 6524_Comp_Apps/ 6524_Overlay1/ 6524_Overlay2/ 6524_Overlay3/

# inst

The inst installation routine begins

Default distribution to install from: /export/temp/6.5_Found2/dist

For help on inst commands, type "help overview".

Inst 4.1 Main Menu

1. from [source ...] Specify location of software to be installed

2. open [source ...] Specify additional software locations

3. close [source ...] Close a software distribution location

4. list [keywords] [names] Display information about software subsystems

5. go Perform software installation and removal now

6. install [keywords] [names] Select subsystems to be installed

7. remove [keywords] [names] Select subsystems to be removed

8. keep [keywords] [names] Do not install or remove these subsystems

9. step [keywords] [names] Interactive mode for install/remove/keep

10. conflicts [choice ...] List or resolve installation conflicts

11. help [topic] Get help in general or on a specific word

12. view ... Go to the View Commands Menu

13. admin ... Go to the Administrative Commands Menu

14. quit Terminate software installation

Inst>

Select 1 to select the install source - we've copied all the cd's to vema so you'll see this particular machine already has some of the paths listed from previous upgrades.

Be sure to select the Overlay 1 CD first - that way inst knows to expect other CD's

Previous installation sites:

1 /export/temp/6.5_Found2/dist

2 /export/temp/6.5_Found1/dist

3 /export/temp/6.5_NFS/dist/dist6.5

4 /export/temp/6.5_NFS/dist

5 /export/temp/6.5_Dev_Lib/dist

6 /export/temp/6.5_Dev_Found/dist/dist6.5

7 /export/temp/6.5_Dev_Found/dist

8 /export/temp/6.5_Aug2002_Apps/dist

9 /export/temp/6.5.16_Inst_Overlay4/dist

10 /export/temp/6.5.16_Inst_Overlay3/dist

11 none (no distribution, view installed products)

12 quit (no additional distributions, return to inst prompt)

Install software from: [/export/temp/6.5_Found2/dist] /export/temp/6524/6524_Overlay1/cd1

Feed inst the path for all of the other CD's which you'll need - inst will open each one and read its contents and then allow you to give it the path to another CD

Install software from: [/export/temp/6.5_NFS/dist/dist6.5] /export/temp/6.5_Dev_Lib/dist

Reading product descriptions .. 0%

Setting distribution to /export/temp/6.5_Dev_Lib/dist

Reading product descriptions .. 100% Done.

If you plan to install from another distribution, either choose from the list below or enter the name of a different distribution. This will allow you to make selections from two or more distributions before starting the install.

Enter "done" if you are ready to proceed with the installation now.

1 /export/temp/6.5_Dev_Lib/dist

2 /export/temp/6.5_NFS/dist/dist6.5

3 /export/temp/6.5_Found2/dist

4 /export/temp/6.5_Found1/dist

5 /export/temp/6524/6524_Apps/apps

6 /export/temp/6524/6524_Overlay3/cd3

7 /export/temp/6524/6524_Overlay2/cd2

8 /export/temp/6524/6524_Overlay1/cd1

9 /export/temp/6.5_NFS/dist

10 /export/temp/6.5_Dev_Found/dist/dist6.5

11 done (distribution information read, return to inst prompt)

Install software from: [/export/temp/6.5_Dev_Lib/dist] /export/temp/6.5_Dev_Found/dist/dist6.5

Reading product descriptions .. 0%

Setting distribution to /export/temp/6.5_Dev_Found/dist/dist6.5

Reading product descriptions .. 100% Done.

If you plan to install from another distribution, either choose from the list below or enter the name of a different distribution. This will allow you to make selections from two or more distributions before starting the install.

Enter "done" if you are ready to proceed with the installation now.

1 /export/temp/6.5_Dev_Found/dist/dist6.5

2 /export/temp/6.5_Dev_Lib/dist

3 /export/temp/6.5_NFS/dist/dist6.5

4 /export/temp/6.5_Found2/dist

5 /export/temp/6.5_Found1/dist

6 /export/temp/6524/6524_Apps/apps

7 /export/temp/6524/6524_Overlay3/cd3

8 /export/temp/6524/6524_Overlay2/cd2

9 /export/temp/6524/6524_Overlay1/cd1

10 /export/temp/6.5_NFS/dist

11 done (distribution information read, return to inst prompt)

Install software from: [/export/temp/6.5_Dev_Found/dist/dist6.5] done

When you're done (either '11' or 'done' as above) - check for conflicts via 'c' - this will list all conflict - you can use 'c'

Inst> c 1a 2a

inventor_dev.sw.lib cannot be installed because of missing prerequisites:

1a. Do not install inventor_dev.sw.lib (1279134120)

1b. Also install inventor_dev.sw.base (1279134120).

Resolve conflicts by typing "conflicts choice choice ..." or try "help conflicts"

Inst> c 1a

No conflicts

When there are no remaining conflicts hit 'g' for 'go' to actually do the install. If you run into 100's of conflicts that never seem to be fixable (either by supplying the source or opting not to install) then look very carefully at the sources of the install files and check the web - you can easily render a machine unbootable if you fix conflicts by removing everything :-)

The install will proceed as follows - depending on the processor speed this can take anywhere from 30min to an hour to complete

Inst> g

Pre-installation check .. 0% /var/netscape/communicator/mime.types not installed. See smart_config_handling preference for more information.

Pre-installation check .. 3%

Installing new versions of selected mpi.sw subsystems

Installing new versions of selected mpi.sw32 subsystems

Installing new versions of selected mpi.sw64 subsystems

Installing new versions of selected mpt.relnotes subsystems

Upgrading selected nedit.man subsystems

Upgrading selected nedit.sw subsystems

Installing/removing files .. 28%

Upgrading selected netscape.man subsystems

Upgrading selected netscape.plugin subsystems

Upgrading selected outbox.man subsystems

Upgrading selected outbox.sw subsystems

Upgrading selected scsl.hdr subsystems

Upgrading selected scsl.man subsystems

Installing/removing files .. 34%

Upgrading selected scsl.sw32 subsystems

When the upgrade is complete do a 'q' for quit and the system will do a sort of 'brain reset' that can take 30min to an hour

Running exit-commands .. 99%

Software installation has installed new configuration files and/or saved the previous version in some cases. You may need to update or merge old configuration files with the newer versions. See the "Updating Configuration Files" section in the versions(1M) manual page for details. The inst command "admin config changed" will list the affected files.

Checking dependencies .. 100% Done.

Calculating sizes .. 100% Done.

Installations and removals were successful.

You must restart your system to complete the installation.

You may continue with installations or quit now.

Inst> q

WARNING: You must restart your system to complete the installation. Requickstarting ELF files (see rqsall(1)) .. 24%

Then reboot. Fingers crossed and the system should come up again with the new OS (verify revision with a uname -R)

Permalink | 2004.11.11-19:02.00