DEC ULTRIX Documentations

PrevUp [ Notes | Trouble Shooting | Resources ]


Specific Notes

License (PAK) management

Default license database directory is /var/adm/lmf.
/usr/sbin/lmf list                # list current licenses
/usr/sbin/lmf register            # enter licenses interactively
/usr/sbin/lmf register - <pakfile # enter licenses from a PAK file
/usr/sbin/lmf load 0 product      # activate licenses 
/usr/sbin/lmf issue pakfile       # exports PAK file, 
                                  # !Attention! deletes license from database

Query disk geometry

e.g. for use in /etc/disktab. Example:
rzdisk -g /dev/rrz0a

Partitioning a disk

cd /dev
MAKEDEV rz0                                # for SCSI disk ID=0
/etc/chpt -q                    /dev/rrz0a # check existing partitions, gives sizes in 512 byte blocks
/etc/chpt -a                    /dev/rrz0a # create partition table
/etc/chpt -v -p<p> <offset> <size> /dev/rrz0c # offset and size for partition <p> 
Note that Ultrix can't handle partitions > 2GB, I found 4000000 blocks to be OK.

Disk layout example for an RZ57 (990 MB) disk:

Partition Offset/blocks Size/blocks Size/MB Usage
a 0 524288 256 /,/tmp,/opt
b 524288 131072 64 swap
g 655360 1179648 590 /usr
f 1835008 119041 rest /var
c entire disk entire disk all partitions
d,e,h 0 0 0 unused

Disk layout example for a 4.3 GB disk:

Partition Offset/blocks Size/blocks Size/MB Usage
a 0 1048576 512 /,/tmp,/opt
b 1048576 524288 256 swap
g 1572864 4000000 2000 /usr
f 5767168 1048576 512 /var
c 0 entire disk all partitions
d,e,h 0 0 0 unused

Another disk layout example for a 4.3 GB disk:

Partition Offset/blocks Size/blocks Size/MB Usage
a 0 1572864 768 /,/tmp,/opt
b 1572864 524288 256 swap
e 2097152 524288 256 crash
g 2621440 3145728 1536 /usr
d 5767168 1572864 768 dxbook
f 7340032 rest=1079812 512+ /var
h 0 0 0 unused
c 0 8419844 all partitions

Defining tapes

Assume DAT tape drive at ID=5
cd /dev
MAKEDEV tz5                  # creates special files rmt??
MAKEDEV tz13                 # ID=5 connected to a 2nd SCSI adapter (5+8=13)
will create the appropriate special files /dev/rmt?h etc, starting with 0 for the first defined tape.

Backup/restore

Backup examples
/etc/dump -0uf /dev/rmt0h /    # entire root fs to first defined tape
/etc/dump -0uf /dev/rmt0h /usr # entire usr fs
/etc/dump -0uf /dev/rmt0h /var # entire var fs

/etc/dump -0uf /dev/rmt0m /    # sometimes only this works
Restore examples
/etc/restore -tvf /dev/rmt0h   # list backup from first defined tape, verbose
/etc/restore -rvf /dev/rmt0h   # restore into current directory from first defined tape, verbose
Note that the message not a dump tape does not necessarily mean the tape is bad. It may occur after an external drive has been powered off/on. Just reissue the restore command.

Restore a system disk

Restore filesystems, e.g. to disk rz0
/etc/newfs -s ... /dev/rrz0a rz58   # create / filesystem, size ...
/etc/mount        /dev/rz0a /mnt    # / filesystem
cd /mnt
restore rvf       /dev/rmt0h        # restore complete filesystem recursively
umount /mnt

mount /dev/rz0f /mnt         # /var filesystem
...

mount /dev/rz0g /mnt         # /usr filesystem
...

Build a new kernel

ULTRIX/Mips:
cd /sys/conf/mips
cp GENERIC HOSTNAME    # copy the configuration file
vi HOSTNAME            # edit and revise as needed
config HOSTNAME        # build the system configuration files
cd /sys/MIPS/HOSTNAME  # change to the new configuration directory
make clean             # cleanup 
make depend            # dependencies
make                   # compile the new kernel
mv /vmunix /vmunix.old # save the old kernel
cp vmunix /            # install the new kernel
reboot                 # causes automatic reboot
more and yet more on this topic.

enable telnet login as root

in /etc/ttys add the secure option to the "status" column of all ttyp lines, e.g.
ttyp0   none            network secure

Software development

ULTRIX + dynamic loading

ultrix+dl

Ultrix/VAX


Troubleshooting

Boot into single user mode

At a DECstation's console (assuming disk w/ SCSI ID=1)
  boot 3/rz1/vmunix              # DS 5000/1xx
  boot 5/rz1/vmunix              # DS 5000/2xx
  boot -f rz(0,1,0)vmunix        # DS 2100/3100
At a VAXstation's console (assuming disk w/ SCSI ID=1)
  boot /R5:1 dkb100              # VS 3100 M3x
and enter genvmunix when the system image is prompted.

Boot into single user mode from CD

This might be necessary when the usual way of booting into single user mode does not work. In my experience the CD does not have to be the same version as the system on disk (using a 4.3 CD to repair a 3.1 system worked for me).
Boot off CD as appropriate and select System Management. This will offer a shell with a very limited command set. For maintenance work at the system disk the following prerequisites are necessary, for example for the 'a' (root) partition:
/etc/fsck  /dev/rz1a      # repair 'a' partition on SCSI disk 1
/etc/mount /dev/rz1a /mnt # mount  'a' partition on /mnt for maintenance
cd /mnt                   # this is the disk's root directory, not '/'

Machine hangs during boot

Possible reason: network requests.
Cure: at the console
  boot 3/rz2/vmunix              # single user mode
  mv /etc/rc.local /etc/rc.save  # temporary fix
  boot 3/rz2/vmunix -a           # multi user mode

root password lost/unknown

Boot into single user mode, then:
  cp /etc/passwd /etc/passwd.tmp       # save original password file
  sed s/<encrypted password>//g /etc/passwd.tmp > /etc/passwd # delete encrypted password
  sync
  reboot 
allows to login root w/o password. Don't forget to assign a new password.

If it is not possible to boot off the system disk, boot off CD, then:

cd etc
dd if=passwd of=passwd.save # save old file for security
ed    passwd                # enters a stone age line "editor"
Within the editor, type numbers until the root line appears. Then erase the encrypted password:
s/<encryption>/ # erase
w               # save edit buffer 
q               # leave the editor
and back on the shell level
sync            # write disk buffer 
then reboot from disk.

Fouled up filesystem links

shutdown -h now   
boot 3/rz0/vmunix    # single user mode, console
fsck /dev/rz0g       # check /usr file system, answer questions
shutdown -h now
boot 3/rz0/vmunix -a # multi user mode, stuff in lost+found 

Resources

Downloads

Documentations

Sites

Articles

Miscellaneous


Last updated: 4-June-2012, M.Kraemer