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!


Updgrading to Fedora 17 - preupgrade

I took this advice in upgrading via yum seriously :
However Fedora 17 is very special. You should seriously consider stopping now and just using anaconda via. DVD or preupgrade, unlike all previous releases it's what the yum/rpm developers recommend. Continue at your own risk.
I decided to use preupgrade. I would have preferred yum as I would have more control over the update even if it were riskier. Anyway, the preupgrade went through nicely overnight. About 4 GB was downloaded and I was ready for the final stage.

Uses grub2 

I rebooted the system and it did nothing. I have continued to use grub and had not migrated to grub2. Preupgrade had created a new file grub.cfg in /boot/grub2. After failing to get the upgrade kernel to boot from grub, I installed grub2. It was easier than I had feared. It left the grub.cfg file untouched. I rebooted and the upgrade started.

It soon told me that I needed an additional GB of space. After making the additional space, I rebooted and the upgrade started. Everything was fine until it was cleaning up files. It just wouldn't end. I noticed at least 3 times glibc being cleaned up. There was little option but to reboot.

The reboot went through the upgrade process and felt that everything was done. I was ready to reboot into Fedora 17, except that the grub.cfg file was still the same and the preupgrade files had been removed. Fortunately, using the minimal editor in grub, I could boot using the F17 kernel. The first thing I did was to create a new grub.cfg file. The fireworks on the desktop looked nice.

SSH and password-less login

One minor issue was that I needed to give the password for using ssh from my remote system. I needed to copy authorized_keys2 to authorized_keys in .ssh.

Firefox crashes

Firefox seems to crash with a few tabs. It seems to be a random problem. However, if I download Firefox 12 from Mozilla, it works fine!

Save preupgrade files in case you want to upgrade more than one system.

I did not want to download the files again for my netbook. As a precaution, I had saved all the preupgrade files, in particular the rpm packages. As I feared, it cleaned up and even though keepcache was set, there were no packages of fedora 17 in the yum cache after the upgrade.

Thursday, May 17, 2012

Making Canon LiDE 110 flatbed scanner work on Fedora 64 bit

Update: I will never know what was the actual the reason because I can no longer reproduce the problem. The scanner works with the same sane-backend rpms.

It has been bothering me for months as to why does the Canon LiDE 110 work fine on Ubuntu and Arch Linux but not on Fedora. However, I finally got around to spending some effort on it.

I downloaded the stable source from the sane project. Installed it on top of fedora's rpm's. It worked. However, it seemed surprising but may be fedora had made some changes. They hadn't.

I had made a silly mistake and installed the libraries in /usr/lib instead of /usr/lib64. So, I uninstalled it and rebuilt sane-backends with
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64

Now, the scanner stopped working!

Uninstalled it, rebuilt sane-backends with
 ./configure --prefix=/usr --sysconfdir=/etc

The scanner was now recognized! So, it somehow needed some libraries to be installed in lib.

Ubuntu uses lib on x64 as well. And I was using 32 bit version on Arch Linux!

Saturday, April 28, 2012

Why I prefer talking to Software

My wife suggested that I call the call center for a billing clarification. I prefer not to do so and this experience again reinforces my preference.

I got the clarification that the additional bill amount was some additional installation charges - it was too small for me to argue about it. However, the human insisted on telling me about a great 70% off promotional offer, which I declined politely without even listening to it. To my surprise my no was ignored. A few hours later, the offer was enabled on my set-top box.

This time I used the online complaint but the call center called back as I expected. He was going to delete the additional package but wanted to explain the offer to me. I got irritated - the f.. word got him off my back but ruined my mood.

I think it is in God Bless You Mr. Rosewater that Kurt Vonnegut raises the question - what's the purpose of humans on earth!

Sunday, April 22, 2012

Goofing up with Miro - could the UI be smarter?

I have been using Miro for several years. So, it isn't that I was unfamiliar with the user interface. However, I am still bewildered that how did I remove all the TED videos I had downloaded instead of deleting the one sentimental video I intended to delete.

A major part of the problem was the poor response of Miro on the netbook. I had clicked the delete option on the video as it was playing. It did not seem to have worked. I deleted it from the video list and clicked on a menu option to confirm deletion. I clicked on the form several times as it did not seem to respond. I clicked multiple times because on the netbook, I often needed to click twice for Miro to queue my download request.

Since nothing seemed to be happening, I suspect that I must have clicked on remove podcast option absentmindedly. I am hoping that I had clicked on a confirmation screen after I clicked on remove podcast. It would have been a very unfortunate programming issue if one of my earlier clicks had been taken as a confirmation for the deletion of the podcast!

This is, obviously, nothing more than a minor 'disaster' or, more precisely, an irritation. It does raise the issue of how does the software UI behave in a sluggish environment. Can we code UI in such a way that the intentions of the user and their interpretation is not distorted by performance issues of the application?

We also need a better alternative to the confirmation screen. I doubt if anyone reads the confirmation screen before clicking after the first few times. So, how about a confirmation screen after the event with an UNDO button instead of an OK?

Tuesday, March 27, 2012

Creating a presentation for showing source code

Giving a presentation which has source code fragments has never been easy.

Normally, I have been pasting code fragments in an OpenOffice presentation. The effort in getting it right has been sufficiently irritating that I try to avoid it.

I finally used a process which I found very convenient.

1. Use vim :TOhtml command to get color coded source code. It was even easier using gvim.

2. Open the html file in OpenOffice. Change the font size to 16.

3. Create a new OpenOffice text document. Choose page size as A5 and landscape orientation.

4. Copy paste the fragments. Add comments, etc. Edit like a normal text document.

5. Export it to pdf.

6. Show it using the presentation mode in evince or  okular.




Monday, March 5, 2012

Overcoming Slow Boot of Fedora 16 after LiveCD installation

I had failed to upgrade Lenovo S10-3 netbook to Fedora 16 using yum as I have been doing for several years and successfully did on my desktop. The system became unusable under Fedora; so, I could not diagnose the cause.

I installed KDE livecd spin on the netbook. The boot time seemed to be ages in comparison to Fedora 15 and, especially, Arch Linux which I normally use on this netbook.

Searching the net for plausible reasons led to using "systemd-analyze blame". The top of the list was "udev-settle.service", which really is not the issue.

Anyway, I noticed that there were livesys.service and livesys-late.service which are not needed once the livecd is installed. The time shown for these by "systemd-analyze blame" was 290ms and 44msec respectively. Hardly something to worry about. However, disabling the livesys and livesys-late services resulted in the userspace boot time decreasing from 87 sec to 36 sec! The overall decrease was 97 sec to 44  sec :)

Now, "systemd-analyze blame" gave a little more useful details. The top entry was iscsi.service. Wikipedia entry indicated that this was not something I was likely to use. Disabling iscsi and iscsid services reduced the userspace boot time to 27 sec and overall time to 37 sec.

Removing mdmonitor-takeover and lvm2-monitor services did not make any significant difference.

Disabling httpd and and mysqld, which I normally do not need on the netbook, saved another 5 sec and the boot time now is 32 sec of which 22 is the userspace time.

Next step is to use bootchart to see if I can understand where the time goes before the system becomes usable.