From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97557462525400.tru64-unix-managers.marc@archive.invalid> From: Thomas Leitner Date: Thu, 30 Nov 2000 08:58:04 +0000 To: tru64-unix-managers Subject: SUMMARY: Installation identical Tru64 systems ... X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97557462525400 Hello, Sorry for the late summary. I got lots of replies. The bottom line is, that this is possible this way and many have done similar things. The installation was either done via network, an externally attached hard-disk (gold-disk) or via tape. Compaq folks also pointed me to the installation cloning feature in Tru64 which seems easy to use. However, I wanted to clone a machine with local customizations as well as the appropriate patch kit already installed. This seemed not possible with the standard installation cloning feature. Many people also sent me their cloning scripts which gave me valuable hints for my own script. My original idea, swapping the Tru64 installation CD with my own recovery CD-ROM doesn't work because the Tru64 installation CD is mounted and many utilities are needed from it. It is possible to create a special bootable CD-ROM but I decided against it because it seemed too much work as a special dedicated harddisk is needed for that. So this is how I do it now: On the master machine: - vdump /, /usr and /home to files, save disklabel to file disk.label, copy /etc config files to a config subdirectory. Together with a "recover.sh" script (see below) burn everything to a CD. On an arbitrary machine in the network called "nfsserver": - Mount the recovery (or cloning) CD-ROM created above and make it NFS mountable by the clone machine. On the clone machine: - boot Tru64 4.0f installation CD-ROM - Press "UNIX Shell." - Enter these commands to start cloning NOTE: nfsserver is 10.10.10.1, clone is 10.10.10.2 echo 10.10.10.1 nfsserver >/etc/hosts ifconfig tu0 10.10.10.2 up mkdir /var/recover mount nfsserver:/cdrom /var/recover cd /var/recover sh recover.sh After that, just set the date with the "date" command and set the appropriate console variables for automatic booting etc. >>> set boot_osflags A >>> set bootdef_dev dka0 >>> set auto_action boot And that's it. Appended is my recover.sh script as well as the replies I got. Thanks a lot to the following people (sorry if I forgot somebody) for their replies: "Hummers, Rick (Frederick)" Tobias Burnus Sean O'Connell Tom Reu Gerhard Nolte alan@nabeth.cxo.dec.com Richard Loken Debra LaGattuta ---------------------------- MY RECOVER.SH ------------------------- #!/bin/sh # # Script to reload a machine configuration from CD-ROM. # # Copyright (c) 2000, Dept. of Communications, Graz University of Technology # e-mail: support@wiis.tu-graz.ac.at # # PATH=$PATH:/bin:/sbin:/sbin/advfs; export PATH printf "Please enter the name of the system disk (e.g. rz0) : " read sysd if [ "$sysd" = "" ]; then sysd=rz0 fi printf "Press RETURN to start the recovery process.\n" printf "WARNING: All data on the target disk will be lost: " read a pwd=`pwd` cd /dev ./MAKEDEV $sysd cd $pwd rdev=/dev/${sysd}a rrdev=/dev/r${sysd}a sdev=/dev/${sysd}b udev=/dev/${sysd}g scu -f $rrdev write media starting 0 limit 5m pattern 0x0 disklabel -z $sysd disklabel -rw $sysd $sysd #disklabel -R -r -t advfs $sysd disk.label /mdec/rzboot.advfs /mdec/bootrz.advfs disklabel -t advfs -r -R $rrdev disk.label UNKNOWN rm -rf /etc/fdmns/root_domain rm -rf /etc/fdmns/usr_domain mkfdmn $rdev root_domain mkfdmn $udev usr_domain mkfset root_domain root mkfset usr_domain usr mkfset usr_domain home if [ ! -d /var/mnt ]; then mkdir /var/mnt fi if [ ! -d /var/mnt/root ]; then mkdir /var/mnt/root fi if [ ! -d /var/mnt/usr ]; then mkdir /var/mnt/usr fi if [ ! -d /var/mnt/home ]; then mkdir /var/mnt/home fi mount root_domain#root /var/mnt/root mount usr_domain#usr /var/mnt/usr mount usr_domain#home /var/mnt/home echo restoring / vrestore -x -f dumps/root.dump -D /var/mnt/root echo restoring /usr vrestore -x -f dumps/usr.dump -D /var/mnt/usr echo restoring /home vrestore -x -f dumps/home.dump -D /var/mnt/home rm -rf /var/mnt/root/etc/fdmns/root_domain rm -rf /var/mnt/root/etc/fdmns/usr_domain mkdir /var/mnt/root/etc/fdmns/root_domain mkdir /var/mnt/root/etc/fdmns/usr_domain ln -s $rdev /var/mnt/root/etc/fdmns/root_domain ln -s $udev /var/mnt/root/etc/fdmns/usr_domain rm -f /var/mnt/root/sbin/swapdefault /var/mnt/root/sbin/swapdefault.orig ln -s $sdev /var/mnt/root/sbin/swapdefault.orig # # install recovery stuff on /home/recover # if [ ! -d /var/mnt/home/recover ]; then mkdir /var/mnt/home/recover fi tar cpf - . | (cd /var/mnt/home/recover; tar xpvf -) # printf "Which machine is this wxrdecw, wxrdeck, wxrdeci or wxrdecs: " read m ETC=/var/mnt/root/etc FILES="exports hosts ntp.conf passwd rc.config routes motd" for i in $FILES ; do if [ -r $ETC/$i ]; then mv $ETC/$i $ETC/$i.old fi echo cp configs/$i.$m $ETC/$i cp configs/$i.$m $ETC/$i chmod 644 $ETC/$i done # # licenses # echo Installing Tru64 licenses ..... lmf -d /var/mnt/usr/var/adm/lmf delete OSF-BASE lmf -d /var/mnt/usr/var/adm/lmf register - < licenses/${m}-base.pak umount /var/mnt/root umount /var/mnt/usr umount /var/mnt/home echo FINISHED ........ # # end of file -------------------------- ORIGINAL POSTING ------------------------ From: Thomas Leitner Subject: Installation identical Tru64 systems ... Hi, I have five identical machines (identical hardware), I want to install Tru64 4.0f on. In order to save some work (and to save the setup for recovery purposes later), I thought that I setup a machine as required and try to duplicate the installation to the four other machines. I thought that the following steps may be sufficient: - On the already installed machine: + vdump /, /usr and /home to files. + save the "disklabel -r" output to a file + write a small script to restore the disklabel and install the boot block + burn all files to a CD-ROM in ISO9660 format. The CD-ROM is called recovery CD-ROM - Now on the client machine which is to be installed: + boot from the Tru64 4.0F installation CD-ROM + open a shell window + take out the installation CD-ROM and insert the recovery CD-ROM and mount it. + run the script to label the fresh disk and create the filesystems + vrestore everything to /, /usr and /home Question: Is this feasible? Any more ideas anyone? Thanks // Tom ------------------------------- REPLIES ---------------------------------- From: "Hummers, Rick (Frederick)" This is almost exactly what I did to meet my y2k upgrades, except I was going to V4.0D and I just used a spare 2G read/write disk rather than a CD.� Over the period leading up to and following y2k I installed over 3 dozen client and server OS upgrades.� I found that the R/W disk worked well since I found that I was 'tweaking' the 'final' system gold disk quite often.�� I had it customized with virtually everything I needed including NetWorker, LPS, automount files, ntp, hosts, routes, shells, aliases, .rhosts, .cshrc, .login. profile, even the new motd... I would harvest a bunch of files off the old OS over the network for reference (I can send the script on Monday when I get back in the office) I have a ba353 (flat) three slot StorageWorks box for my 'gold disk', a cd (firmware upgrades got done as needed during the process) and a 'scratch' disk that I just carried to the target system.��� I built a small bootable 'a' partition, a small 'b' swap area (vdump/restore want swap space even on large memory systems) on my gold disk and had the gold files in a 'g' partition.� Boot the gold disk '-fl s', mount the swap and gold partitions, disklabel, newfs, mount, cd /new_root and� vdump -f /gold/root.vdump ... I had several different 'disklabel' model files depending on the system drive one would work (my systems were not identical).� After slamming the new OS, I booted genvmunix, changed rc.config, fstab, and hosts then built a new Kernel.��� Booted into the new kernel,� reconfigured sendmail and� restored other things that were not on the gold disk and we were done. \s\Rick -------------------------------------------------------------------------- From: Tobias Burnus Hallo, "Best Practice for Installing Large Numbers of Systems" http://www.tru64unix.compaq.com/faqs/publications/best_practices/BP_INSTALL_CLONING/TITLE.HTM k�nnte ein guter Start sein. Tobias -------------------------------------------------------------------------- From: Sean O'Connell You could also netboot the target machines, disklabel as needed, mount the source machine's partitions via nfs, and vdump. Not too bad if you already have an ris environment set up (fall over to the unix shell to do all the dirty work). S -------------------------------------------------------------------------- From: Tom Reu If you look in the installation guide, you will find references to "Installation cloning" which enables you to do much the same with less effort. Regards, Tom Reu Tru64 UNIX Installation Team -------------------------------------------------------------------------- From: Gerhard Nolte Hi Tom, das sollte so funktionieren, hab ich jedenfalls auch schon so durchgefuehrt. Im Anhang schick ich Dir Skripts und Handlungsanweisung (Rezept fuer mich, damit ich nichts vergesse) zu. Ich hab allerdings nicht alles komplett automatisiert. Eine Bemerkung noch: Ich habe die zu installierenden Rechner erst mal als diskless Clients gebootet (--> DMU). Damit kann man dann Konfigurationsdateien auf dem Server editieren (zB disklabel Output) und danach auf dem Client verwenden. Die zu clonenden Filesysteme hab' ich dann natuerlich per NFS gemountet. Viel Spass Gerhard -------------------------------------------------------------------------- From: alan@nabeth.cxo.dec.com Seems reasonable. If you want to get fancy, copy the installation CDROM to a partition large enough that you can modify the contents. Then track down the scripts that start the installation procedure and change them to drop you directly into a shell. Trim out subsets and other things you don't need to make space for the backups. Verify the partition is bootable and usable, then burn a copy of it. Extra credit: modify the installation to do some of the recovery semi-automatically, after checking where you want the system disk to be. A problem you might run into switching the CDROM, is that programs are probably loaded as needed from the installation CDROM. Once you switch out the installation for yours you may not have access to all the utilities you need. The method works fine as long as the backup media is separate from the installation CDROM, but with both on CDROM, it may have problems. Hence my suggestion to use a common piece of media. -------------------------------------------------------------------------- From: Richard Loken I have done something similar using a tape and not bothering with the CDrom and then I did a couple little twists on the clones and I was off and running. You shoud do fine. -------------------------------------------------------------------------- From: Debra LaGattuta Are you familiar with the Installation Cloning feature? Installation cloning sounds ideal for your situation because you perform one Full Installation on one machine, and then clone the rest of the machines. Installation Cloning lets you duplicate the installation characteristics (that is, the file systems and installed software) from an installed system onto one or more systems with the same or similar hardware configuration. When you install the current version of the operating system on a machine, the installation process automatically generates a configuration description file (CDF) that contains a record of the installation setup data you specified. This file is created in the /var/adm/smlogs directory under the file name install.cdf. The install.cdf file contains all the installation information required to perform the same installation on one or more target systems. This feature is documented in the Version 4.0F Installation Guide if you want to learn more about it. Regards Debra LaGattuta -- -------------------------------------------------------------------------- Dr. Tom Leitner Dept. of Communications Graz University of Technology, e-mail : tom@radar.tu-graz.ac.at Inffeldgasse 12 Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe Fax : +43-316-463-697 Home page : http://wiis.tu-graz.ac.at/people/tom.html PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send mail with subject "get Thomas Leitner" to pgp-public-keys@keys.pgp.net -------------------------------------------------------------------------- Before we have the paperless office, we have the paperless toilet!