Wednesday, June 28, 2006

Fedora Core 5, Part 2

The title of this might seem a little strange as there has not been a "part one" yet, however I feel that I'd like to share this first nonetheless. Part 1 is going to be a little more exhaustive on several aspects of my searching for an alternative to Windows XP as a desktop system.

This one might also be called "DVD playback on Fedora Core 5".

One of the more disappointing aspects of my new Fedora Core 5 install is the apparent lack for multimedia support. Sure, there is the default totem player, but I got the impression that it tried hard to avoid playing back anything I would have liked to see or hear.

Especially DVDs were a concern for me. I have bought lots of movies and TV series over the years and I surely like to watch them once in a while, if it even is only a background windows playing Star Wars (to be honest, as often as I have seen those, I would not need the picture anymore anyway ;-).

I was close to revert back to Windows when I could not find any pre-installed software that would "just" require an additional decoder. I did not even find a hint how to do it. I understand that Fedora contains only free software, but a simple text note or a link to a more detailed explanation how to get the stuff you need on your own would have been nice.

On FedoraForum I found this thread containing some basic steps on how to get going with DVDs and video files. I suggest taking a look at it. I had set up the Livna repository before for the nvidia drivers, so I skipped that step. But everything else went very smoothly.
Following the "todo list" the only thing I noticed was that there were some messages about single packages not found, but it seems everything got installed just fine.

After that I could have my first look at The Revenge Of The Sith on Linux. :)

Tuesday, June 27, 2006

MySQL Replication: Error 1053

When setting up MySQL replication there are some things to remember. Although the setup is quite easy if you thoroughly read the documentation on MySQL's developer site you might still hit some issues.

We have quite a large scale replication setup (MySQL 4.1.12) with several hundred slaves. Today we saw a very strange situation: All of the slaves stopped replicating and claimed that a statement had been partially executed on the master side. The exact message was

Query partially completed on the master (error on master: 1053) and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;

The error code 1053 which means as much as "server shutdown".

We checked the master and could not find anything unusual. The server had not been shut down at all and nothing seemed wrong with the master replication settings either.

In the end we found out what had caused the problem: Someone had tried to create a dump of the master server using mysqldump --master-data. This implies a FLUSH TABLES statement. Because that statement took too long it was aborted using the MySQL KILL command. However because that statement had already been replicated to the slaves and was now aborted, the slaves took it for "partially executed" (which is usually something bad). The error code you can see on a killed client is 1053. So the slaves decided that something serious had happened and stopped the communication with their master.

I will have to look more closely into the documentation, but probably I will have to file a bug report as the replication should not suffer from this special case.

Friday, June 16, 2006

XP activation hassles

As I wrote in my previous post I just bought a new notebook computer that came with a preinstalled Windows XP Home Edition. After I had reinstalled it, XP Home's activation would fail with a message about an invalid product key.

Already suspecting something nasty going on, I searched the net for a while and found, that in April 2005 Microsoft published a Technet article titled Preserving OEM Pre-Activation when Re-installing Windows XP. From what it says Microsoft disabled the internet activation for all OEM products to prevent system builders from pre-activating their machines and selling the product keys separately.

I was trying to activate at 0100h in the morning, and of course nobody was available at Microsoft. I thought that was ok, because you have 30 days to activate, but when I went to it told me that I had to activate first, because otherwise it could not run the Genuine Advantage check! Now that's to my liking! As a paying customer you have to wait till you can install the 45(!) patches that were available at that time.

Has anyone ever wondered what happens if Microsoft decides that XP has reached its end of life? If I once bought a Windows 3.1 license I can still install it today - given that I have a machine that's not too fast for it :) - but will I be able to do so with XP in 10 years?

Anyway, I indeed had to wait till the next day to go through the telephone activation procedure. Because I already knew that the automated phone activation would not work I just entered lots of 1's when asked to provide the activation code. After that I was put through to a living being, who first asked me to provide the first and the last block of my activation code. Then she wanted me to enter the product key from the sticker attached to the notebook (again). I do not know why, but I decided to play dumb and just do it. Finally, after I had told her the whole activation code and answered her question on how many machines I had installed XP to (honestly, who would tell them anything but "1", even if he/she did install it multiple times?), she gave me the final activation sequence.

First thing after that was to save the wpa.* files from the system32 folder to a CD. This should allow me to install the machine time and again if I want to without having to go through the activation again (of course only, if the hardware stays the same). To restore a saved activation state, just boot into Safe Mode and put the files from the CD back into the system32 folder.

Wednesday, June 14, 2006

XP ISO Builder

I recently bought a new Notebook for my girlfriend. It came pre-installed with Windows XP Home (Toshiba OEM) and included lots of things I did not really care for. Moreover I have reservations against any installation I have not done myself or really know the person who did. So I went for a clean and fresh install.

My enthusiasm was subdued by the fact that they only provide a recovery CD that restores an image including all the stuff I wanted to get rid of. Because I do not have a regular XP Home CD I searched the web to see how other people had handled this problem.

Someone in a forum wrote that you could create a Windows install CD from an installed version using several tools. Looking for an easier way I came across a solution provided by the German c't magazine (see here) and the XP ISO Builder. The c't tool allows you to create a CD directory structure and an ISO image from a running Windows in one step. All necessary files are collected from the Windows directory and some helper files (e. g. the CDs boot code) are created. It also allows you to slipstream a service pack.

XP ISO Builder allows you to easily create unattended installs. But you can also use it to include a lot of settings into the Windows CD:

  • make the details view default in Explorer
  • use the classic Windows look as default
  • create user accounts on installation
  • include "F6" drivers (great if you do not have a floppy drive anymore)
  • include other device drivers for hardware not supported by the original Microsoft CD. Very useful for network and wireless drivers.
  • specifiy location and size of the page file
  • relocate the Documents and Settings folder
  • incorporate Service Packs and other Microsoft updates
  • include 3rd party applications to automatically install after setup
  • lots more

So I took the structure created by the c't tool as input for the ISO Builder and created a bootable DVD that includes all the drivers related to the Toshiba notebook and lots of other stuff (Acrobat Reader, anti-virus software, HDDhealth etc).

Installing the system with this disk was then really very relaxed. I recommend to build a custom install disk very much, because it can save you lots of time if you reinstall a system.

Wednesday, June 07, 2006

ext2/ext3 access for Windows

I recently installed Fedora Core 5 to replace the somewhat troublesome FC4 I had before. I downloaded some large files onto the Linux partition that I would need on Windows, too. Unfortunately at the time I did not remember that NTFS write support is still far from stable, so I did not want to risk mounting my Windows data volume other than read-only. That left me with either splitting the file and copying it via USB stick (piece by piece with several reboots) or getting Windows XP to support for the Linux filesystem (ext2/ext3).

I just wanted to share this link to Ext2 IFS for Windows which is an installable file system driver for Windows. After a reboot you will be able to read and write partitions formatted with the ext2 filesystem (and the compatible ext3, too). So far I have not had any trouble. Installation is straight, as is its use. It will just let you assign drive letters to your Linux partitions. Very nice work!

Techs writing documentation

I recently read a very good post on Russ Olsen's blog concerning the quality of technical documentation and what people should do to improve their own writing.

I liked it very much, there is deep truth in it. It might seem obvious, but once you really think about yourself in the role of a writer you will see many aspects apply to you. There is one aspect however that I would like to add, because I see it a lot where I work (which happens to be in Germany).

Write in the language of your readers, if you are able to do so, and only then!

We are a German company developing custom software in Java. People have understood that code documentation, Javadoc in this case, is something that can really make your life a lot easier. Unfortunately some people tend to think that each and every source code comment need be in English. This is of course total nonsense, because there is no point in it when all your colleagues are Germans like yourself and it is a closed source application.

The result of this is a lot of comments in clumsy English. A native English speaker would most certainly have a hard time understanding them, because they are often merely word-by-word translations of German sentences. Very often people without experience in English will also use the very popular "false friends".

Therefore I would really like people to think about the language to use, even before they start with the very first word of any documentation.

Tuesday, June 06, 2006

CVS History Size Limit

When I came to work this morning some colleagues complained about the CVS server not working properly. I tried myself and got a

Terminated with signal 25

error, no matter what I did. I could neither check out files nor commit modifications or new files.

Update: raghukumar.c _@_ seems to have got a slightly different message (CVS Terminated with fatal signal 25) which I include here to improve search engine hits.

I had a look at the server and could not find anything, neither in the logs nor the usual suspects like exceeded quotas, full partitions or permissions. I suspected some sort of automatic update by RedHat's up2date, but that was not the case, either.

It took me a while until the CVSROOT/history file' size in the repository in question caught my eye with a size of precisely 2GB. Searching the net did not give me any hints about a limitation of that file's size, but apparently it is there. I could easily resolve the issue though, because I saw that when setting up the server months ago I had accidentally forgotten to reduce the LogHistory setting in CVSROOT/config. It had tracked each and every checkout, local delete, merges, conflicts etc.

With a little help from grep I managed to reduce the file size from 2GB to about 50MB. I just ran the following on the server's shell after I had disabled the CVS access by stopping xinetd:

egrep -v "^[TMAR].*$" >
mv history history.full
mv history

I kept the original file just for sure. After restarting xinetd people could not check in files, because there were some stale locks left. So I had to do a

find /var/lock/cvs -iname #cvs.rfl* -exec rm {} \;

to get rid of those. After that all problems vanished.

I think I will still file a bug report, because even though we are very unlikely to hit the limit again considering the growth rate, but maybe someone depends on a finer logging. At least it should be documented.