Date: Mon, 16 Jun 1997 14:49:54 +0000 (GMT)
From: Ron Miller 
To: unix_admin@comet.ucar.edu
Subject: HPUX 10.20 cold install notes

          Here's some of my findings from doing the cold install of HPUX 
     10.2.  It's  a pretty long e-mail, and for those who are already 
     past this point, this is probably redundant info.  My thanks to 
     Peggy for looking this over and correcting a couple of errors. 
     
          The boot drive of my 715/100 crashed last Friday, so I had no 
     choice but to do the cold install (rather than the upgrade).  As it 
     turns out, I prefer it.  The cold install lets you configure the 
     LVM (Logical Volume Manager).  In a nutshell, LVM lets you divide 
     (partition) up a disk into several psuedo-disks.  This has a big 
     advantange for preventing filling your root drive with a runaway 
     file (e.g., huge file in /tmp).  So if you do the cold install, 
     definitely select LVM.
     
          As Peggy said, use the defaults pretty much for the suggested 
     sizes, except for:
     
          /opt       compilers go here, so bump this up to about 300 Mb. 
     
          /tmp       Increase this to at least 50 or 60 Mb.  Under       
                     Peggy's instructions for installing the patch 
                     bundle, she says to put the tar file in /tmp, and 
                     then untar it there.  Both won't fit with a small 
                     (40 Mb) /tmp, so increase it if you have the room.
     
          /home      This replaces /users.  You can still use /users 
                     instead, but I suggest switching, since this is 
                     standard on other Unix platforms.  If you've got
                     things like /users/gempak hardwired into scripts,
                     you'll have to change all these.
     
                     If your /home (or /users) is a seperate drive, then 
                     choose the MINIMAL setting for this volume, since 
                     you don't need much space on the root drive.
     
     
     
     Mounting Disks
     
          The install of 10.2 only affects the boot drive (scsi.6).  All 
     of your data on other drives is still there.  But you have to tell 
     SAM to mount these drives.  When you do, there's a couple of 
     important things:
     
             select the NON-LVM type mount 
     
             WATCH OUT!  The default is to make a new file system.  You 
             DON'T want to do this, since it will reformat the drive. 
             So be sure to turn this off before you hit OK to mount the 
             drive.
     
             Before you start the install of 10.2, write down any swap 
             sizes of your additional drives (if you have any swap on 
             these).  When you remount them on 10.2, you can tell SAM 
             how much swap to allocate for that drive.
     
     Don't forget, for drives that you want to NFS mount, you need to 
     export them from the HP that is attached to them (see Export File 
     systems in SAM).
     
     As before, in SAM you can specify the specific systems that are 
     allowed to mount this drive (a good idea).  You can also allow root 
     privelage across NFS drives.  Thus, you can be logged in as root on 
     HP1, cd to a drive that's actually on HP2, and make a directory or 
     create a file.  Again, you should specify the systems that are 
     allowed to do this.  You need to be VERY careful if you choose to 
     do this.  Security is obviously an issue.  So is accidentally 
     creating or wacking files across the network with an rm -r command.
     
     
     Automounter
     
          HPUX 10.2 uses something called the automounter.  This was 
     available in 9.x (I used it from Day 1), but wasn't the standard.  
     Here's the difference:
     
     The old NFS mounter tried to "hard mount" a remote drive (such as 
     /metdat) when the HP booted up.  After that, it stayed mounted all 
     the time.  If /metdat wasn't available (e.g., the remote HP was 
     down), the mount would hang.
     
     The automounter only mounts local drives on boot.  Remote drives 
     are mounted only on request (e.g., when you cd to it).  So after you 
     boot up and log in, if you do a 'bdf', you might not see a remote 
     drive mounted.  This is normal.  In fact, if you do an 'll /', 
     you'll see something like:
     
     lrwxrwxrwx   1 root  root  20 Jul 12 17:25 metdat ->/tmp_mnt/metdat
     
          This is a symbolic link from /metdat (the mount point) to a 
     different  directory (/tmp_mnt), which the automounter uses to do 
     the temporary mount.  Why temporary?  Because after a certain 
     period of non-usage, the drive is automatically unmounted.  This 
     avoids the problem of stale mounts.
     
     
     NIS
     
     I've found NIS even easier to use under 10.20.  In SAM, if you 
     create a new account or something, SAM asks you if you want to 
     have it update the NIS database and push it to any slaves.  For 
     those who use NIS to share account info across HPs, a couple of 
     reminders:
     
        Before you wack that /etc/passwd, /etc/group, and /etc/hosts 
        files, either save them to tape or ftp them temporarily to 
        another system.  After you install 10.2, you can restore these   
        files, sort of.  The groups and hosts are unchanged.  For the 
        passwd file, you can paste in your user accounts, but leave the 
        system accounts since they have changed a bit.
     
        Don't forget to add a plus sign to the bottom of the passwd, 
        group, and hosts files of all HPs.
     
        Make sure that in addition to the master NIS server, you have at 
        least one slave.  This saved me when my 715/100 crashed, since  
        it was my NIS master, and even tho it was down, my slave could 
        still answer the NIS requests for passwds while I was waiting 
        for a new 715/100 drive.
     
     LDM
     
     After installing 10.2, there's a few things you need to do to get 
     the LDM back up and happy.
     
     Most everyone is logging to ldm/logs.  If you want to keep      
     doing this, don't forget to modify the /etc/services, /etc/rpc, and 
     /etc/syslog.conf files, and then restart the syslog daemon.  As 
     root, add the following lines to bottom of the following files:
     
     /etc/services
     
# LDM services
ldm          388/tcp  ldm
ldm          388/udp  ldm

     /etc/rpc

ldmd            300029  ldm

     /etc/syslog.conf

local0.debug    /users/gempak/ldm/logs/ldmd.log
*.err;kern.notice;auth.notice;user.none;local0.none /dev/console
*.err;kern.debug;daemon.notice;user.none;local0.none /usr/adm/messages


     Then execute the following command:

kill -HUP `cat /etc/syslog.pid`
     
     
     For those who have an APT hooked up to their HP and use the LDM to 
     ingest, you need to do a couple of other things.  The COM1 device 
     (/dev/tty00) is now call /dev/tty0p0, and unlike 9.x, this device 
     is not on the system by default.  Jeff Davis of PHX told me you can 
     create it in SAM under the "Cards" menu.  I created one using the 
     following command: 
     
          mksf -d asio0 -I 0 /dev/tty0p0 
     
     Note that you'll have to edit your ldm/etc/ldmd.conf file and 
     change the entry that has tty00 to tty0p0.
     
     For those who want to restart the LDM on boot up, this info was 
     already sent out in the unix_admin mail list.  (NOTE, for instructions
     on the HP-suggested way to add processes to the boot up sequence,
     please see the document Starting processes at boot time
     on the Transition to HP-UX 10.X page.)

     Here's what I did:
     
          1)    Edit the /etc/inittab file and add the following line to 
                the end of the  file:
     
          ldm::wait:/etc/startldm
     
          2)    Create a file /etc/startldm, and make it executable.  
                It's contents should be something like this:
     
     #!/sbin/sh
     
     # Start up LDM
     if [ -x /users/gempak/ldm/bin/ldmadmin ] ; then                    
           /bin/rm -f /tmp/ldmadmin.lockout
           /bin/su - gempak -c '/users/gempak/ldm/bin/ldmadmin delqueue  
                      /users/gempak/ldm/bin/ldmadmin mkqueue 
                      /users/gempak/ldm/bin/ldmadmin newlog              
                      /users/gempak/ldm/bin/ldmadmin start               
                      rm -f /users/gempak/ldm/data/nag.lock
                      /bin/nohup /users/gempak/ldm/bin/nag start'      
     fi
     
     
     The last 2 lines about "nag" are just for Western Region sites.  
     Also, non-WR sites will have different paths than 
     /users/gempak/ldm.
     
     Auto-startup of Ntl
     
     For those who like to have ntl start up automatically when you log 
     in, here's my solution:
     
     For the user in question (for example, fcstr), add the following 
     file: /users/fcstr/.dt/sessions/sessionetc 
     
     This file should have execute permission and contain the following: 
     
     #!/bin/csh
     
     nohup env DISPLAY=:0.0 ntl -xrm '\*workspaceList: One Two Three \   
        Four' & /dev/null &
     
     
     Note that this will route any messages from ntl to the bit bucket 
     (/dev/null).  You can alter this if you want to save these to a 
     file (/tmp/ntl.log) or the console window (/dev/console).  Also, 
     this will start up ntl in all 4 workspaces.  If you've added more 
     workspaces (like I have), just add a 'Five Six' after the Four.
     
     
     Domain Name Service
     
     As most of you probably remember, HPs do NOT look at the /etc/hosts 
     file by default.  In 9.x, you had to install a patch to get the 
     HPUX to look at the /etc/hosts first, and then the DNS.  With 
     10.20, this patch is in the core OS.  However, the default is still 
     to look at the DNS only.  To change this, you can modify the same 
     /etc/nsswitch.conf as in 9.x, or you can go into SAM and look at 
     "Networking and Communications", and then "Name Service Switch".  
     Highlight the first entry "hosts", and then under the "Actions" 
     menu choose "Name Service Switch".  In here, choose /etc/hosts 
     first, and DNS second.  Also make sure to select the "Try Next" 
     instead of "Stop Search".
     
     For those who use NIS, you can make NIS your second choice, and 
     then DNS your 3rd choice.  Thus, on my NIS master, I have all IP 
     addresses/names of my local subnet in my /etc/hosts.  On the other 
     NIS client HPs, my /etc/hosts just contains the router, DNS, and 
     local machine, with a '+' on the last line.  With this 
     configuration, anytime you need name service, it will check you 
     local /etc/hosts file first, then the NIS database (i.e., the 
     /etc/hosts on the NIS master), and lastly, the DNS.
     
     
     LaserROM
     
     If you want to install the LaserROM CD and you've done a cold 
     install, there's one thing you need to do before following Peggy's 
     instructions.  You need to install the VUE Runtime Environment off 
     the CORE OS CD-ROM.  After that, the LaserROM software will install 
     fine.