Upgrading RedHat Between Releases


Table of Contents

Upgrading from RedHat to Fedora 
Preparation 
remove redundant kernels 
get your system up to date and ready for upgrade 
point apt repositories to fedora core 1 
Install the "new" apt from the new distribution 
Choosing your repositories for optimum downloads 
get GPG-signature checking ready 
Edit /etc/apt/preferences 
Upgrade the distribution 
Upgrade the new kernel 
Reboot 
GPG-signature checking 
Log 
fc1 apt warning 
fc1 apt warning 
fc1 apt warning 
upgrading to Fedora Core 1 with apt 
upgrade to fedora from shrike 
Migrating from RedHat to Fedora 
Background 
Steve's Answer 
Steve's Other Answer 
Upgrading from redhat 9 to fedora - upgrade or fresh install 
Upgrading from redhat 9 to fedora - upgrade or fresh install 
Upgrading from redhat 9 to fedora - upgrade or fresh install 
Upgrading from redhat 9 to fedora - upgrade or fresh install 
Upgrading from redhat 9 to fedora - upgrade or fresh install 
HOWTO: Upgrade to Fedora Core 2 - Test1, with apt 
Introduction: 
Option 1: Initial package upgrades: 
Option 2: Recompiling apt: 
Choosing your repositories for optimum downloads: 
Fedora apt and yum repositories 
Upgrading Red Hat Linux/Fedora Core with yum 
Upgrading to Fedora Core 2 
Upgrading to Fedora Core 1 
Upgrading to Red Hat Linux 9 
Upgrading from FC1 to FC2 using yum - a few suggestions 

Upgrading from RedHat to Fedora 

Preparation 

  • install apt.
  • it would be a good idea to BACKUP YOUR DATA

remove redundant kernels 

run rpm -q kernel kernel-smp compare the results to the kernel you are running (uname -r). run 'rpm -e' for each of the kernels that you are not using ex: rpm -e kernel-2.4.22-1.2115.nptl kernel-smp-2.4.22-1.2115.nptl

Do the same with kernel-source packages.
 ex:
   rpm -e kernel-source-2.4.22-1.2174.nptl
This will make things a lot easier on you, trust me, and it frees up a HUGE
amount of disk space.
[Tip]

!!

$ rpm -qa | grep -i kernel kernel-2.4.20-24.9 kernel-pcmcia-cs-3.1.31-13 kernel-ntfs-2.4.20-24.9 kernel-source-2.4.20-24.9

rpm -e kernel-pcmcia-cs kernel-ntfs kernel-source rm /etc/sysconfig/pcmcia.rpmsave

get your system up to date and ready for upgrade 

run the following commands:

apt-get update
apt-get install

point apt repositories to fedora core 1 

Update /etc/apt/sources.list:

# os        = Fedora Core packages
# updates   = Fedora Core updates
# stable    = Fedora.us (Extras) packages
# kspei     = Steve's random stuff (optional, mostly stuff submitted to fedora.us)
# freshrpms = freshrpms.net packages (optional, mostly desktop stuff)
rpm http://apt.kspei.com fedora/1/i386 os updates stable kspei freshrpms
rpm-src http://apt.kspei.com fedora/1/i386 os updates stable kspei freshrpms

Edit existing third-party repositories to apt configuration files in /etc/apt/sources.list.d, e.g., /etc/apt/sources.list.d/greysector.list, which is for MPlayer and some other software.

Install the "new" apt from the new distribution 

apt-get update && apt-get install apt

After the new apt is installed, the the old /etc/apt/apt.conf will be wiped out by new apt — placing only a tag saying that this is a fresh installation so that you need to choose a mirror site. /etc/apt/sources.list is also emptied.

You should make new changes ase default:

mv -f "/etc/apt/apt.conf.rpmnew" "/etc/apt/apt.conf"
mv -f "/etc/apt/sources.list.rpmnew" "/etc/apt/sources.list"
mv -f "/etc/apt/preferences.rpmnew" "/etc/apt/preferences"

Choosing your repositories for optimum downloads 

The quickest way to do this is:

apt-get mirror-select

If you don't do it, the new apt-get will ask you the same questions any way.

get GPG-signature checking ready 

see below.

Edit /etc/apt/preferences 

cat >> /etc/apt/preferences
Package: *
Pin: release c=fc1
Pin-Priority: 993
Package: *
Pin: release c=os
Pin-Priority: 992
Package: *
Pin: release c=stable
Pin-Priority: 991
Package: *
Pin: release c=at-testing
Pin-Priority: 990

This will help prevent any conflicts between the various repositories.

Upgrade the distribution 

apt-get dist-upgrade

It should work. Note that upgrading RH9->FC1 had a minor issue with some perl stuff moving around causing conflicts (Note, I didn't see anything like that going from RH 7.3 to FC1 for whatever reason). E.g., something to do with perl and perl-cgi, etc. Remove the offending packages with rpm -evv —nodeps and then continued with the upgrade by re-issuing the command "apt-get dist-upgrade".

If apt-get dist-upgrade fails, you probably just need to clean some things up manually. The simplest route is usually to just apt-get remove the offending packages.

For safety, after upgrading rpm, always run rpm —rebuilddb before doing anything else.

Upgrade the new kernel 

When all is done, the system will be basically upgraded, except for the kernel, and will still be running on the old kernel with pretty much everything else upgraded. At this point,

run apt-get dist-upgrade again. That should upgrade your kernel to the latest version and install a few things that the newer version of apt knows about (like replacing redhat-release with fedora-release).

you can say "apt-get install kernel" to install the fedora core kernel, and at a time of your choosing, you can then boot into the new kernel. The one thing I found I had to install manually was fedora-release. "apt-get install fedora-release" cleared that up.

Reboot 

Select the new kernel from the grub menu. If AOK, you should be all done. You can remove the old kernel now.

GPG-signature checking 

switch off GPG-signature checking 

To switch off GPG-signature checking with apt, edit /etc/apt/apt.conf and uncomment this line: GPG-Check "false";

Install Red Hat's gpg key. 

Some things are still signed with it instead of the Fedora key for some reason.

cd /etc/apt/gpg \
 && links -source \
   http://ftp.kspei.com/pub/redhat/linux/9/en/os/i386/RPM-GPG-KEY \
   > gpg-pubkey-db42a60e-37ea5438

The next time you run apt, it will import that and any other files that begin with 'gpg-pubkey-' in /etc/apt/gpg. See /usr/lib/apt/scripts/gpg-import.lua.

Be sure to grab the keys for any other repository you use (e.g. freshrpms, my "kspei" stuff, rpm.livna.org, etc.).

Log 

% apt-get remove mozilla mozilla-mail mozilla-nss mozilla-psm xchat

% apt-get -f install mjpegtools mjpegtools-libs
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  mjpegtools mjpegtools-libs
0 upgraded, 2 newly installed, 0 removed and 12 not upgraded.
Need to get 0B/838kB of archives.
After unpacking 1856kB of additional disk space will be used.
Committing changes...
Preparing...                ########################################### [100%]
        file /usr/lib/liblavfile-1.6.so.0 conflicts between attempted installs of mjpegtools-1.6.2-7.rhfc1.at and mjpegtools-libs-1.6.1-0.lvn.6.1
        file /usr/lib/liblavjpeg-1.6.so.0 conflicts between attempted installs of mjpegtools-1.6.2-7.rhfc1.at and mjpegtools-libs-1.6.1-0.lvn.6.1
        file /usr/lib/liblavplay-1.6.so.0 conflicts between attempted installs of mjpegtools-1.6.2-7.rhfc1.at and mjpegtools-libs-1.6.1-0.lvn.6.1
        file /usr/lib/liblavrec-1.6.so.0 conflicts between attempted installs of mjpegtools-1.6.2-7.rhfc1.at and mjpegtools-libs-1.6.1-0.lvn.6.1
E: Error while running transaction

apt-get remove transcode perl-Video-DVDRip
  -- solve the above mjpegtools/mjpegtools-libs problem

apt-get remove lm_sensors
rpm -ev --nodeps mplayer perl-libwww-perl

apt-get check
E: Unmet dependencies. Try 'apt-get -f install' with no packages

Keep running:

apt-get update
apt-get upgrade
apt-get check
apt-get install

until AOK, i.e.,

% apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 removed and 0 not upgraded.

% apt-get check
Reading Package Lists... Done
Building Dependency Tree... Done

Note that kernel was also upgraded, and I wasn't bothered by
redhat-release or fedora-release at all.

% rpm --rebuilddb

problems 

mozilla has no installation candidate 
% apt-get install mozilla
Reading Package Lists... Done
Building Dependency Tree... Done
Package mozilla has no available version, but exists in the database.
This typically means that the package was mentioned in a dependency and
never uploaded, has been obsoleted or is not available with the contents
of sources.list
E: Package mozilla has no installation candidate
apt-get update
% apt-get install mozilla

— ok now.

An extra kernel-BOOT 
% rpmqi kernel
kernel-2.4.20-24.9
kernel-BOOT-2.4.22-1.2190.nptl_49.rhfc1.at
kernel-2.4.22-1.2190.nptl_49.rhfc1.at

kernel-BOOT:

This package includes a trimmed down version of the Linux kernel. This kernel is used on the installation boot disks only and should not be used for an installed system, as many features in this kernel are turned off because of the size constraints of floppy disks.

rpm -e kernel-BOOT

documented on: 2004.06.16