Showing posts with label update with yum. Show all posts
Showing posts with label update with yum. Show all posts

Saturday, June 2, 2012

Upgrading to Fedora 17 - using yum

Since my experience with preupgrade on the desktop was not so great, I decided to take a chance with upgrading my Lenovo S10-3 netbook to fedora 17 using yum.

The additional steps of modifying the filesystem using dracut were not really complex.

Most of the packages had already been downloaded by preupdate, which I had preserved. I copied them into the cache of  yum and executed:

# yum --releasever=17 --disableplugin=presto distro-sync

Unfortunately, after updating about 500 packages, yum seemed to be doing nothing. I killed the command. And ran yum-complete-transaction. It seemed to be using the repositories of Fedora 16 even though fedora-release files had been installed. So, I ran

# yum-complete-transaction --releasever=17

After a pretty long time, it told me that there were problems. I tried again with

# yum-complete-transaction --releasever=17 --skip-broken

An equally long wait and no better result. The problem was that rpm database had entries for both 16 and 17 versions for the packages which were updated.

The following command also did not help (Next time, I need to try with  the -t option to see if it would have tolerated errors).

# package-cleanup --cleandupes

The problem was that packages which had not yet been updated depended on the duplicates. Had I allowed this script to run, it would have deleted most of the packages.

I found a python script I had written when an upgrade from FC7 had failed because of power failure. The script created a file with the list of older duplicates, which could be used as an input to rpm as below:

# rpm --nodeps -e `cat deleteList.txt`

Finally, I cleaned up the failed yum transaction and ran:

# yum --releasever=17 --disableplugin=presto distro-sync

This time, the upgrade finished cleanly. Although it took about the same time and effort as the preupgrade, I enjoyed solving these problems a bit more.

Firefox crashes

As on the desktop, firefox crashed with even a few tabs. It seemed to be a random problem. However, I downloaded Firefox 12 from Mozilla and firefox works fine!


Friday, May 6, 2011

Upgrading the Desktop to Fedora 15 Beta

I decided to take the risk of updating the desktop to Fedora 15 beta after trying it on the Lenovo netbook. My wife uses Gnome desktop so the risk of upgrading was very high!

I was keen to see how delta-rpms work across distribution versions. So, after installing the fedora release rpm for Fedora 15, instead of upgrading the system, I upgraded only rpm and yum packages. The dependencies resulted in upgrading of about 60 packages, some of which surprised me. Had I followed the instructions in http://lists.fedoraproject.org/pipermail/test/2011-February/097009.html and installed xz-compat-libs first, it would have reduced the number of packages affected.

The next step was to upgrade the entire system. I copied the cached rpm's from the netbook to save some download effort. Even then 1.5GB of additional downloads were needed. However, this time the delta rpm packages could be successfully used. This resulted in 94% saving on half a GB of downloads. I wish delta-rpms were available for the remaining 1GB of packages!

Aside from having to uninstall some packages, the upgrade was smooth.

As I had experienced on the netbook, the network was not working. For reasons not yet identified by me, systemd fails to start rsyslog and NetworkManager at boot time. A simple workaround was to explicitly add the following lines to /etc/rc.local
/etc/init.d/rsyslog start
/etc/init.d/NetworkManager start
The system was now usable, even by my wife, subject to the Gnome 3 concerns.

Sunday, April 24, 2011

Upgrading to Fedora 15 beta - the problems encountered

As usual, I wanted to upgrade the existing Fedora distribution using yum and not install it from scratch. I was wondering how smooth the transition to Gnome3 would be. I decided to experiment on Lenovo S10-3, especially as I was curious to see how Gnome 3 looks in comparison to the Ubuntu Unity on a Netbook.

The first step was to download fedora-release-15-0.7.noarch.rpm and manually install it. I needed to install fedora-release-rawhide-15-0.7.noarch.rpm as well.

As expected, some packages created conflicts. These seemed to be related to meego desktop. So, I removed them as that could be tried later.

Surprisingly, I had conflicts with backgrounds which I could not resolve. To narrow down the issues, I decided to disable the updates-testing repository and see if there was a change.

Now, I could go through with the upgrade but after I had forcibly removed gnome-themes. This did not seem to be a concern as there were conflicts in file names with another similar package.

The next surprise was that there were delta rpm packages. However, they would not work. Sadly, I did not read this documentation and had not seen this link regarding the changes in the xz compression. I let yum download the full packages.

The system was up and running. The KDE environment did not look any different. The Gnome3 environment was, of course, disconcerting. However, my first concerns were more immediate.

The first shock was that network manager did not find any devices.

A little search revealed that Fedora does not ship with the open source driver for Broadcom wifi devices as it is still a part of staging directory in the 2.6.38 kernel. And the wl driver was also not available for this kernel from the freshrpms repository. I will need to build a custom kernel.

That did not explain why the wired ethernet card was not found. I could get the network to work by explicitly running
# ifconfig eth0
#dhcpclient eth0

But why was network manager having a problem?

This led to the discovery of two other issues - /var/log/messages contained no new messages. And the NetworkManager system service was not running. I could manually start it and it would then find the eth0 device.

I tried the LiveCD and the messages file contains new entries. The logger works as expected.

Network manager works with the wired ethernet card without having to manually start the NetworkManager service. The difference is that the device is named em1 and not eth0.

So, somehow some of the configuration settings are not the expected ones because I upgraded from Fedora 14 to 15 beta.

Next step will be to understand how the new systemd is working and what could have caused the unexpected behavior when booting into Fedora 15.

Thursday, November 4, 2010

Upgrade to Fedora14

This time also, I updated Fedora using yum. On this occasion, the update was more challenging. The update failed in the middle and I had to recover the system from an inconsistent state.

I started the upgrade with the usual  first step.
$sudo rpm -Uv fedora-release-14-1.noarch.rpm

Next step was to empty the /var/cache/yum directory and started
$sudo yum update

It needed to download 2.6GB. The downloads succeeded and the update started. I was updating the system from a diskless system, in retrospect an unnecessary risk. My wife was working on the main system. The GUI sessions got stuck after a few hours. It seemed that the update had finished. I rebooted and the system seemed fine except that evolution failed to start.

A little investigation indicated that yum update had failed. I started
$sudo yum-complete-transaction
But after a considerable time, it indicated that the package database was not in a proper state and it could not continue. The rpmdb had both fc13 and fc14 packages installed for quite a few packages.

I used
$sudo package-clean --cleandupes

It took several hours but completed successfully. I now reran
$sudo yum update

This succeeded; however, package-clean seemed to have removed the desktop environments I was using - gnome, kde and LXDE. I had to reinstall these desktop environments. Since the packages had already been downloaded, it did not take time.

I am now working with Fedora 14 and install any missing packages as I need them. The time taken - a day. Not too bad given the problems encountered and the upgrade was certainly not boring this time.

Saturday, June 13, 2009

Fedora 11 Upgrade - the unofficial way

I continue to believe in 'Fedora 9, May You Live a Hundred Years, Please!' that I wrote in Linux for You, April 2008. Any upgrade is a disruption. Still, I am addicted.

I continue my experiments with upgrading with minimal disruption - even though the elapsed time is much longer. The original source of this method:
http://www.ioncannon.net/linux/68/upgrading-from-fc6-to-fedora7-with-yum/

I had used it to upgrade a system which had no CD/DVD and used the rpm's cached on a server.

The 'zeroth' step - 'yum update' to ensure that we have the latest updates.

The first step - download fedora-release from Fedora 11 repository and manually update the rpm.

This now ensures that yum will search Fedora 11 repositories. It is better that yum does a clean start. So,

$sudo yum clean all

Now, preferably in a screen session:
$sudo yum -y update
and sit back and do what you want.

Not entirely, I needed to erase some packages like 'VirtualBox' which had not been downloaded through one of the configured repositories.

I also had to erase 'Miro', 'ntp' and 'ntpdate' as the versions with the Fedora 10 update were higher than the ones in Fedora 11 at the time! 'ntp' and 'ntpdate' were installed as a part of dependency resolution. I installed Miro after the update to Fedora 11.

I restarted 'yum -y update'. Thirty hours later, 2.5 gb of data was downloade in about 2000 packages. The 'broadband' connection is 256K.

I had been hoping for a miracle. I had hoped that there would be delta-rpm packages for Fedora 10 to Fedora 11 updates! It would have reduced the time to below 10 hours of downloads. Who knows, it may happen for Fedora 12.

There was still 2 GB space available, but while running the transaction but before actually any update, yum complained that not enough space for some packages. I managed to increase the space to 3GB and the update succeeded.

The extra disk space used after the upgrade was .7gb. However, it needed just above 2 GB during the update process.

The use of screen was a life saver. There was a kernel failure and the konsole session died. However, yum update continued. The actual update took about 3 hours.

15 June: Came across this useful link http://fedoraproject.org/wiki/YumUpgradeFaq