How to update an existing installation from v5 to v6?

General support questions
pstein
Posts: 87
Joined: 2008/11/26 21:34:55

How to update an existing installation from v5 to v6?

Post by pstein » 2011/07/14 08:29:27

I am currently running CentOS v5.
When I click on the "New updates available" notification icon in the title bar and update then only v5 updates are retrieved and applied.

Even when I enter

"yum update"

in terminal only v5 updates are checked.

So how can I update an existing v5 CentOS to v6 CentOS (and KEEP current settings and preferences) ?

Peter

User avatar
TrevorH
Forum Moderator
Posts: 26936
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to update an existing installation from v5 to v6?

Post by TrevorH » 2011/07/14 08:30:33

The next update for CentOS 5 will be 5.7. You cannot yum update from 5 to 6.

pstein
Posts: 87
Joined: 2008/11/26 21:34:55

Re: How to update an existing installation from v5 to v6?

Post by pstein » 2011/07/16 06:22:13

I don't insist on using "yum" or "yum update".

maybe there is another way to update from ony major to the next major version?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to update an existing installation from v5 to v6?

Post by pschaff » 2011/07/16 14:52:37

Upgrades across major versions are [i][b]never[/b][/i] supported, by either [url=http://wiki.centos.org/FAQ/General?highlight=%28TUV%29#head-d29a2b7e61ffc544973098f9dd49fe4663efba50]TUV[/url] or CentOS. You could try an anaconda upgrade by booting from installation media and specifying "linux upgradeany" at the boot prompt, after a full backup, but it will still be unsupported and guaranteed to have problems such as orphan packages with no upgrade path or different naming conventions. I attempted such an upgrade on a VM as an [url=https://www.centos.org/modules/newbb/viewtopic.php?topic_id=32089&forum=55&post_id=137349#forumpost137349]experiment[/url] and it failed. YMMV.

A fresh install is [b]always[/b] recommended for a new major release.

User avatar
cybernet2u
Posts: 13
Joined: 2009/11/15 18:39:39
Location: /usr/sbin/mysqld
Contact:

Re: How to update an existing installation from v5 to v6?

Post by cybernet2u » 2011/07/16 15:38:11

but the thing is that when you first bootup centos 6 DVD it asks you
Install or Upgrade

so [b]maybe[/b] in 6.1 there will be a stable version of some program to upgrade from 5 to 6 :-D

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to update an existing installation from v5 to v6?

Post by pschaff » 2011/07/16 16:20:26

That is possible, and time will tell, but it would still be unsupported and not recommended.

rajenkins
Posts: 10
Joined: 2006/06/26 15:09:13

How to update an existing installation from v5 to v6?

Post by rajenkins » 2011/07/19 12:55:18

You can do a version upgrade with YUM - in theory...

Whether it works in practice or not depends on how similar the two systems are.
I've done it in the past - Centos 3 to Centos 4, I think.

See the info in this link for the principle of doing a version update:
[url=http://linuxsysconfig.com/2010/05/upgrade-fedora-12-to-fedora-13-using-yum/]Upgrade Fedora 12 to Fedora 13 using YUM[/url]

For Centos 5 to 6, you would replace the two centos-release- packages with the ones from C6.


I have also done an upgrade install from DVD; that was Centos 4 to Centos 5, if I remember right.

Both took some hours of fixing up afterward, manually removing obselete packages that YUM could not replace, or that caused broken dependencies.


It's an interesting experiment, but a clean install is a better option if you can possibly do that.

For the cost of a smallish hard drive or two, I now tend to use different drives for the system install (in Raid 1) and data storage, if needed on the particular machine (in Raid 5).

Swap the OS drive(s) for new ones for C6 and keep your original system intact as a fallback - and this ensures all the various config & firewall files you have been tweaking for years are available to copy back when needed. I always used to miss copying something or other and spend hours re-creating stuff..

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to update an existing installation from v5 to v6?

Post by pschaff » 2011/07/19 14:28:25

My experiment at doing a yum upgrade failed - just too many differences in rpm, yum, glibc, etc. Would be interested to see if anyone comes up with a working approach. Your suggestions about the general approach to approach are very similar to the recommendations in the [url=http://wiki.centos.org/HowTos/MigrationGuide]Migration Guide[/url].

As far as the anaconda upgrade approach - the problem has been identified as the centos-release package in CentOS-5 having an epoch of 10 while the one in CentOS-6 was reset to zero - thus the C5 packages appears "newer" than the C6 package. Seemed one should be to install the CentOS-6 centos-release on CentOS-5 but this will fail due to new rpm features. See this [url=http://lists.centos.org/pipermail/centos-devel/2011-July/007866.html]thread on centos-devel ML[/url] for details.

A work-around might be to produce a CentOS-5-compatible package of the centos-6 centos-release-6-0.el6.centos.5 package, install that , and then attempt the upgrade. Again, even if this worked, it would be unsupported and a fresh install is always recommended.

edkeasent
Posts: 6
Joined: 2009/08/14 19:39:14

Re: How to update an existing installation from v5 to v6?

Post by edkeasent » 2011/07/21 15:29:23

It's too bad TUV never ported preupgrade from Fedora to the enterprise packages. preupgrade works like a champ and does all the time consuming stuff like orphans and all that. I've been upgrading Fedora since v12 on one box and it's always been perfect. you can even use the computer productively during the first 1/2 of the upgrade.

--Ed

scottro
Forum Moderator
Posts: 2430
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: How to update an existing installation from v5 to v6?

Post by scottro » 2011/07/21 16:44:38

My own experience with preupgrade wasn't as good as yours. Also, judging from the Fedora Forums, it seems (VERY subjective impression) split about 50/50, but of course, those with smooth preupgrades may not have even mentioned it.

At this point, I still don't quite trust it, but am fortunate enough to have two drives in my main Fedora machine, so I put one on when it hits beta, and switch back to the old if necessary.

Post Reply

Return to “CentOS 6 - General Support”