Skip to content.

Scientific Linux

Sections
Personal tools
You are here: Home » Documentation » How To » Old » RedHat 7.2 to Scientific Linux 3.0.3 Upgrade

RedHat 7.2 to Scientific Linux 3.0.3 Upgrade

--------------------------------------------------------------------

RedHat 7.2 to Scientific Linux 3.0.3 Upgrade

--------------------------------------------------------------------

Background:

I, myself, have several RH 7.2ish boxes. The systems have minimal
XFree86 installed (just to satisfy CUPS dependencies) and neither
Gnome nor KDE. They are based on RH 7.2 but have .rpms from RH 7.3
added for CUPS capabilities. Additionally, they have several RH 8.0
packages added as dependencies for Mailman. Just to make things
interesting, they have had all the official RH 7.2 updates AND all
of the http://www.fedoralegacy.org updates for RH 7.2 as well. So,
these beasts were such a conglomeration that simply upgrading to
RH 7.3 and coasting along with http://www.fedoralegacy.org updates
wasn't really an option as the RH 8.0 packages could still be
vulnerable to any security holes that might arise.

My inspiration for the approach I describe here is
( http://www.webhostingtalk.com/showthread.php?threadid=276534 ).

Why SL 3.0.3 instead of just RH 9.0 plus fedoralegacy? Personal
choice. I find it more likely that I'll get updates quickly from a
"straight" RHEL port (SL 3.0.3) than from an RH 9.0 recompile of
RHEL patches (aka fedoralegacy).

Read into this what you will, but my guess is that if this procedure
worked from a conglomeration of three versions of RedHat Linux plus
errata from a third party, chances are good that it should work with
a "clean" RH 7.2 installation.

Procedural Summary:

1). Upgrade RH 7.2 box to RH 9.0 with RH 9.0 CD's following the
Upgrade option.

2). Configure Autorpm (http://www.autorpm.org) to point at
ftp.scientificlinux.org:/linux/scientific/303/i386/SL/RPMS
as the update source.

3). Once updated, point Autorpm at
ftp.scientificlinux.org:/linux/scientific/303/i386/errata/SL/RPMS
to pick up all the 3.0.3 errata.

4). Miscellaneous Cleanup.

--------------------------------------------------------------------

DETAILED INSTRUCTIONS:

--------------------------------------------------------------------
UPGRADE RH 7.2 TO RH 9.0
--------------------------------------------------------------------
Why upgrade to RH 9.0 first? Well, quite a bit has changed between
7.x and 9.0. RedHat has already written scripts to deal with these
changes, whereas, RHEL 3 (begotten by RH 9.0) and SL (begotten by
RHEL 3), have not. Why reinvent the wheel?

1) Get some RH 9.0 cds, or get ISO's from some place like
( http://www.linuxiso.org/ ) and burn them.
2) Install RH 9.0 from the CD's following the Upgrade option. (If
not that, then make a boot disk and upgrade via ftp, or nfs
or even kickstart, for that matter).
3) Follow the yellow-brick road.
4) Once you have rebooted into RH 9.0, do the following:
Turn off ipchains and iptables until we're done (at which
time you can configure it yourself).
As "root":
chkconfig --level 0123456 ipchains off
chkconfig --level 0123456 iptables off
If your system is configured via DHCP,
rpm -e dhcpcd
Mount your RH 9.0 CD's (I can't remember which one)
and install dhclient, instead
rpm -ivh dhclient*rpm
(If you skip the DHCP step, you'll not get an ip
because the init scripts have changed the executible
they invoke).
5) You might want to rebuild the rpm database, I did:
# rpm -vv --rebuilddb
6) If needed, launch dhclient manually or reboot.

--------------------------------------------------------------------
FUN WITH AUTORPM:
--------------------------------------------------------------------

At this point, you have rebooted your system and it has been
upgraded from RH 7.2 (or whatever) to RH 9.0.

This is how we'll get it the rest of the way to SL 3.0.3.

The tool I have chosen for this task is Autorpm because I have been
using it for quite a while and am familiar with its operation.

First off, you can probably do this with the rpm version of apt-get,
or the yum tool. I haven't looked at either of them enough to be
able to provide a good configuration. Consequently, if you can get
this to work with some other tool besides Autorpm, congratulations.
If you would like to add an addendum to this HOWTO that includes
your configuration, please send it to me, and I'll add it.

1). Learn about autorpm and some other neat stuff at:
( http://www.autorpm.org )

2). I grab the .rpm's via ftp at:
For the binary .rpm's
( ftp://ftp.autorpm.org/pub/redhat/RPMS/i386/ )
AND
( ftp://ftp.autorpm.org/pub/redhat/RPMS/noarch/ )
OR
For the source .rpm's (which I prefer).
( ftp://ftp.autorpm.org/pub/redhat/SRPMS/ )

3). The packages to get are (remember where you put them, we'll
need one of them again later):
autorpm-3.3.2-2 (Updates .rpm packages)
perl-Term-ReadLine-Gnu-1.11-5.9x (Enhances Autorpm with
automatic tab completion
and some other stuff)

4). If you prefer the binaries, then install them via
(rpm -ivh package.name.arch.rpm) and skip to step 6.

5). Next I build autorpm and perl-Term-ReadLine-Gnu.

For each, I do:
rpmbuild --rebuild package-name.src.rpm
Then I install from /usr/src/redhat/RPMS/i386 or
/usr/src/redhat/RPMS/noarch as the case may be.
(rpm -ivh package.name.arch.rpm)

6). Cool, now autorpm is installed. On to the configuration part.
In the /etc/autorpm.d/addons directory, create two files.
One named redhat-updates.conf and one named
redhat-kernel.conf. Paste the following lines into the
respective files:

redhat-updates.conf
# START SNIPPING HERE
#
ftp ("ftp.scientificlinux.org:/linux/scientific/303/i386/SL/RPMS") {

Report_To("${ReportDest}");

# Don't upgrade kernel packages...
Regex_Ignore("^kernel-");

Recursive(Yes);
Regex_Dir_Accept("${Arch}");

action (updated) {
PGP_Require(Yes);
Install(Auto);
Auto_Follow_Deps(Yes);
}

action (new) {
# PGP_Require() has the added effect of pre-downloading packages
# which is handy when running at night and applying the next day.
PGP_Require(Yes);

# Interactively install these new packages
# (you don't have them installed currently, so you might not want them)
Install(Interactive);
}
}
# END SNIPPING HERE
#

redhat-kernel.conf
# START SNIPPING HERE
#

ftp ("ftp.scientificlinux.org:/linux/scientific/303/i386/SL/RPMS") {

Report_To ("${ReportDest}");

# Do upgrade kernel packages...
Regex_Accept ("^kernel-");

Recursive (Yes);
Regex_Dir_Accept("${Arch}");

action (updated) {
Install (Interactive);
PGP_Require (Yes);
}

action (new) {
# Interactively install these new packages
# (you don't have them installed currently, so you might not want them)
Install (Interactive);
}
}
# END SNIPPING HERE
#

7). Edit /etc/autorpm.d/autorpm.conf and comment out the following
line like so:
#Config_File("/etc/autorpm.d/redhat-updates.conf");
The above stops autorpm from looking to the redhat pool for
updates. Since this line is commented, autorpm will read
our config files in the addons directory, instead.

8). Okay, next we add all the appropriate GPG keys. I got them via
ftp at:
ftp://ftp.scientificlinux.org/linux/scientific/303/i386/RPM-GPG-KEYs
The files you need are:
RPM-GPG-KEY-csieh
RPM-GPG-KEY-dawson
RPM-GPG-KEY-jpolok
RPM-GPG-KEY-redhat

I put them all in /etc/autorpm.d/keys as follows:
cd /etc/autorpm.d/keys
wget -rnd ftp://ftp.scientificlinux.org/linux/scientific \
/303/i386/RPM-GPG-KEYs/
Next, I get the keys into rpm as follows:
rpm --import KEYFILENAME
Be sure to import all the keys in the /etc/autorpm.d/keys
directory, this includes "kirk.bauer.pub-key.pgp"

9). Now, you are ready to rumble! In our next step, we will watch
as autorpm grabs all the SL 3.0.3 packages, follows the
dependencies, and updates only those packages which we
already have installed. Unless you tweak the configuration,
it's going to download everything to /var/spool/autorpm, so
be sure you have enough space for all of SL 3.0.3 there (it
was about 1.6 Gigs, if I recall correctly). Here we go:

From a shell prompt (as root), type "autorpm"

You'll be asked about a tutorial -- you decide.

Eventually, you'll get to a prompt like this:
"AutoRPM@yourhostname>"

Type: "set interactive_deps off" --> This setting lets
autorpm find deps
and auto install
them as needed
Type: "auto" --> This line tells
autorpm to follow
the directions in
the config files we
gave it in the
addons directory.

10). Go grab yourself a tasty beverage.

11). Once all of this is done, you can run through autorpm to see
if there are any packages that didn't update, or if there
are more packages that you would like to install which you
didn't have installed before. Simply typing "help" within
autorpm in Interative Mode gives you a list of commands.

12). Reboot.

13). Again, I rebuilt my rpm database, just to be safe (it's up to
you).
# rpm -vv --rebuilddb

14). Now that you are happy, and all is good with the world, why
not press our luck and toss in all the SL 3.0.3 errata?
In each of the following two files
(/etc/autorpm.d/addons/redhat-updates.conf
AND
/etc/autorpm.d/addons/redhat-kernel.conf), replace

ftp ("ftp.scientificlinux.org:/linux/scientific/303/i386/SL/RPMS") {
WITH
ftp ("ftp.scientificlinux.org:/linux/scientific/303/i386/errata/SL/RPMS") {

15). Repeat step 9 again to get all the 3.0.3 errata upgraded.

--------------------------------------------------------------------

Miscellaneous Cleanup.

--------------------------------------------------------------------
PROBLEMS INSTALLING RPM's ???

On some machines (okay, one machine) I had to do the following to
get rpm's to install happily (neither using autorpm nor command line
rpm worked without this)

export LD_ASSUME_KERNEL=2.2.5

and then launch autorpm

--------------------------------------------------------------------
ETH0

For some reason, the upgrade from RH 9.0 to SL 3.0.3 changed the
execute bit on my eth0 script (dhcpcd issue related?). I fixed it
thusly.

chmod +x /etc/sysconfig/network-scripts/ifcfg-eth0
--------------------------------------------------------------------
OPENSSL

I still had a couple of openssl packages from fedoralegacy lying
around.

$ rpm -qa | grep openssl.*legacy

openssl-0.9.6b-36.7.legacy.i686.rpm
openssl095a-0.9.5a-24.7.3.legacy.i386.rpm

$ rpm -e openssl-0.9.6b-36.7.legacy openssl095a-0.9.5a-24.7.3.legacy
--------------------------------------------------------------------
KERNEL UPGRADE

Through the whole upgrade process, the default kernel was that of:
kernel-2.4.20-30.7.legacy.i686.rpm
which was to be expected. After testing kernel-2.4.21-20.EL and
finding it worked well. I nixed the legacy kernel:

$ rpm -qa | grep kernel.*legacy

kernel-2.4.20-30.7.legacy.i686.rpm
kernel-doc-2.4.20-30.7.legacy.i386.rpm
kernel-source-2.4.20-30.7.legacy.i386.rpm

$ rpm -e kernel-2.4.20-30.7.legacy kernel-doc-2.4.20-30.7.legacy \
kernel-source-2.4.20-30.7.legacy
--------------------------------------------------------------------
MAKING IT SL

One package that doesn't get updated is sl-release. We have to do
that ourselves.

The packages in question are:

redhat-release-7.2-1
sl-release-3.0.3-9.2
AND
perl-Term-ReadLine-Gnu-1.11-5.9x

The last one reads /etc/redhat-release to verify its version, so
we'll remove it then force install it later.

From the command line, do:

rpm -e redhat-release perl-Term-ReadLine-Gnu
rpm -ivh /var/spool/autorpm/sl-release-3.0.3-9.2

As SL 3.0.3 is fathered by RH 9.0 (and, consequently, is close
enough to work properly), I reinstalled perl-Term-ReadLine-Gnu so
that Autorpm would regain its former functionality, but we have to
force rpm to skip the dependancy check.

Remember when I told you that you were going to need one of those
.rpm's from the autorpm site again? Well, cd to where ever you
put those packages from autorpm and do.

rpm -ivh --nodeps perl-Term-ReadLine-Gnu-1.11-5.9x.i386.rpm

edit /boot/grub/grub.conf just the way you like it and REBOOT for
good measure.
--------------------------------------------------------------------
Questions? Comments? Corrections? Contact greyhame@bottino.com
Created by dawson
Contributors : James R. Bottino
Last modified 2004-11-30 01:41 PM
 

Powered by Plone

This site conforms to the following standards: