Upgrading RHEL 4.x to Fedora 11
Have remote, CD-ROM-less server with RHEL 4.x (well, SL 4.x) on it; require Fedora 11. Wander over and set up a PXE install for Fedora 11? Or attempt to upgrade from RHEL 4.x to Fedora 11 via yum? :-)
Outline Procedure
First:
yum clean all
- Manually install fedora-release-7-3.noarch.rpm and its dependency
fedora-release-notes-7.0.0-1.noarch.rpm (e.g., using wget
and rpm, or something like
rpm -Uvh http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/fedora-release-7-3.noarch.rpm
- Manually remove the old RHEL (well, SL) repo files from /etc/yum.repos.d if necessary.
- Use wget and/or rpm to upgrade python-related packages, then rpm-related packages, them yum-related packages, and the rpm database-related packages, i.e. db... (not dbus!); and selinux stuff.
- Then openssl and openssh.
Rules of Thumb
- Before upgrading, emove as much cruft as possible, e.g., all the GNOME/KDE-related stuff, and leave just the base OS.
- You will need to be brave and use --nodeps and --force sometimes — and thus likely break all sorts of things; as long as these are not things we are using (network connectivity, basic stuff like ls, bash. . . , we are ok).
Outline of Upgrade of Python and RPM
rpm -Uvh glibc-2.6-3.x86_64.rpm glibc-common-2.6-3.x86_64.rpm --nodeps --force rpm -Uvh python-2.5-12.fc7.x86_64.rpm python-libs-2.5-12.fc7.x86_64.rpm --nodeps rpm -Uvh elfutils-0.127-1.fc7.x86_64.rpm elfutils-libelf-0.127-1.fc7.x86_64.rpm elfutils-libs-0.127-1.fc7.x86_64.rpm rpm -Uvh rpm-python-4.4.2-46.fc7.x86_64.rpm rpm-libs-4.4.2-46.fc7.x86_64.rpm rpm-4.4.2-46.fc7.x86_64.rpm beecrypt-4.1.2-12.x86_64.rpm popt-1.10.2-46.fc7.x86_64.rpmBut then the new rpm would not work owing to SELinux-related issues. . .
SELinux-Related Problems
rpm ... unknown symbol mathpath_init # ...or something similar...
Solution: scp over a newer version of /lib64/libselinux.so.1 (more accurately, whatever this s-link was pointing to) from a newer system, e.g., RHEL 5.x. Thankfully scp was still working! Then s-link to it. Take care, e.g.,
cd /lib64 cp libselinux.so.1 libselinux.so.1--orig cp /home/simonh/libselinux.so.1 libselinux.so.1--new ln -s /lib64/libselinux.so.1--new /lib64/libselinux.so.1 --forcei.e., ensure that at all points you have some sort of /lib64/libselinux.so.1 else ls and almost everything will break!
And yes, I did not have a valid /lib64/libselinux.so.1 at some point! Help! But luckily, ln -s still worked. . .
Eventually, once rpm was working again:
rpm -Uvh mcstrans-0.2.5-1.fc7.x86_64.rpm rpm -Uvh libsepol-2.0.3-1.fc7.x86_64.rpm ln -s /lib64/libselinux.so.1--new /lib64/libselinux.so.1 --force rpm -Uvh libselinux-2.0.13-1.fc7.x86_64.rpm --force
yum and _sha256
yum ... no module named _sha256Solution: scp over an updated libopenssl/libcrypt, then rpm-install the proper one:
scp newer libopenssl and libcrypt from a RHEL 5.x install cd /lib64/ ln -s libssl.so.0.9.8b libssl.so.4 --force ln -s libcrypto.so.0.9.8b libcrypto.so.4 --force
The old-faithful RPM database problems rear their ugly head
warning: python-2.5-12.fc7.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2 rpmdb: Program version 4.3 doesn't match environment version error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch error: cannot open Packages index using db3 - (-30974) warning: cannot open Solve database in /usr/lib/rpmdb/x86_64-redhat-linux/SL error: Failed dependencies: libdb-4.5.so()(64bit) is needed by python-2.5-12.fc7.x86_64Solution:
[root@fluent ~]# rm /var/lib/rpm/__* rm: remove regular empty file `/var/lib/rpm/__db.000'? y rm: remove regular file `/var/lib/rpm/__db.001'? y rm: remove regular file `/var/lib/rpm/__db.002'? y rm: remove regular file `/var/lib/rpm/__db.003'? y
Then db4, python completion and yum
rpm -Uvh readline-5.2-4.fc7.x86_64.rpm --nodeps rpm -Uvh db4-4.5.20-5.fc7.x86_64.rpm --nodeps rpm -Uvh python-2.5-12.fc7.x86_64.rpm yum ...urlgrabber-related error message... rpm -e urlgrabber rpm -Uvh python-urlgrabber-2.9.9-5.fc7.noarch.rpm --force rpm -Uvh pygobject2-2.12.3-3.fc7.x86_64.rpm rpm -Uvh glib2-2.12.11-1.fc7.x86_64.rpm rpm -Uvh pygobject2-2.12.3-3.fc7.x86_64.rpm rpm -Uvh yum-3.2.0-1.fc7.noarch.rpm yum-metadata-parser-1.1.0-2.fc7.x86_64.rpm
Sqlite-related:
yum Loading "installonlyn" plugin Could not find any working storages. Exception exceptions.AttributeError: "'YumRepository' object has no attribute 'sack'" in <bound method YumRepository.__del_ _ of <yum.yumRepo.YumRepository object at 0xbf2850>> ignored
Solution is to ensure sqlite-related RPMs are installed and OK:
rpm -Uvh sqlite-3.3.13-1.fc7.x86_64.rpm