Tape Backup
with Ignite-UX (10.x,11.x)
make_tape_recovery -I -x inc_entire=vg00saves the "
rootvg
".HP-UX 9.x
Create a minimum recovery tape allowing to boot the system, plus a full backup of the root disk:mkrs -v -q -tdat -f /dev/rmt/... -r /dev/dsk/... # make a bootable tape mkrs -v -q -tdat -f /dev/rmt/... -r /dev/dsk/... -m700 # make a bootable tape, force series 700 fbackup -0 -i / -f /dev/rmt/...
Backup w/ Copyutil
- Boot from Support CD (press ESC to interrupt normal boot)
ISL> ODE
ODE> COPYUTIL
Using fbackup/frecover
frecover -V /tmp/fb.volhd -N -v -f /dev/rmt/0m # read backup volume header frecover -r -N -v -f /dev/rmt/0m >/tmp/fb.log 2>&1 # lists backup frecover -r -X -v -f /dev/rmt/0m # restores backup tree into local directory frecover -x -X -i /bin+ -v -f /dev/rmt/0m # extract a specific object into local directory
Disks
Adding a new disk (filesystem)
HP-UX 9.x
Maximum size: 4GB-1k = 4194303.- Connect the disk and use
SAM
orioscan
to check if it's properly recognized. If not, check jumper settings. - Format and verify the disk, query some info. For example assume a disk at ID=1 in a 9000/715:
mediainit /dev/rdsk/c201d1s0 /etc/diskinfo -v /dev/rdsk/c201d1s0
- If the disk does not appear in
/etc/disktab
, add the appropriate entries, as explained in that file. For SCSI disks the most important one iss0#
, the size (in kB) taken fromdiskinfo
. Formally required are alsons#,nt#,nc#,
, but in my experience they can be faked, so that their product yieldss0#
.
If the disk should also serve as a boot disk, further entries should be made withs0#
reduced by the amount foreseen for swap and boot area (combined). Example:QUANTUM_FIREBALL1280S_noswap|QUANTUM_FIREBALL1280S_noreserve|QU_FIREBALL1280S_noswap|QU_FIREBALL1280S_noreserve:\ :No swap or boot:ns#32:nt#16:nc#2445:\ :s0#1251840:b0#8192:f0#1024\ :se#512:rm#3600: QUANTUM_FIREBALL1280S_150MB|QU_FIREBALL1280S_150MB:\ :150 MB swap:ns#32:nt#16:nc#2145:\ :s0#1098240:b0#8192:f0#1024\ :se#512:rm#3600:
- Create the new filesystem:
newfs -v -L /dev/rdsk/c201d1s0 QUANTUM_FIREBALL1280S_150MB
You may wish to protocol some of the listed superblock numbers, for emergency use withfsck
. - Alternatively,
/etc/disktab
may be bypassed by using/etc/mkfs
, in this case some parameters (e.g. the size) have to be specified on the command line:/etc/mkfs /dev/rdsk/c201d1s0 1098240
Anyway,/etc/mkfs
is called by/etc/newfs
Cloning a disk
HP-UX 9.x
e.g. onto a larger one. Note however, that boot disks have to be below 2GB (exactly), otherwise anIPL bad address
error will occur on boot.Firstly, perform the steps necessary to add a new disk. Then:
- mount the target disk and copy the contents of the source disk:
mount /dev/dsk/c201d1s0 /mnt # example for SCSI ID=1 in an 9000/715 fbackup -0 -i / -e /mnt -f - | (cd /mnt; frecover -Xrf -)
- If the new disk should be bootable:
mkboot -v /dev/dsk/c201d1s0
and check bootability:lifls /dev/rdsk/c201d1s0
A bootable disk reports something like:FS SWAP ISL AUTO HPUX EST ODE MAPFILE SYSLIB MAPPER IOTEST PERFVER XDIAG PAD
while a non bootable disk reports an error message.
In addition modify/mnt/etc/checklist
to reflect the new filesystem to befsck
'ed on boot.
More references:
- thread on Creating a bootable disk in 9.10
- how to determine whether a disk is bootable
- usenet thread on can't boot on Micropolis 4110
Tapes
9144 tape handling
Some info is collected hereDuplicating HP install/support/update DAT tapes
Install and support tapes contain at least two files, a LIF header with 2kByte records and a tar file with 10kByte records (512 bytes times default blocking factor 20). Thus it is indispensable to specify the blocksize.Recipe to copy to disk first, then to tape:
dd if=/dev/rmt/0mn of=install.lif bs=2k # note: 0mn to suppress rewind dd if=/dev/rmt/0m of=install.tar bs=10k # note: 0m to allow rewind # insert copy tape dd if=install.lif of=/dev/rmt/0mn bs=2k # note: 0mn to suppress rewind dd if=install.tar of=/dev/rmt/0m bs=10k # note: 0m to allow rewindIf you have two tape drives:
dd if=/dev/rmt/0mn of=/dev/rmt/1mn bs=2k # note: 0mn to suppress rewind dd if=/dev/rmt/0m of=/dev/rmt/1m bs=10k # note: 0m to allow rewindSometimes such tapes have a third file, a "pseudo-tar", which serves as an extra indicator of the end-of-tape. I think it can be ignored.
Tapes in "update" format are plain tar files. To be copied e.g. with:
dd < /dev/rmt/0m > scratchfile ibs=10240 obs=512 # source tape, mind the blocksizes ! tar tf scratchfile # verify proper tar format dd < scratchfile > /dev/rmt/0m ibs=512 obs=10240 # target tape, mind the blocksizes ! tar tf /dev/rmt/0m # verify proper tar formatAfter copying, an integral number of records should be reported, e.g.:
19742+0 records in 394840+0 records outOtherwise the blocksize is incorrect or the tapes are not in the HP format.
Programming
Query HP-UX version on the shell level
HP-UX version in reasonable format:echo $(uname -r | sed -e 's/..//' -e 's/\.//')
Query HP-UX version at cpp level
#if defined(__hpux) #include <sys/privgrp.h> #if defined(PRIV_PSET) #define _hpux_11i #elif defined(PRIV_SPUCTL) #define __hpux_11x #define OSMAJORVERSION 11 #elif defined(PRIV_SERIALIZE) #define __hpux_10x #elif defined(PRIV_SETRUGID) #define __hpux_9x #endif #endif
Generating 64-bit programs
Use the nativecc
compiler's +DD64
option for compilation. On 32-bit systems the 64-bitDevLibs
(Cross Platform Development Kit) must be installed to create executables. Of course 64-bit executables can't be executed on 32-bit systems.The native
cc
compiler implements the 4/8/8 model for (int/long/ptr).Shared vs archive libraries
Create shared libraries, HP-UX 10.20:cc -Aa +z ld -o libxxx.sl -b *.oForce linking against archive libraries, HP-UX 10.20:
cc cc ... -Wl,-a,archive_shared ld ... -a archive_shared ...
pstat interfaces et al.
PSTAT Interfaces (May 2000)Memory Windows in HP-UX 11.0. White Paper (Version 98-1.4)
Miscellaneous
Running SAM through a telnet
session
A situation which might occur with ancient boxes lacking ssh
. SAM
requires specific terminal characteristics. One may use a VT220
emulation:export TERM=vt220 # for ksh
Updating the kernel
mv /stand/build/System.SAM /stand/system # list of kernel parameters /usr/sbin/kmupdate shutdown -r -y now
Setup a netdist
server
A netdist
server is particular convenient to store codeword protected software (provided one has codeword and proper license, of course), since it can be copied (unprotected) once and for all times from CD to a server disk.Prerequisites: CD media, HP-ID-Module, HP license codeword(s) appropriate for the combination of hardware ID, CD Part number and product number. A more versatile SYSKOMP-ID-BOX may be used in place of the HP-ID-Module.
- Prepare a local target directory with enough disk space behind it. Default would be
/netdist
, possibly on an extra disk.
Note, however, that this directory name will enter into the steering file,MAIN.pkg
, and all paths have to be consistently named when the server daemon is started (place softlinks if necessary). - If software is to be loaded from CD, mount it:
mount -r -t cdfs /dev/dsk/c201d3s0 /UPDATE_CDROM # example for SCSI ID=3 at an 9000-715
Or use SAM for that. - Run the menu driven
/etc/updist
Change Source or Destination From CD-ROM to local system Destination /netdist Codeword .... .... .... .... # from the HP license sheet, exactly as written (don't forget e.g. trailing hyphen's) ! Hardware ID ddddAnnnnn # defined via ID box, don't enter. Echoed by system. Select all Filesets
The installer might ask for the architecture (300/700/800), only one of these can be installed in a singleupdist
run. Messages on missing target directories (300/700/800) can be ignored.
Onceupdist
has finished, the contents of thenetdist
directory (300,700,800,MAIN.*
) may be transferred elsewhere. - Start the server daemon with e.g.
/etc/netdistd -f /netdist/MAIN.pkg -v -c /tmp
which says that caching should go into/tmp
and verbose logging will go into/usr/adm/netdist.log
. It might be necessary to allownetdistd
service in/usr/adm/inetd.sec
and/etc/services
.
man netdistd
List software on media
HP-UX 9 example:mount -r -t cdfs /dev/dsk/c201d3s0 /cdrom # CD-ROM @ SCSI ID=3, 9000/715 /etc/update -c -s /cdromHP-UX 10,11 example:
mount -r /dev/dsk/c2t0d0 /cdrom # swlist -s /cdrom # list with more info swlist -a tag -a revision -a path -a is_secure -a title -f /cdrom
Dealing with antique software
Case: old (pre-7.0) Series 300 update media (720kB floppies of 1986 vintage).Can't be read by "modern" floppy drives.
Can't be handled by
/etc/update
, swlist
, et al., comes in Logical Interchange Format (LIF).- Hardware used:
- HP 9000 425t (HP-UX 9.1)
- external HP-IB 9134 compatible disk drive (DD floppy, uses cs80 driver)
- IB cable
- Ensure good working condition:
SAM - Peripheral devices - View all
HP-IB devices should be listed with select code 7 - Create a floppy image, e.g.:
dd if=/dev/dsk/c7d0s0 of=pascal.ddimg
may reportdd read error: I/O error 1544+0 records in 1544+0 records out
but this is probably just "end-of-floppy" - Access the software:
lifls -l /dev/dsk/c7d0s0 # list filesets on IB floppy lifcp -r /dev/dsk/c7d0s0:A98518A - | cpio -idumvx # example to extract to current directory
Troubleshooting
SAM responds with SAM task controller initialization failed. rc = 1402
message
Further symptom: SAM is very slow and refuses most tasks, leaving it essentially useless.This problem and its confusing message may be due to the system's date earlier than some SAM files'.
touch /usr/sam/lib/*/*.LLsolved the problem for me. See also SAM's error log,
/usr/sam/log/samlog
, for more information.Maximum number of processes per user exceeded
(can't fork etc.).Use
SAM
to modify the maxuprc
parameter (e.g. to 256). This parameter is dynamic (i.e. doesn't require reboot) on HP-UX 11.x.Programs running out of memory
Use
SAM - Kernel Configuration
to modify the maxdsiz
parameter (e.g. from 67108864 to 268435456, i.e. from 64 to 256MB). This parameter is static (i.e. a kernel rebuild/reboot will follow) on HP-UX 11.0.file: table full
Increase kernel parameternfile
.I chose to change
nproc
:(20+8*MAXUSERS)
=> (20+16*MAXUSERS)
Root password lost
- During boot press ESC to get into boot admin menu
- Select single user mode (admin, monitor, etc., model dependent)
boot pri isl
ISL> hpux -is
passwd root
to change root password
Can't login via VUE/CDE
It might still be possible viaVUElite
, otherwise use failsafe session or command line login.Follow the suggestions of the error message(s), then check proper network setup first. In particular IP name resolution defined in
/etc/resolv.conf
and resolution order, defined in /etc/nsswitch.conf
, if applicable for the particular HP-UX version.Desktop (CDE,VUE) does not start
Check proper network setup first, in particular IP name resolution defined in/etc/resolv.conf
and /etc/nsswitch.conf
, if applicable for the particular HP-UX version.Then check whether one of the following line is enabled
* Local local /usr/bin/X11/X :0 * Local local@console /usr/bin/X11/X :0in one of the following files
- HP-UX 8.x / VUE 2.0:
/usr/lib/X11/vue/Vuelogin/Xservers
- HP-UX 9.x / VUE 3.0:
/usr/vue/config/Xservers
(template in/usr/vue/newconfig/Xservers
) - HP-UX >= 10.20 / CDE:
/etc/dt/config/Xservers
(template in/usr/dt/config/Xservers
)
0 comments:
Post a Comment