2009-07-07

RHEL/CentOS bi-arch problems

Posted in Computers, Personal, PlanetDebian, rant at 10:57 CEST (+0200) by sven

Oh well, I think RHELs support for multiple architectures installed at the same time (and thus the same support in CentOS) really needs some rethinking.
While the following might not be able to happen with the default installation media (I didn’t verify), it still can happen if you run your own mirrors and actually need both architectures listed in your yum repositories…
Anyway, what happened today is just one example of how the multi-arch support caused problems for me:

On a Xen Dom0, I needed to apply a kernel upgrade (from 2.6.18-92something to 2.6.18-128something) and as a result, a reboot. At this point you should memorize that the old kernel worked quite fine and all I did was a yum update followed by a reboot. A procedure I did on quite a number of Dom0 machines in the past weeks.

Well, the reboot this time didn’t work, the kernel halted after printing:
request_module: runaway loop modprobe binfmt-464c

Well, reboot again, select old kernel, systems boots fine….

What happened was that both the x86_64 and i686 versions of the old kernel was installed, so yum update updated both, probably first the x86_64 version, then the i686 version (but I didn’t check). Well, while for the old kernel, grub booted the x86_64 kernel with the x86_64 initrd, for the new kernel it tried to boot the i686 kernel with the x86_64 initrd. (verified by unpacking the initrd and the vmlinuz kernel image and running file on the binaries therein)

Now the big question is: How could the stupid yum/rpm/postinstall script system end up doing this? It is supposed to warn about conflicts if two packages ship different versions of the same file AFAICT, but there is no way the i686 and x86_64 versions of /boot/vmlinuz* could be identical. So there should have been a warning about this. And after that, how come the mkinitrd tool doesn’t even try to check wether the kernel architecture and that of the initrd binaries match? It happily packed 64bit binaries and 64bit kernel modules(sic!) when run against a 32bit kernel….

OK, enough of my frustration….
I really wished I had to maintain not RHEL/CentOS machines but Debian (based distro) machines here at work. Unfortunately, that won’t happen for various reasons…

While the bi-arch support in RHEL/CentOS is helpful in many ways, RPM and the way bi-arch works on these distros caused almost as much trouble to me already as it helped avoid.

2009-06-22

Another link collection 2009-06-22

Posted in Computers, Personal, PlanetDebian at 08:45 CEST (+0200) by sven

I seem not to post anything but links lately, but anyway,

Eddy Petrișor has a post about transitioning from lilo to grub2 (considering usage of LVM).

Romain Beauxis writes about what he dislikes about git (or probably most distributes version control systems) when it comes to team-maintained packages, to which Martin F. Krafft responded with an interesting post that puts some aspects of distributed versioning into a more balanced perspective then Romain had. After all though, I agree that there are uses to DVCSs which make sense (like being able to commit while not having any sort of connection to the “central” repository). However, I still think that relatively small “projects” like maintaining Debian packages have more to gain from the central repository then from the ability to commit while not connected. That is, at least as long as upstream doesn’t use a DVCS already, in which case there are other benefits from using the same DVCS, like easily pulling in upstream changes.

David Welton posted about a small script that swaps virtual desktops (please note that you will need to enable javascript to actually see the script).

While not technologically new to me, this post by David Pashley about copying files with netcat was a nice summarization of how to do it (and why it is sometime preferable over scp or rsync, plain or over ssh). One of the comments refers to mbuffer, which might also prove useful if you need really high speeds (>200MByte/s) or want some more advanced buffering options. The pv tool (alias Pipe Viewer) might be of interest to meter the throughput.

Phil Hands writes about getting an USB stick to boot (certain) ISO images with the help of grub4dos.

2009-05-18

Link collection 2009/05/18

Posted in Computers, Personal, PlanetDebian, Uncategorized at 14:06 CEST (+0200) by sven

  • Marco d’Itri about adding support for yet-unknown-to-kernel-drivers devices. More specifically: how to make udev tell ftdi-sio that it should accept a certain VendorID/ProductID combination in addition to previously supported ones.
  • Thomer M. Gil about ICMPTX, a combination made from proxy and server that tunnels IP through ICMP. Nice thing if you need a connection from some NATed and heavily firewalled location I guess. (Thanks go to Runa Sandvik for finding this.)
  • Non-technical in a way, but still a nice link: Image of the Shuttle transiting the sun, thanks to Pablo Lorenzzoni for this link.
  • Another post by Marco d’Itri that explains how to install Debian on a SheevaPlug. Not that I need this info now, but it might come in handy some day.

That’s it for now, will update the post if I find more interesting links in the next few days.

2009-03-31

Link collection 2009/03

Posted in Computers, PlanetDebian, Random links at 14:22 CEST (+0200) by sven

Well, I normally despise of thinks like this link collection, but I thought I might add it anyway, since these are useful links for me and if I don’t post them here, I’m likely to forget where to find them in the near future:

  1. Sean Finney has a nice post about storing the list of parameters a (shell) script got in a way that it can be restored later. Quite handy if your script walks through the arguments parsing them (and consuming them while doing so) but you want to be able to display them in a helpful way if the parsing fails at some point.
  2. A while ago, Ingo Jürgensmann had a post that helps retrieving files from lost+found after a filesystem check, provided that you run his helper script on a regular basis. The same approach can also be used if you have a backup of all files, but lost the sorting work you did after the backup was done. This is possible because running the script can be done more often then you would normally do backups.
  3. He also has a small post about mtr oddities when IPv6 comes into play
  4. Adeodato Simó wrote about databases and when timestamps that store the timezone information really are more useful then timestamps that don’t.
  5. Adeodato also has a short post on using ssh as a socks proxy, which can be quite handy if you are behind a firewall.

Update: Fixed link to Ingo’s file retrieval from lost+found article. Thanks to Patrick Schoenfeld who pointed me at the wrong link.
Also thanks to the anonymous poster who found an alternative way to store and (in a way) restore commandline parameters. The solution doesn’t work in an as general way as that by Sean Finney et al., but it is much shorter and therefore interesting for where it can be used (when you control how commandline parameters are processed). See comments on this post for details.

2009-03-26

Apache SSL oddity

Posted in Computers, PlanetDebian at 16:07 CET (+0100) by sven

If you ever have the problem described below, you have to realize that Apache HTTPD is selecting the SSL certificate (and/or key) not based on you VirtualHost definition, but based on the ServerName in the current context. This means that you have two virtual hosts with the same ServerName, but on two different IPs, and are wondering why the wrong key (and/or certificate) is used, it might be because of this. Assume we have the following (simplified) configuration:


<VirtualHost a.b.c.d:443>
ServerName a.b.c.d
SSLCertificateFile /etc/ssl/certs/a.b.c.d_443.pem
SSLCertificateKeyFile /etc/ssl/certs/a.b.c.d_443-key.pem
</VirtualHost>
<VirtualHost a.b.c.d:444>
ServerName a.b.c.d
SSLCertificateFile /etc/ssl/certs/a.b.c.d_444.pem
SSLCertificateKeyFile /etc/ssl/certs/a.b.c.d_444-key.pem
</VirtualHost>

(note: This happened to me when wanting to open a SSL server for subversion on a host that also had Apache run as a reverse/application proxy for some specific application that managed its own CA)

Both VirtualHosts will use the very same certificate and key (as far as I was able to tell, but at least the same key), in my case that of the specific application (which was(is?), in its way, broken regarding SSL).

This might as well be a bug or a design decision (AKA feature), I don’t know. However the “workaround” that worked for us was to change one of the server names to something else (since it seems it is unused anyway, unless the apache decides to generate a self-refering URL, which it certainly won’t do for the reverse/application proxy part).

Update: Fixed formatting on configuration sample to make it clear this is not about namebased virtual hosts.

2009-03-01

Rescueing files from lost+found

Posted in Computers, PlanetDebian at 18:49 CET (+0100) by sven

Oh well, I tried to search for it but failed miserably, so I’m blogging about it hoping the original author might read my post on planet.debian.org (where I read the original post):

A friend of mine might need exactly the sort of scripts someone posted here:

  1. Creating a list of file checksum+pathname/filename
  2. Reading files from lost+found and moving them to their original filename by identifying from the list in (1)

However, I can’t recall who posted about this, and don’t want to do the same work again. Please, Dear Lazyweb, help me ;-)

2009-01-08

About Usability

Posted in Computers, PlanetDebian at 17:20 CET (+0100) by sven

Sami Haahtinen wrote a nice post about usability. I do mostly agree with him, except for one little thing:

A few years back, I noticed that I often started as a kind of “Joe User” with new applications, and often even stayed that way, often wishing that the UI of that application was simpler or at least made it more obvious which options are important and which I could most likely keep at their defaults.
Yet I am a system administrator and programmer/developer, so most people would probably consider me as an advanced user by default (wether that is correct in any given context or not, for example I still don’t really grok GIMP).
Also I did have quite a lot of contact with users that have very little experience, knowledge and interest in computers and software and only use them to achive certain goals.

Anyway, I’m quite sure most readers of this blog are aware that Linus Torvalds once complained about the Gnome printing dialog being simplified way too much. And at that time, I had to agree (note that I didn’t check out Gnome again since those days, at least 2 years ago).

What I really wonder (especially since I realized this in some of my own applications) is why it is so hard for developers to add some additional checkbox or button that enables/disables advanced options. For example, let’s take an applications printing dialog. By default, it would only allow the selection of a printer, orientation (if sensible) and (if the selected printer supports more than one) the paper size. Now advanced options might include duplex printing (automatic or manual), printing mutliple pages on a single sheet of paper, printing in grey on color printers,…

These options might be of use to anyone, but would most likely confuse beginners. So what I did in most of my little application was to just show the basic options and add an “advanced options” button which provided access to additional functionality which was not normally needed.

As for the issue with firefox updates mentioned by Sami: I don’t think it is a problem that firefox asks what to do with extensions. For one, it only lists extensions which are installed but claim not to support the new version of firefox. Second, practically everyone I know of who uses any extension can be considered to be an advanced user. And third: The dialog is pretty straightforward about what it is asking and when I once hit it while a (”dumb user”) friend was sitting with me, he understood what it was about quite easily (I didn’t explain the dialog, just what extensions were).

So my idea of a good UI is:
As simple as possible for beginning users, but allow advanced users to get to the details (”Details” or “Advanced options” buttons/checkboxes/dialogs).

2008-12-15

another vote

Posted in PlanetDebian at 13:00 CET (+0100) by sven

Well, following some other posts on Planet debian, I decided to also publish my vote on the GR regarding Firmware blobs in Debian. Here is my vote:
V: 7112113
In other words, I rank the first option as low as possible (7, below further discussion), ranked all options I think make sense above further discussion (which is at rank 3) and put all other options (except for the one empowering the release team to decide the issue) at the same, highest rank. The option empowering is ranked at the second level.

My priority really is to get Lenny released. While I think we should do as much as we can removing non-free stuff from Debian, I really don’t think it is sensible to delay Lenny because of this. Lenny has far less non-free bits in it than Etch, and I’m also not really sure wether I really want to consider firmware (which doesn’t run on the CPU Debian is for) as software in the sense of the DFSG. The reasoning here is that I don’t see any difference between a hardware manufacturer A who embeds a (non-free) firmware in the hardware (for example in the sense of storing it in a flashable memory) and a hardware manufacturer B who allows us to distribute the firmware blob (and avoids storing it in the hardware). In my opinion, both are equally (non-)free. And following this, I don’t see why we should support hardware created by A natively while not directly supporting hardware made by B.

One could of course argue that we are providing more of a service for B (as we are distributing the firmware for them, while they save some money otherwise spent for the flash memory), but I would like to remind everyone that our foundation documents also include the following:

“Our priorities are our users and free software”

This puts free software and our users at the same level. So to cater for one, we might have to make sacrifices on the other priority. In my opinion, the best compromise here is to not consider firmware blobs as software in the sense of the DFSG, but alternatively, I would accept saying we want to remove all such firmware from Debian, but not to delay Lenny because of this process. Additionally, we should make it easy for users to add all effected drivers/firmwares before/during installation of a system (or even include them on our installation media as some proposed, with a short question to the user wether he wants those firmware blobs to be installed).

Apart from my opinion on the subject itself, I must also mention my concerns about how this vote was written in a very manipulative way. Additionally, those wanting to get Lenny released were proposing too many different options. This is generally a bad idea.

2008-11-29

Re: Silly translations

Posted in Computers, PlanetDebian at 12:10 CET (+0100) by sven

In Silly translations, Gintautas Miliauskas wrote about some rather silly translations. This reminded me of a finding by a colleague a few days ago.
He had recently updated his Ubuntu installation to KDE4 (using a german locale). After this, he reassigned a hotkey (to CTRL-SPACE). However, KDE showed: STRG-Weltraum (ctrl-”outer space”) instead of STRG-Leertaste (ctrl-space key) :-)

UPDATE: Since Frederik (see comments) reminded me of the fact I already knew:
This silly translation is not the fault of the german KDE members, but a bug in the Ubuntu package, which is taking more or less random translations from Rosetta.

2008-10-08

How to solve a credit crisis …

Posted in Personal, PlanetDebian at 12:16 CEST (+0200) by sven

Anand Kumria wrote:

If IBM were to go bankrupt, would the government step in? Unlikely. Investors would lose (money), staff — another word for investors — would lose (jobs), but customers would win (their computers would keep working). Some customers would win more than others (especially those who had the equipment on lease); if no one is collecting, why pay?

I’m wondering here where Anand got the idea that once a company went bankrupt, that you don’t need to pay to that company anymore. When a company goes bankrupt, at least in Germany the following happens: A trustee/liquidator is selected. This liquidator is then collecting the information who owes money to the company and who still needs to get (how much) money from it. The liquidator also has to check the option of selling company assets (which might include the contracts of customers that still have to pay) to fulfill the debts of the bankrupt company. After he turned all assets into money, the money is distributed among those who still have to get money from the bankrupt company.

Anyway, regarding his main argument that the (average) customer of a company (bank in this case) should never have to pay for the failed speculations of that company, I somehow have to agree with him. Someone putting money into a regular bank account or papers with fixed interest rate should never lose his money. But there are also customers buying bank shares with a chance of higher revenue than with fixed interest rate papers. These should suffer from failure of the bank management, as they more or less explicitly wanted to be tied to the success (or failure) of the bank.

However, this is mostly irrelevant, since the failure of so many “investment banks” has side affects that might cost the average inhabitant of the affected countries even more than the discussed rescue plans. One of these effects is that the banks are now much more conservative regarding lease and mortgage plans, effectively leaving many home owners with no option to fulfill previous obligations (remaining debt after a previous mortgage expired can’t be refinanced by a new mortgage), causing them to have to sell their homes to pay the first mortgage. This is in some way stupid because this causes people who were perfectly paying their mortgage rates to loose their house, while the bank which would be giving them a new mortgage could get a new and good customer, improving their income. On the other hand, if the other side effects of the current crisis cause those “good” mortgage customers to loose their jobs, they might turn into bad customers who are unable to pay their rates. All in all, this is a spiral that could cause the whole economy to break down (a small example: The bank is not giving out mortgages, so no one will build new houses so the builders loose their jobs so they don’t pay their mortgage rates anymore,…. – over simplified, but still shows what I mean). Unless the spiral is terminated in time, before too drastic things happen.

All in all, I do understand why the politicians try to rescue those banks (or at least the customers of those banks), though I think that in an economy with slightly higher regulation, there wouldn’t be the need for such a rescue plan. I know there are some german banks affected by the crisis as well (among them Hypo Real Estate and others), but the average private customer of such banks shouldn’t loose money due to the regulations we have in place.

In general, there should be some security fund which makes sure that private customers never loose money put into regular bank accounts or fixed interest papers, vice-versa, banks should calculate mortgages so that they can be pretty sure their customers are actually able to pay off their rates – it doesn’t make sense if someone starts off having to pay 500$/month for their mortgage and has to pay over 1000$ a few years (as in 2-3 years) later, because the bank raised the interest that much. I have no problem with people loosing money from shares of banks or other companies directly or indirectly through investment funds.

« Previous entries Next Page » Next Page »