Category Archives: General

x86_64 FC4 and Open Office

While attempting to compile some software on my x86_64 FC4 system I ran into a strange problem. For some reason the compile was trying to link against an i386 library. My first thought was why are there i386 libraries on my x86_64 Linux installation? Well it turns out that OpenOffice is not 64-bit clean. So, in order to have OpenOffice in x86_64 FC4 all libraries on which OpenOffice depends must be present in i386 form. This leads to duplication since the rest of the system wants the x86_64 versions. Of course this wastes a bit of disk space but disks are cheap. What is more unfortunate is that loading the i386 version of OpenOffice requires a whole bunch of i386 libraries to be loaded into memory when x86_64 equivalents are already loaded.

Lately, I have been using Gnumeric and Abiword for my office application needs so I do not require OpenOffice. Thus, removing OpenOffice and all other i386 packages from my system was the simple solution to my library linking problems.

Gnumeric and Abiword are available in the extras repository, just run “yum install gnumeric abiword”.

FC4 and CD verification

For the last several versions the Fedora Core (and previously RedHat) distribution has had the ability to verify that the downloaded CD images were successfully transfered to the newly burned discs. For people who download the images and create CDs themselves this is a fabulous feature; I am sure it has saved people from broken installations. However, as I discovered it can also lead a bit of pain.

Last week I downloaded all of the FC4 disc images and preceded to burn them to CD. After rebooting to install using the new media I discovered that the CD verification was failing for three of the five discs. So, I burned them again. Same result. Having used the CD verification for many years I had no reason to doubt it. Eventually I gave up and asked Bob to burn me a copy. Strangely, these CDs failed the verification phase as well.

Realizing that something strange was going on I started googling for similar experiences. It turns out that the CD verification can fail on certain hardware. I had simply never ran into this problem before because this was my first Fedora install on my new computer.

The solution is to boot the installation kernel with an option which tells it not to use DMA for IDE devices. At the GRUB prompt type ‘linux ide=nodma”. After doing this all discs passed their tests. There is one catch though, the Fedora installer is quite smart. If you use a kernel option to do the installation the installer decides this option must be required for successful operation. After installation I had to remove “ide=nodma” from /etc/grub.conf.

If the above wasn’t enough of an adventure I also managed to cause myself some extra pain. When I asked for a copy of FC4 to be created for me I never specified which version. My new computer has a x86_64 processor. The FC4 installation discs I borrowed were for the i386 version. After a day or so of use I realized the mistake and reinstalled with the discs that first caused the problems.

Todays bash lesson

Today I noticed that a bash script I created a couple of weeks ago to calculate some log file statistics was no longer working properly.

The culprit was the following line:

REGEX=`printf "^%s %i %.2i:%.2i\n" ${MONTH} ${DAY} ${HOUR} ${TMP_MIN}`

This regular expression was designed to match lines that start with a certain date and time. Lines like following:

May 28 12:02

The regular expression was no longer matching the log file entries I wanted it to. The problem was the day value. When I wrote and tested the script the day was double digits. Now, at the beginning of a new month, the days are single digits. The log file I was analyzing pads the day field to always be two digits wide. Thus, the regular expression no longer matched the lines because there was an unexpected space. Figuring out what was broken and fixing the regular expression didn’t take long.

REGEX=`printf "^%s %2i %.2i:%.2i\n" ${MONTH} ${DAY} ${HOUR} ${TMP_MIN}`

The script now worked properly but I noticed something weird. I had added a debugging statement below the REGEX definition.

echo ${REGEX}

This debugging statement was printing the regular expression with one space between the month and day, not the expected two. Yet, the script appeared to work perfectly. What was going on?

In trying to figure this out I went as far as creating a quick C program so that I could see exactly what was being passed in as the arguments.

Of course, it turned out to be something that should have been obvious. The bash echo command prints out each of the passed arguments with a single space between them. The echo command was interpreting each part of the string in the REGEX variable as an individual argument. The ‘fix’ was to enclose the bash variable in quotes so that it would be considered a single argument.

echo "${REGEX}"

Bash programming rule #x:: Always put double quotes around variables.

IPv6 address usage

I stumbled upon a fabulous article that discusses address utilization in IPv4 and IPv6. Two aspects of this article struck me most: wrapping your head around really big numbers is hard and it is sad to see that some of the same mistakes made during the early days of IPv4 address allocations may be repeated.

Just how big is IPv6?

Red Hat Magazine

Red Hat puts out a monthly publication called Red Hat magazine. It is usually worth looking at. Often they discuss new technologies that are entering RHEL or Fedora.

This month some of the articles include video presentations. However, the video is only available in Real Video or Quicktime. These codecs do not ship with Fedora; I’m not sure if they ship with RHEL.

Bad Red Hat!

Sin City

Last Friday Karen and I went to see Sin City. Since then I have made several attempts to write about it without success.

I’m still a little stunned by this movie. Its scary, disturbing but yet funny at times. The bad guys are sometimes just lowly hit-men out to make a buck; others include cannibals and child molesters. Make no mistake, this movie hits all the evil person buttons. The good guys are still bad guys but do bad things for mostly good reasons.

Sin City is violent but the violence forms a big part of the world so it doesn’t seem out of place.

About the only conclusive thing I can say about this movie is that it is the most unique movie I have ever seen. For that reason alone, you should go see it too.

Update: I forgot to add one of my favourite quotes from the movie.

”I love hitmen. No matter what you do to ’em, you never feel bad.”
— Marv (Mickey Rourke)

It’s been a long time..

Wow, it’s been a long time since I have posted. So here is a grab bag of what has been going on.

The last semester of my undergraduate degree is almost over. Less than two weeks left.

I handed in my undergraduate thesis last week; the presentation is this Tuesday. Fortunately, I was able to get the main work of the project done a couple of weeks ago which left me with lots of time to write the final report. This is good because I am a slow writer. At some point I’ll probably post a PDF version of the report here. If you are considering doing an undergraduate thesis I certainly recommend it. It is really great to be able to work on something personally interesting and get credit for it. Of course that is the catch, if your not interested in the topic, it is probably very hard to force yourself to do the required work.

After the thesis presentation on Tuesday the only course work I have left is two assignments: one for distributed systems and one for cryptography.

Also on the university front, I received my acceptance to the MSc program a few weeks ago.

Starting my MSc in September will be exciting but for now I’m just looking forward to four months with no homework. I’m pretty much at the burnout point.

One goal I have for the summer (besides being outside a lot) is to catch up on my reading. I tend to get quite far behind during the school year. In order to catch up I have to read: 6 issues Communications of the ACM, 5 issues of Linux Journal, 2 issues of IEEE/ACM Transactions on Networking, 5 issues of Queue and a few other miscellaneous magazines. Plus all of the unread books that have been accumulating.

And of course, some blogging!