Upgrading Fedora Core with Yum Remotely

I have recently upgraded Fedora Core 2 to Fedora Core 3 using Yum. The steps are outlined below:

  1. Import the Fedora RPM-GPG-KEY if not done so already.
    # rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora

  2. Force install fedora-release and yum rpms of Fedora Core 3.
    # wget http://download.fedoralegacy.org/fedora/3/os/i386/fedora-release-3-8.i386.rpm
    # wget http://download.fedoralegacy.org/fedora/3/os/i386/yum-2.1.11-3.noarch.rpm
    # rpm -Uvh --force fedora-release*.rpm yum*.rpm
  3. Install FC3 kernel. This should also update mkinitrd as a dependency of the kernel.
    # yum update kernel
  4. Set lilo to use the FC3 kernel prior to rebooting.
    # lilo -v -v
    # lilo -R 2.6.12-1.1381_FC3
  5. Remove any old existing kernels.
    # yum remove kernel-2.4*
  6. Continue with the upgrade.
    # yum upgrade
  7. If you get any "Dependency Errors", the mentioned packages needs to be removed prior to a successful yum upgrade.

  8. Reboot once the upgrade is successful.

References:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Upgrading FC5 to FC6 with Yum

The upgrade from FC5 to FC6 was a pretty straight-forward and without much hassle.

# rpm -Uvh \
http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-6-4.noarch.rpm \
http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-notes-6-3.noarch.rpm
# yum -y upgrade

Error when upgrading FC5 to FC6

Error: Unable to satisfy dependencies
Error: Package autofs conflicts with kernel < 2.6.17.
Error: Package hal conflicts with kernel < 2.6.17.

update kernel or remove rpms

Either, update your current kernel to the latest and greatest prior to the upgrade or remove autofs and hal rpm packages and do the upgrade. Once the upgrade is finished, you can then reinstall both rpms.

Upgrading FC4 to FC5 with Yum

The upgrade went fine after I removed 2.6.14* and older kernels.

# rpm -e kernel-2.16.14*
# rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/fedora-release-5-5.noarch.rpm
# yum -y upgrade

However, when trying to boot using the FC5 kernel -- "kernel-2.6.18-1.2239.fc5", the kernel kept going to panic mode since it failed to mount "/dev/root" as it could not find the "/dev/root" filesystem.

/dev/root being a part of initrd, I commented out the initrd part in lilo.conf and rebuilt it using `lilo -v -v`.

image=/boot/vmlinuz-2.6.18-1.2239.fc5
        label=fc5
        root=/dev/hda4
        read-only
        #initrd=/boot/initrd-2.6.18-1.2239.fc5.img

It takes a while for the kernel to load but it does boot up now.

mount: could not find filesystem '/dev/root' -- FIXED

For some reason, when init calls 'mount /sysroot', it's trying to mount /dev/root to /sysroot, instead of /dev/hda4 to /sysroot. This messes up everything after this step in the init process. When it does a switchroot at the end, it fails. After killing init, it causes the kernel panic.

Here's what I did to fix it:

  1. Boot using the initrd line commented out of lilo.conf .

  2. Extract initrd image using:
    # mkdir /tmp/new_initrd
    # cd /tmp/new_initrd
    # gunzip < /boot/initrd-2.6.18-1.2239.fc5.img | cpio -id
  3. Edit the init file and find 'mount /sysroot' and comment this out. Replace with:
    mount -t ext3 -o defaults,ro /dev/hda4 /sysroot

    ... where /dev/hda4 is the mount point for / in the fstab file.
  4. Recreate the initrd image file:
    # find . | cpio --quiet -co | gzip -9 > /boot/initrd-2.6.18-1.2239.fc5.fix.img
  5. Change the initrd line in lilo.conf to point to the fixed image.

  6. Regenerate with `lilo -v -v` and reboot.

Reference:

This is a bug in the img-file which has no raid support

Check this thread:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211030

I suggest you follow Clyde E. Kunkel's advice (a bit simpler than the above) and do the following:
mkinitrd -v -f --with=raid456 /boot/initrd-2.6.18-1.2239.fc5.img 2.6.18-1.2239.fc5

Solved my problem, at least.

Upgrading FC3 to FC4 with Yum

The upgrade from Fedora Core 3 to Fedora Core 4 was a bit tricky.

I used the FC3 kernel as booting to the FC4 kernel would not bring my eth0 network up.

# rpm -Uvh --force http://download.fedoralegacy.org/fedora/4/os/i386/fedora-release-4-2.noarch.rpm
# yum upgrade

However, after the upgrade the latest kernel on FC4 still would not bring up the network and additionally, I got "Cannot find a valid baseurl for repo: updates-released" error when using yum.

Further investigation about the yum error revealed that the problem was with wget, which would only work by forcing connecting to IPv4 address ( `wget --inet4-only http://linuxweblog.com` ). This may be related to the bug reported at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=186592 as removing "nisplus" from the "host" line in "/etc/nsswitch.conf" resolved the problem for me.

commented out lvm mounts via rc.local for FC4 kernel to work

I realized that the external usb drive being mounted by my "rc.local" file was messing up with trying to boot using the FC4 kernel "kernel-2.6.17-1.2142_FC4".

Commented out the below lines for now from the "rc.local" file:

# Mount usbdisk LVM for rsync backup
#vgscan > /dev/null 2>&1
#vgchange -a y
#mount /mnt/usbdisk

Comment