[comp.unix.aix] Changing an AIX's name --- how to do it easily?

giguere@csg.UWaterloo.CA (Eric Giguere) (06/14/90)

We have three PS/2 machines running AIX (two at 1.1, the other at 1.2)
and because of a network reorganization we need to rename them.  I was
wondering if there was a relatively painless way of doing so without
re-installing AIX from scratch.  I don't think changing the name in
the non-volatile RAM cuts it!

--
Eric Giguere                                       giguere@csg.UWaterloo.CA

srb@eh.ifs.umich.edu (Steve Burling) (06/14/90)

Here's the technique used by one of the other guys on the project
to change ps/2 system name:

1.  replace all occurrences of the old system name with the
    new system name in the following files:
	/etc/fsmap
	/etc/fstab
	/etc/hosts
	/etc/ports
	/etc/site
	/etc/system.bk
	/generic/install/siteinfo

2.  build and install a kernel with the new name:
	a. cd /usr/sys
	   newkernel

3.  rename the (only) special device file in the following directory
    from the old system name to the new system name:
	/generic/dev

4.  change /<LOCAL> to the new system name:
	a.  boot the os boot floppy
	b.  run the os maintenance disk
	c.  get a single user shell
	d.  mount /dev/hd35 /mnt
	    cd /mnt
	    mv <oldname> <newname>
	    cd /
	    umount /dev/hd35
	e.  exit the single user shell and boot from the hard disk
    note:  /dev/hd35 above is magic; you'll have to mount all of the
    /dev entries on the floppy one by one to find the one which
    represents /<LOCAL> on the hard disk.

No guarantees -- make sure you have a backup...

		-- Steve

--------------------------------------------------------------
Steve Burling                      Internet: srb@ifs.umich.edu
Institutional File System Project  BITNET: usersrb@umichum

giguere@csg.uwaterloo.ca (Eric Giguere) (06/14/90)

In article <1990Jun13.212142.11062@maytag.waterloo.edu> giguere@csg.UWaterloo.CA (Eric Giguere) writes:
>We have three PS/2 machines running AIX (two at 1.1, the other at 1.2)
>and because of a network reorganization we need to rename them.  I was
>wondering if there was a relatively painless way of doing so without
>re-installing AIX from scratch.  I don't think changing the name in
>the non-volatile RAM cuts it!

This is a further comment to what I wrote above.  I received several
responses from people on the net pointing me to the chparm command to change
my computer's uname.  This is exactly what I need, thanks for the comments.

However:  under 1.2 chparm doesn't seem to work.  Or at least it doesn't
on my machine.  I get the errors:

			   fixnmvtoc: no changes made
			   /usr/sys/bin/fixhmvtoc /csgaix1 /csgtk20 failed

when I type "chparm nodename=csgtk20".  Now from comments on the net I know
that the chparm command works under 1.1 and indeed we tried it on an AIX
machine running 1.1 here not too long ago.  No one on the net had tried it
with 1.2, however.

So is this a bug in 1.2?

--
Eric Giguere                                       giguere@csg.UWaterloo.CA

ghe@comphy.PHYSICS.ORST.EDU (Guangliang He) (06/14/90)

In article <1990Jun14.123848.11841@terminator.cc.umich.edu> srb@eh.ifs.umich.edu (Steve Burling) writes:
| 
| Here's the technique used by one of the other guys on the project
| to change ps/2 system name:
| 
| 1.  replace all occurrences of the old system name with the
|     new system name in the following files:
| 	/etc/fsmap
| 	/etc/fstab
| 	/etc/hosts
| 	/etc/ports
| 	/etc/site
| 	/etc/system.bk
| 	/generic/install/siteinfo
| 

Do you have to change the sendmail.cf file? Or some tools will fix the
sendmail?
                            Guangliang He

                            ghe@PHYSICS.ORST.EDU
                            hegl@ORSTVM.BITNET

jackv@turnkey.tcc.com (Jack F. Vogel) (06/15/90)

In article <1990Jun14.134905.18716@maytag.waterloo.edu> giguere@csg.uwaterloo.ca (Eric Giguere) writes:
 
>However:  under 1.2 chparm doesn't seem to work.  Or at least it doesn't
>on my machine.  I get the errors:
 
>			   fixnmvtoc: no changes made
>			   /usr/sys/bin/fixhmvtoc /csgaix1 /csgtk20 failed
 
>So is this a bug in 1.2?

I am not absolutely sure about this, but I believe that this was actually
a reported APAR that someone in support here was working on some time ago
and that was fixed. What this means to you is that some service PTF tape
should have a fixed chparm. If someone out there really wants more info
on the problem email me at Locus and I can get back to you.

Disclaimer: I speak for myself, not LCC or IBM

-- 
Jack F. Vogel			jackv@locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv@turnkey.TCC.COM

cameron@sterope.la.locus.com (Cameron Bahar) (06/16/90)

>From prodnet.la.locus.com!orchard.la.locus.com!turnkey!elroy.jpl.nasa.gov!sdd.hp.com!ucsd!tut.cis.ohio-state.edu!cica!iuvax!>maytag!csg.uwaterloo.ca!giguere Fri Jun 15 09:12:07 PDT 1990
>Article 1031 of comp.unix.aix:
>Path: prodnet.la.locus.com!orchard.la.locus.com!turnkey!elroy.jpl.nasa.gov!sdd.hp.com!ucsd!tut.cis.ohio-state.edu!cica!iuvax>!maytag!csg.uwaterloo.ca!giguere
>>From: giguere@csg.uwaterloo.ca (Eric Giguere)
>Newsgroups: comp.unix.aix
>Subject: Re: Changing an AIX's name --- how to do it easily?
>Message-ID: <1990Jun14.134905.18716@maytag.waterloo.edu>
>Date: 14 Jun 90 13:49:05 GMT
>References: <1990Jun13.212142.11062@maytag.waterloo.edu>
>Sender: daemon@maytag.waterloo.edu (Admin)
>Distribution: na
>Organization: Computer Systems Group, U of Waterloo
>Lines: 26
>
>In article <1990Jun13.212142.11062@maytag.waterloo.edu> giguere@csg.UWaterloo.CA (Eric Giguere) writes:
>>We have three PS/2 machines running AIX (two at 1.1, the other at 1.2)
>>and because of a network reorganization we need to rename them.  I was
>>wondering if there was a relatively painless way of doing so without
>>re-installing AIX from scratch.  I don't think changing the name in
>>the non-volatile RAM cuts it!
>
>This is a further comment to what I wrote above.  I received several
>responses from people on the net pointing me to the chparm command to change
>my computer's uname.  This is exactly what I need, thanks for the comments.
>
>However:  under 1.2 chparm doesn't seem to work.  Or at least it doesn't
>on my machine.  I get the errors:
>
>			   fixnmvtoc: no changes made
>			   /usr/sys/bin/fixhmvtoc /csgaix1 /csgtk20 failed
>
>when I type "chparm nodename=csgtk20".  Now from comments on the net I know
>that the chparm command works under 1.1 and indeed we tried it on an AIX
>machine running 1.1 here not too long ago.  No one on the net had tried it
>with 1.2, however.
>
>So is this a bug in 1.2?
>
>--
>Eric Giguere                                       giguere@csg.UWaterloo.CA
>
>



The official method to change the sitename of a system is by using the
chparm command on an AIX 1.2 site.  This command modifies a number of files
on the system including the kernel, NVRAM, etc. 
I have used the chparm command successfully on PS/2's running AIX 1.2.

I think the problem might be that you're runnning chparm on a model 70 PS/2.
If this is the case, then I've heard of a problem that causes "fixnmvtoc" 
to fail on a model 70 PS/2.  I think this problem has since been resolved
and the fix should be on an after release tape sent to customers.

Here is some more information on chparm:

Changes affect the running system.  Changing nodename causes the 
system to be brought down and rebooted.  When changing nodename, 
be sure that all users on the network are aware of this change 
and are logged off from that node.  Inform the users that they should
not change any of the system files mentioned below while this operation
is in progress.  

On sites that have the TCF lpp installed, it is required that the 
site be clusterstarted, and that the primary be available.  This is 
necessary because modifications are performed on files that are 
stored on the primary system.

Changing the nodename also changes the appropriate entries in the
following system files:

	/etc/filesystems
	/etc/fsmap
	/etc/hosts
	/etc/hosts.equiv
	/etc/init.state
	/etc/site
	/etc/sitegroup
	/etc/timesync/sitelist
	/generic/dev/nodename
	/generic/devs.linst
	/local/ident
	/local/ports
	/local/rc.tcpip.local
	/local/system
	/local/unix.std
	/usr/adm/uucp/Devices
	/usr/adm/uucp/Spools
	/usr/lib/INnet/connect.con

Note: some of these files may not exist on your system configuration.

After rebooting, the following files, if they exist on your system 
configuration, should be edited manually, replacing instances of the 
old nodename with the new nodename:

	/etc/sites
	/etc/resolv.conf 
	/local/named.local  

	AND any other name daemon files that are created by the system 
	administrator.  

	If you're not sure which other files need to be modified on your 
	system, a "grep -l old_nodename /etc/* /etc/*/* /local/*"  will
	yield a list of filenames that contain the string old_nodename.
	Reasonable judgment should be exercised in determining which of 
	these files, if any, need to be changed.




I hope this helps you out.

Cameron Bahar.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Opinions expressed here are my own and do not necessarily reflect the
opinions of Locus Computing Corporation, IBM, or any other corporation 
for that matter.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

RAH@IBM.COM ("Russell A. Heise") (07/18/90)

 giguere@csg.UWaterloo.CA (Eric Giguere) writes:

 > We have three PS/2 machines running AIX (two at 1.1, the other at 1.2)
 > and because of a network reorganization we need to rename them.  I was
 > wondering if there was a relatively painless way of doing so without
 > re-installing AIX from scratch.  I don't think changing the name in
 > the non-volatile RAM cuts it!

 To change the name of your machines, use:
     chparm nodename=<newname>
 The command will:
     - ask you if you want to change your machine name,
     - ask you whether the PS/2 is a Model 55,
     - update several files with the new name, and
     - reboot the machine.
 If the command doesn't ask about your model number, you have an old
 version:  you may want to contact IBM defect support at (800) 237-5511
 to obtain the latest updates.  Of particular interest, 'chparm' updates
 the machine name in NVRAM and in the /etc/system 'sysparms:' stanza.

Russ Heise, AIX Technical Support, IBM

RAH@IBM.COM ("Russell A. Heise") (07/18/90)

 giguere@csg.uwaterloo.ca (Eric Giguere) writes:

 > ...
 > However:  under 1.2 chparm doesn't seem to work.  Or at least it doesn't
 > on my machine.  I get the errors:
 >
 >                            fixnmvtoc: no changes made
 >                            /usr/sys/bin/fixhmvtoc /csgaix1 /csgtk20 failed
 >
 > when I type "chparm nodename=csgtk20".  Now from comments on the net I know
 > that the chparm command works under 1.1 and indeed we tried it on an AIX
 > machine running 1.1 here not too long ago.  No one on the net had tried it
 > with 1.2, however.
 >
 > So is this a bug in 1.2?

 Some early releases of chparm in 1.2 had problems with no NVRAM in Model 55
 PS/2s.  The latest version of chparm asks whether you are using a Model 55.
 If your version does not, you may want to contact IBM defect support at
 (800) 237-5511 to get the latest updates.

Russ Heise, AIX Technical Support, IBM

RAH@IBM.COM ("Russell A. Heise") (07/18/90)

 ghe@comphy.PHYSICS.ORST.EDU (Guangliang He) writes:

 > ...
 >
 > Do you have to change the sendmail.cf file? Or some tools will fix the
 > sendmail?

 Yes, you must manually edit /usr/adm/sendmail/sendmail.cf and rebuild the
 sendmail database when you change the system name under AIX PS/2.  No, the
 'chparm' command does not do this for you.

Russ Heise, AIX Technical Support, IBM