1834926 Members
2201 Online
110071 Solutions
New Discussion

Re: installing OS

 
SOLVED
Go to solution
Heath Ramos
Frequent Advisor

installing OS

I need to upgrade my HP 9000 from 10.20 to 11.0. I have never done this before. It was suggested that I do a cold install and then copy certain files back over to the server afterwards. Of course there isn't any good documentation for what I should copy. We run Oracle and Cognos on this server. We have unix accounts and print queues. How can you recover the unix user accounts and print queues after a cold install w/o re-creating them? Is there anything else I need to worry about? I know I will have to re-install Oracle.
9 REPLIES 9
Paul Sperry
Honored Contributor
Solution

Re: installing OS

as far as the users go you could use the old /etc/passwd
and call in userinfo and store
it somewhere else while doing the cold install. Then use this script to add all you users back:


cat userinfo |while read line
do
USER=$(echo $line|awk '{FS=":";print $1}')
PASS=$(echo $line|awk '{FS=":";print $2}')
USERID=$(echo $line|awk '{FS=":";print $3}')
GID=$(echo $line|awk '{FS=":";print $4}')
INFO=$(echo $line|awk '{FS=":";print $5}')
HOME=$(echo $line|awk '{FS=":";print $6}')
SHELL=$(echo $line|awk '{FS=":";print $7}')
echo "Adding $USER"
useradd -u $USERID -g $GID -s $SHELL -c "$INFO" -o -m -k /etc/skel -d $HOME $USER
/usr/sam/lbin/usermod.sam -p`echo "$PASS"` $USER
done


Michael Tully
Honored Contributor

Re: installing OS

There are quite a number of discussions on the cold install of 11.x instead of upgrading.
Do a search there are plenty (upgrade 10.20 to 11)

See the below posting on print setups and how they can be moved.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4d7c402f24d5d61190050090279cd0f9,00.html

Copy the the password file (/etc/passwd)
Do a vgexport in preview mode to preserve your LVM structure.

You will probably need to install a different version of Oracle anyway.

You should test all of these scenarios on a test server anyway. This way you will sort of know what to expect.

Make sure that you have plenty of backups including a make_tape_recovery backup.
Anyone for a Mutiny ?
John Dvorchak
Honored Contributor

Re: installing OS

Well I have to agree that a cold install is much better than to try an upgrade. At the very minimum you should save to another system and to tape:
/etc/passwd
/etc/group
/etc/resolv.conf
/etc/hosts
/etc/fstab
/etc/exports
/etc/rc.config.d/netconf
/etc/rc.config.d/nfsconf

actually everything is /etc should be archived somewhere just in case you need to refer back to it.

vgexport all vg's and don't forget to use the -p -m mapfile options to save your filesystems maps. Place these mapfiles on another computer to use with the vgimport after you finish the install.

Maybe write a script to strip the users names from /etc/passwd that useradd them back. Don't forget to use /etc/group so the groups are the same after the install.

Make at least 2 ignite tapes of the system prior to the upgrade. You can also use the files on the second part of the Ignite tape as a last resort in case you forgot to back up some files somewhere. You can use the mt command to roll the tape past the LIF area and the rest of the tape is a tarball of every file in vg00:

mt -t /dev/rmt/xmn fsf 1

Then tar -tvf /dev/rmt/xm to list the contents. Them "mn" in the mt command means don't rewind.

I am sure this is not everything but I can't think of any more right now. Maybe someone else has better advise for you.
Good luck,
If it has wheels or a skirt, you can't afford it.
Heath Ramos
Frequent Advisor

Re: installing OS

Thanks for all the help.

moving print queues seems pretty straight forward. the user script seems a little above my head but I will play with it on a test server. I will also do a vgexport for the 4 non-vg00 vg's.

Are there any patches I need to load before/after the cold install?

What lv's are created by the OS by default on vg00?
Pete Randall
Outstanding Contributor

Re: installing OS

For patches, it is suggested that you load the latest quality pack bundle after the install. The install will create the normal "root volume" logical volumes: /, /stand, swap, /var, /tmp, /usr, /opt, and /home.

Pete

Pete
Michael Tully
Honored Contributor

Re: installing OS

Hi,

The patches are loaded after the operating system. Below is a link to some valuable information on OS installs/patches etc.
When doing the 'vgexport', here is an example. Make sure that you use the 'preview' option.

# vgexport -m myvg.mapfile -p -v /dev/myvg

The default lv's are
lvol1 /stand
lvol2 primary swap
lvol3 /
lvol4 /opt
lvol5 /tmp
lvol6 /usr
lvol7 /var

These numbers will change if you have a /home included.

Here is the link I mentioned.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x4499e7e60861d511abcd0090277a778c,00.htm

Cheers
Michael
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: installing OS

Hi Heath:

After the Core OS is loaded, you want to apply any codewords to unlock your Applications on the Applications' CDROMS. You can then load them.

Be sure to obtain a current Support Plus CD and install the Hardware Enablement bundle and the Quality Pack for 11.0. You should also load from the DIAGNOSTICS direcory on that CDROM, the Support Tools Manager (STM). This gives you 'stm' and 'ems'.

You can order the Support Plus CDROM if you don't have it, or download the current bundles. Either operation can be started from here:

http://us-support3.external.hp.com/common/bin/doc.pl/screen=commonExtensionSW/sid=c206416a1a118ac77e

On the page that the above link points is a link to "View Support Plus Releases". It is most useful to expose the patch contents of a current bundle. You can then download patch replacements for patches that have been "recalled" or contain warnings. The ITRC Patch Database allows a shopping-cart mode of collection which yields a patch bundle that can be installed in "one-step" once it is downloaded. You would apply this bundle after all other patch bundles, above.

For more information on the concept and contents of Support Plus, see:

http://www.software.hp.com/SUPPORT_PLUS/

Having done the above, you should have an up-to-date server.

You also asked what logical volumes a cold installation creates. The answer (by filesystem) is '/', primary swap/dump, '/stand', '/home', '/opt', '/usr', '/tmp' and '/var'.

Regards!

...JRF...
Heath Ramos
Frequent Advisor

Re: installing OS

I think I have a good idea on how things will go now.

I still am not clear on how to get my users, groups and templates over to the server after the install. I really don't want to have to manually re-create all the accounts, give them new passwords and give it back to them.
Sridhar Bhaskarla
Honored Contributor

Re: installing OS

Hi Heath,

Planning and pre-work is paramount here. I am only giving details about the user accounts.

You can easily merge the /etc/passwd and /etc/group files.

Make a bundle of the user home data.
#fbackup -f /tmp/home.fb -i /home -i /users
Copy /tmp/home.fb to the remote system.

Copy /tmp/home.fb, /etc/passwd and /etc/group to a remote system.


Once 11.0 is installed, copy them into /tmp directory as oldpasswd, oldgroup and home.fb.

#cp /etc/passwd /etc/passwd.orig
#cp /etc/group /etc/group.orig
#vi /tmp/oldpasswd

(here delete the accounts that are already there in /etc/passwd like root,bin,sys etc first few accounts. Compare with /etc/passwd). This will leave you with non-default accounts. Save the file. Then append it to /etc/passwd

#cat /tmp/oldpasswd >> /etc/passwd

Do the same thing for /etc/oldgroup.

You have the accounts fixed. You can then restore the home directories from the backup.

#fbackup -x -f /tmp/home.fb

Do not logout of the root's window. If possible keep two three windows with root logged in handy.

Ask couple of users to login and see if they can login.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try