Re: Major version upgrade via YUM??

Garrick Staples <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
On Fri, Sep 12, 2008 at 10:55:24AM -0400, Seth Vidal alleged:
> On Fri, 2008-09-12 at 10:47 -0400, Sciandra, Joel wrote:
> > Are there issues doing a major version upgrade such as Centos 4.6 to
> > Centos 5.2 via YUM?
> > 
> 
> I think you'll find the kernel swap-around is tricky from 4->5 b/c of
> all sorts of dep changes.
> 
> Big jumps like that are frequently dodgy but do-able provided you reduce
> the set of pkgs on the machine to as small a set as possible.
> 
> My general suggestion if you want to try it would be:
>  1. to do a full backup
>  2. attempt the update
>  3. if it fails then punt and reinstall up to 5.2

Here's my quick and dirty script that I've been using.  It really is an ugly
thing to do to a machine.

The rpm URLs need to be updated.


#!/bin/bash

set -e
set -x

rpm -Uvh http://mirrors.usc.edu/pub/linux/distributions/centos/5.1/os/x86_64/CentOS/centos-release-5-1.0.el5.centos.1.x86_64.rpm http://mirrors.usc.edu/pub/linux/distributions/centos/5.1/os/x86_64/CentOS/centos-release-notes-5.1.0-2.x86_64.rpm

rpm -e MySQL-python
rpm -e e2fsprogs.i386 --justdb --nodeps
rpm -e elfutils.i386 --justdb --nodeps
rpm -e --justdb --nodeps python-elementtree

sed -i 's/centos4/CentOS-5/' /etc/yum.repos.d/CentOS-Base.repo

yum -y update

rpm -e python-sqlite --allmatches --nodeps
rpm -Uvh http://mirrors.usc.edu/pub/linux/distributions/centos/5/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm

yum -y update
yum clean all

echo Fixing /etc/sysconfig/autofs
(
 . /etc/sysconfig/autofs
   echo -n OPTIONS=\"
   for a in $LOCALOPTIONS;do
     case "$a" in
        -*) echo -n $a\ ;;
        *) echo -n -O $a\ ;;
     esac
   done
   echo -n -Dro=\"\"\ 
   echo \"
) >> /etc/sysconfig/autofs


-- 
Garrick Staples, GNU/Linux HPCC SysAdmin
University of Southern California

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

_______________________________________________
Yum mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFIyonI0SBUxJbm9HMRAlfUAJ950LKT52zoGJN53AG9a0SdzeYWtACbBZOc
ZwIux9Mrrhs7qEZhE+AEY9o=
=R/PQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.