DEC UNIX Online Documentations (Under construction)

PrevUp [ Notes | Trouble Shooting | Resources ]


Specific Notes

License (PAK) management

Default license database directory resides in /var/adm/lmf. Some useful commands:
/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 
                                  # !Attention! 
                                  # "issue" deletes license from database,
                                  # better make a safety copy before
/usr/sbin/lmf issue pakfile       # exports PAK file 
/usr/sbin/lmf issue pakfile DEC   # exports PAK file with DEC as "producer" 
                                  # one may subsequently re-register from issued pakfile and re-load

Defining tapes

System disk backup/restore (5.x,4.x)

Prepare the backup as described here.
Backup the system as500b to tape:
/usr/sys/bin/btcreate -f -k AS500B -m mfs -d /tmp -t tape0_d1 -s /usr/lib/sabt/etc/fslist   # 5.x
/usr/sys/bin/btcreate -f -k AS500B -m mfs -d /tmp -t rmt0h    -s /usr/lib/sabt/etc/fslist   # 4.x 
Restore the system: at the console prompt ()
init
show dev             # list bootable devices
boot -fl "nc" MKA500 # from tape at SCSI ID 5
btextract will be invoked. After restore, shutdown and reboot in the usual way

System disk backup/restore (3.x,2.x)

Backup examples
dump -0uf /dev/rmt0h /    # entire root fs to first defined tape
dump -0uf /dev/rmt0h /usr # entire usr fs
dump -0uf /dev/rmt0h /var # entire var fs (if living as a separate FS)

Adding a disk

  1. Connect the disk to the desired SCSI bus.
  2. One my use the scu utility to query the hardware, for example:
    scu
    scu> show edt bus 0 lun 0 full
    
  3. Mount the disk, for example for OSF/1 3.x:
    cd /dev/
    ./MAKEDEV rz2            # disk @ SCSI ID=2, bus 0 (mostly internal)
    ./MAKEDEV rz10           # disk @ SCSI ID=2, bus 1 (mostly external)
    mkdir /mnt
    mount -r /dev/rz10c /mnt # mount read-only
    

Copying a system disk

For example to a larger one, and/or with different partitioning.
  1. Connect new disk (with different SCSI ID=N) and create special files, if not yet existing:
    cd /dev/
    ./MAKEDEV rzN
    
  2. Partition the disk.
  3. Create desired filesystems
    /usr/sbin/newfs /dev/rzNa   # use -N for a dry run
    /usr/sbin/newfs /dev/rzNg
    ...
    
  4. Mount the new disk's partitions:
    mkdir -p /temp/root; mount /dev/rzNa /temp/root
    mkdir -p /temp/usr;  mount /dev/rzNg /temp/usr
                                                    # if /var is/will be a separate FS
    mkdir -p /temp/var;  mount /dev/rzNf /temp/var
    
  5. Copy the partitions (might need some virtual memory, so a proper swap partition should exist):
    dump 0f - /    | (cd /temp/root; restore -rf - )
    dump 0f - /usr | (cd /temp/usr;  restore -rf - )
    
    If /var is a separate file system:
    dump 0f - /var | (cd /temp/var;  restore -rf - ) # if applicable
    
    If /var -> /usr/var, but should become a separate file system:
                                  # move /usr/var to separate mount point
    mv /temp/usr/var/* /temp/var; rm /temp/root/var; mkdir /temp/root/var
                                  # some config's (X11) might still expect /usr/var to exist:
    cd /temp/usr; rmdir var; ln -s ../var var
    
  6. If applicable, adjust swap space:
    cd /temp/root/sbin
    rm swapdefault_*
    ln -s ../dev/rzNb swapdefault
    
  7. If applicable, adjust SCSI IDs in /temp/root/etc/fstab, shutdown and change SCSI ID of the new disk.

enable telnet login as root (>=3.x)

in /etc/securettys simply add a line:
ptys

Example for rescuing/re-enabling an inherited machine

Given: DEC 3000/300LX with Digital UNIX 3.2D-1 with unknown password, network configuration mismatching local context (including NFS mounts to non-existing servers and NIS references to non-existing domains).
/etc/fstab looks like:
/dev/rz3a       /       ufs rw 1 1
/proc           /proc   procfs rw 0 0
/dev/rz3g       /usr    ufs rw 1 2
/dev/rz0b       swap1   ufs sw 0 2
/dev/rz3h       /dk3    ufs rw 1 2
#
/nfs/xxxxx07/dk1a/usr.local@xxxxx07 /nfs/xxxxx01/usr.local nfs rw bg 0 0
/nfs/xxxxx01/dk0a@xxxxx01       /nfs/xxxxx01/dk0a       nfs rw,bg 0 0
These are the steps I used to turn the boat anchor into a usable machine.
  1. If possible make a 1:1 working copy of the system disk (e.g. with dd on another UNIX/Linux machine) and perform all subsequent work on the working copy. In addition, make a copy of all files prior to modification.
  2. Reset root password
  3. In /etc/fstab disable NFS mounts and in /etc/rc.config disable NIS_CONF variable.
  4. Perform the necessary adaptions of the network settings to the new environment, just as in the early steps of a new installation.
  5. If the disk layout is inconvenient, copy the disk to some other. Reboot from the new one.

Troubleshooting

Recovery from lost password

  1. Get into the SRM (>>>) prompt (e.g. by pressing the hardware HALT button), then:
    boot -fl s    # boot into single user mode
    
  2. Select an editor, /bin/ed, for vi
    bcheckrc       # mount filesystems, enables access to /usr/bin
    env TERM=vt100
    vi /etc/passwd # very primitive version, use keys
                   # L to move right
                   # H to move left
                   # X to delete character
                   # :w to write buffer
                   # :q to leave           
    
  3. change
    root:IpGjn1Mxmlf8.:0:1:system PRIVILEGED account:/:/bin/sh
    
    to
    root::0:1:system PRIVILEGED account:/:/bin/sh
    
    i.e. simply delete the password, and reboot (e.g. with ctrl-D)
  4. Use passwd to assign a new password (might be required for DECwindows login).

make utility doesn't work as expected

Standard /usr/bin/make on Tru64/OSF/1 is deliberately broken, i.e. it doesn't follow rules like on other UNIXes. Use /usr/bin/posix/make instead, e.g. by redefining in some startup script:
alias make='/usr/bin/posix/make'
export MAKE=/usr/bin/posix/make
For OSF/1 3.x:
alias make='/usr/opt/posix/usr/bin/make'
export MAKE=/usr/opt/posix/usr/bin/make

Resources

Downloads

Documentations

Sites

Articles

Miscellaneous


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