Wednesday, March 21, 2007

Upgrading from Fedora 5 to Fedora 6 over the net

So far whenever I try to update my linux systems I always do a fresh install. I have my home and data partitions seperate from the root partition. So except for few configuration files which I backup I don't have anything to preserve and a fresh install is the least troublesome way to upgrade.

But I'm deeply bothered about writing few CD's and throw them away once the installation is complete. Hence this time I tried to the upgrade without reintall and without any CD's.

First I made the system clean and up to date.

yum update
yum clean all


Then I forced the update of fedora release packages.

rpm -Uhv 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


Since I modified the repo files the rpm installation deposited the repo files as .rpmnew. So I backed up the old files and moved the rpmnew files to the appropriate names. I had livna repo also. So next I moved that repo from release 5 to 6.

yum remove livna-release-5
rpm -ivh http://rpm.livna.org/livna-release-6.rpm


At this point I crossed my finger and ran yum update.


yum update


It found tons of packages to upgrade and a few to uninstall and few more to fresh install. But it also found few dependency issues mostly with gtls package depency tree. So I had to uninstall tons of packages including kde and gnome ( yeah I have both on my machine ;) ). I created a text file of those uninstalled packages with entries like this(cut and paste from yum output).

file /tmp/uninstalled.yum.lst :


GraphicsMagick x86_64 1.1.7-7.fc5 installed 8.2 M
ImageMagick x86_64 6.2.5.4-4.2.1.fc5.7 installed 11 M
ImageMagick-c++ x86_64 6.2.5.4-4.2.1.fc5.7 installed 470 k
NetworkManager-gnome x86_64 0.6.4-1.fc5 installed 403 k
control-center x86_64 1:2.14.2-1 installed 7.7 M
cups x86_64 1:1.2.8-1.fc5 installed 8.7 M
cups-libs x86_64 1:1.2.8-1.fc5 installed 311 k
dvdauthor x86_64 0.6.11-4.lvn5 installed 309 k
eel2 x86_64 2.14.3-1.fc5 installed 1.2 M
eel2-devel x86_64 2.14.3-1.fc5 installed 225 k
ekiga x86_64 2.0.1-5 installed 11 M
eog x86_64 2.14.3-1.fc5 installed 2.2 M
evince x86_64 0.5.1-4 installed 2.2 M
evolution-data-server x86_64 1.6.3-2.fc5 installed 11 M
........


Now "yum update" went fine with out any complains. Unfortunately for some strange reason it also installed i386 packages. Mine is AMD64 and I prefer only x86_64 packages. Again I created a list like the one above and gave it to yum to uninstall.


yum list | grep i386 | grep installed | awk '{print $1}' | xargs > /tmp/i386.lst
yum erase `/tmp/i386.lst`


Now I'm back to the list of packages I unistalled. Again I piped the list to yum this time I asked it to do the installation instead.


cat /tmp/uninstalled.yum.lst | awk '{print $1}' > /tmp/install.txt
yum `cat /tmp/install.txt`


Now I should have the functional system. Wait the infamous nvidia driver. I installed that too...and then rebooted the machine. Everything came up without any problem. I had to fix few inode issues so rebooted again this time logged in a single user mode ( 1 or softlevel=single in grub kernel config line) and ran fsck -y.

So there you go I made a diskless over the internet upgrade of fedora 5 to fedora 6 and I'm still alive to tell the story. My system is working fine so far with out any problems.

No comments: