IT archaeology: Virtualizing RedHat Enterprise Linux 3 (Taroon) with VirtualBox in the year 2013

One of my customers is in a very unhappy situation: He bought a piece of proprietary software that runs on RedHat’s Enterprise Linux 3, and now the company he bought it from is no longer available. What’s worse, they’ve tied their software to a USB copy protection dongle that uses a homemade Linux kernel module that only works on Linux 2.4.

Add insult to injury: Their entire business depends on this piece of software. And now the server it’s running on is slowly falling apart, entire CPUs have burned due to failing fans, and there’s a proprietary RAID controller doing dangerous things to old and strange SCSI disks that have been unavailable on the market for several years already.

So they can’t upgrade their software, and they can’t upgrade their hardware either. They have to watch as the old hardware collapses bit by bit, until it destroys their business.

Tough luck, eh? They shouldn’t have worked with proprietary software, then this might not have happened. They could just upgrade all the way through to the 21st century and be done with it. But since they didn’t do that, now it’s too late for them to switch, so I thought I’d “just” virtualize that server.

Here are all the associated problems that needed to be solved:

  • The software runs only on RedHat Enterprise Linux 3, release 2003. That’s ten years ago, just in case you’re not counting.
  • The software depends on a hardware dongle that only works with certain versions of Linux 2.4. It doesn’t work on any 2.6 or 3.x kernels, so simply using a modern version of CentOS is out of the question.
  • Using RHEL 3 means you can’t really transfer the system to modern hardware, since RHEL 3 doesn’t even support SATA.
  • Even if you do manage to find some hardware with ATA disks, who’d want that, it would be almost as old as the server it’s replacing!

I ended up creating a blank virtual machine in VirtualBox, and using a live CD to do these special things:

Create an ext3 filesystem that RHEL 3 can mount. That means using only 128 byte inodes and getting rid of some special features:

mkfs.ext2 -j -I 128 -L / /dev/hda1

Notice the label “/”, which RedHat really likes to have. Then disable the features RHEL 3 can’t deal with:

debugfs -w /dev/hda1
 debugfs 1.40.8 (13-Mar-2008)
 debugfs:  features -ext_attr -resize_inode -dir_index +large_file +needs_recovery
 Filesystem features: has_journal filetype needs_recovery sparse_super large_file
 debugfs:  quit

Thanks, this article, for the hint. Notice the “hda” there? That’s right, you need to mount the thing as parallel ATA device, not SATA, not SCSI.

As next step, I SCP’d all the files from the physical server to the root of the new super-compatible virtual hard disk. Then I adapted /etc/fstab to point at the new hda1 (it used to point at sda1, the RAID device exported via SCSI on the hardware server).

Finally, I booted Super Grub 2 Disk, selected the legacy Grub 1 configuration from the hard drive, booted into the new virtual hard drive, adapted /boot/grub/grub.cfg and device.map to point at the new devices, ran grub-install. And so I had RHEL 3 running virtualized.

If you ever need to do data archaeology of this kind, maybe this article is useful for you. You could likely automate it all in a little shell script if you need to virtualize many old systems.

The final step is to install an up to date GNU/Linux distribution on brand new hardware for my customer, stick that virtual machine on and pass the USB copy protection dongle through to the guest system.

The GNU/Linux Gaming Chocoletters: Part 1

I’m sending out a little package to a developer that recently released their latest game for GNU/Linux in addition to other platforms. This is to show a little enthusiasm for game companies supporting GNU/Linux gaming.

I’m not sure how Stallman thinks about this, but I think that games are art (like music, books, etc.) and so do not necessarily need to be free software.

Of course it makes it a lot easier if we have the source and decent license to an older game. We can at least make it run on modern platforms if we have the original assets, as was the case with Quake 3 and other id games. But I don’t mind proprietary games for GNU/Linux, and I’ll continue buying them.

So, mystery company, watch your mailbox for sudden appearances of sweet edibles in the next few days.

Update: The first package is on its way!

image

Proxying from Apache HTTPS to some backend server that only speaks HTTP

Here’s a use case: You want to run an application server that only speaks HTTP, but securely, over HTTPS. The problem is that the application server won’t know that it’s being accessed via HTTPS, so any URLs and redirects it generates might point to HTTP. Here’s an example virtual host entry that takes care of that by rewriting the header.

You need Apache, mod_proxy and mod_headers.

<VirtualHost *:443>
  ServerName foo.bar.example.com

  SSLEngine on
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  Header edit Location "^http\:(.*)$" "https:$1"

  PassengerEnabled off
  ProxyPass / http://127.0.0.1:3000/
  ProxyPassReverse / http://127.0.0.1:3000/

  DocumentRoot /var/www/foo/bar
  <Directory /var/www/foo/bar>
    AllowOverride none
    Options -MultiViews
  </Directory>
</VirtualHost>

The magical line is the one with “Header edit…”. This makes sure any request your app server would have sent to HTTP are rewritten to HTTPS.

Konsonantenschwächung überall in der schweizerdeutschen Sprache

Schweizerdeutsch verwendet oft harte Konsonanten, wo in Deutschland weiche stehen.

Richtig hiesse es  “du bisch so tumm” oder “i bin tünn, du bisch tick” (“du bist so dumm”, “ich bin dünn”, “du bist dick”). Öfter höre ich in Zürich aber eine neue, verdeutschte Variante: “du bisch so dumm” und “i bin dünn”, usw.

Die Frage ist jetzt, ob das sich auch bei Wörtern ohne deutsche Entsprechung fortsetzen wird (z.B. trümmlig, totsch, tätscha) oder ob es bei den wenigen t/d-Verscheibungen bleibt, wo ein deutsches Wort D und ein schweizerdeutsches T verwendet.

Baseldytsch hat so eine Schwächung schon längst durchgemacht: doobel, drämmli, dyr, drotzdämm. Allerdings ist Baseldytsch wiederum niederalemannisch, während ich diese seltsame Erweichung nun auch im Hoch- und Höchstalemannischen beobachte, z.B. Züritüütsch.

Ähnliches schon in eurem Dialekt beobachtet? Hinweise aus der Bevölkerung werden gern entgegengenommen.

Steam advertising GNU/Linux support even to Windows and Mac OS X users

I noticed that even to Windows users, Steam seems to advertise that they are now available on GNU/Linux:

I thought that category is only visible when you’re logged in with the GNU/Linux client, but it seems to be there all the time. This, and Steam’s decision to build their own game consoles based on GNU/Linux, warms my heart.

Not all is perfect with the GNU/Linux client yet. I’ve been in the open beta since phase two, and dozens of users have reported dozens of things in the Steam community forums. But if Valve manage to solve half of the outstanding issues, Steam would already be one of the better non-free pieces of software for GNU/Linux.

I’ll make sure to play all the GNU/Linux games I’ve bought in the past few years through Steam, if they have a Steam activation code available, just to count towards the statistics. I’m guessing the number of “normal” GNU/Linux users might be dwarfed by the number of Steambox users when that thing rolls out, but still.

Happily, most of the Humble Indie Bundle games will appear in your Steam account if you activate them. My last non-Humble-Bundle GNU/Linux game purchase was Faster Than Light, by the way, it’s excellent and you can get it at a ridiculous price of $4.99 at the moment. It registers on Steam.

If you’re wondering why I tolerate non-free games while I don’t tolerate non-free (productivity) software and are preparing to call me a hypocrite, feel free! I always considered games to be in the same category as movies and music, not software, and I’ve always been happy to receive non-free material in that category.

Go, Steam!

The slow and painful act of ungoogling yourself

With Google’s questionable treatment of privacy, you might want to gain some distance from that company.

I’ve done that myself a couple of steps at a time, and now I’m at the point where only one or two unhappy circumstances keep me nailed to the crucifix of Google systems and services.

Here’s what worked well:

  • Replacing Google Reader with my own TinyTinyRSS instance.
  • Replacing Picasa with my own Gallery instance.

Here’s what didn’t work so well:

  • Finding a new mobile operating system. I’ll be trying out Firefox OS and Sailfish on the Galaxy Nexus as soon as both have images available. I’m tied to WhatsApp and I think Sailfish is more likely to get a WhatsApp port, so my money’s on that. But ZTE has recently announced that they’ll be making off-the-shelf phones running Firefox OS this year, and Samsung is reviving Tizen, so I’ll be looking at those as well.

    I don’t know how much cross-pollination there will be between TIzen and Sailfish (as they’re both based on a Meego fork), but if there is any, it could be important for the market.

  • Replacing Google Docs. There seems to be no direct competition for the realtime collaboration aspect, except if you’re content with very basic formatting and using PiratePad.

    I know no reasonably easy to maintain Free Software browser-based office suite I could install. For more structured text editing with less of a realtime requirement, an instance of DokuWiki will do just fine.

  • Finding a good search engine. Sure, there is DuckDuckGo, but even though I love that thing and all its features, the results sometimes lag behind Google’s.

    I remember one episode where I asked something about a recent bug in some piece of software on a developer IRC channel and was asked, “why didn’t you Google it? It’s the second result on Google!” Of course I’m not a stupid arsehole, I always research existing solutions before bothering people on IRC. But DuckDuckGo simply didn’t find any information about that issue, even days later. Google really did have it on the first page (not as the second result, due to the way the search bubble works, but on the first page anyhow).

    How could we let it get so far that only one single company can provide good search results anymore?

So for me, it’s mostly WhatsApp keeping me with Google’s products. I realize WhatsApp is its own privacy nightmare. The main reasons I use it is that I refuse to pay € 0.08 per 160 characters of text when sending text messages on my phone, and the fact that it does group communication and attachments, whereas SMS is stuck in 1989. What are the telcos thinking?

Telcos are working on rolling out a replacement for SMS, and I hope it will at least dethrone WhatsApp. Of course it would be even better if people just used networks of interconnected XMPP servers, but I don’t think the average user can be arsed to do that.

Yay, degoogling!

 

A fantastic time for co-op games

Yikes! For years and years, barely any cooperative games were released, but these last few months there was an explosion of titles:

There’s probably a dozen I forgot, but even with only these you have hundreds of hours of gameplay. Awesome! I prefer cooperative games to competitive ones in 99% of the cases.

The sad state of the e-book market, and how to fix that right now

If you’ve been following the e-book reader market, you’ll know that most big players (Kobo with the Kobo reader, Barnes & Noble with their Nook and Amazon with the Kindle) have released new readers recently. The major innovation here is a higher display resolution and a frontlighting system. This is great.

What’s not great is that all three major players also reduced interoperability by pushing their own proprietary formats some more. Kobo won’t even tell you directly what format their books are in, Barnes & Noble at least use the ePub format (but encumbered by Adobe’s crazy DRM that only works on Windows and Mac OS X, read here how to decrypt that), and Amazon use their own proprietary format.

This is no good. If you want to escape this horror that goes completely against consumer needs, you will have to look towards manufacturers like Onyx with the Onyx Boox. They make a reader that, like the Hanlin readers, supports a wide variety of formats: MobiPocket, ePub, PDF, plain text, RTF, Microsoft Word .doc — I can’t complain. Yes, the devices are more expensive than the ones sold by media companies and book publishers, but it’s only about €30 more, and that money goes towards buying you a lot more freedom.

Onyx are also releasing a frontlit model now, the Onyx Boox i62 AG (“Angel Glow”, how cheesy). So you could do it like I do: I sometimes buy the ePub copy of a book from an independent e-book store, but then download the .mobi version from somewhere else because I can’t be arsed to crack that fucked up Adobe DRM.

Not the best solution — surely DRM-free books are better — but this works for me. Also, I’m very happy with my old Boox M91. You can even install your own .ttf and OpenType fonts on the damn thing, something the big-name readers won’t allow. Also, the firmware is on GitHub. Not the most straightforward build process, but all the other reader manufacturers won’t even give you the source code. So kudos to Onyx on this one.

Still, as a consumer I feel like I’m constantly being fisted up the arse by each and every e-book publisher. You could argue that the best way to deal with this would be to simply download those books without paying, until the publishing industry becomes consumer-friendly.

As this is legal in Switzerland, there’s no stopping you if you’re Swiss, but it doesn’t feel like the right thing to do. It would be nicer if we could pay the publishers for a fair product instead. I wonder how many decades it will take for the industry to realize this.

Creating your own Steam Cloud (or how to reliably sync any two directories)

I was quite annoyed that the Steam Cloud seems to misread file timestamps some of the time, resulting in game saves being overwritten with older versions. And since Steam doesn’t offer a way to reliably find out which save is the most recent one, I needed something better.

The things I need:

  1. Connects over SSH, works with an SFTP/SSH server
  2. Transmits only file differences
  3. Reliably determines which copy of the pair is the newest
  4. Takes any required actions to make the older copy be identical to the newer one
  5. Works on GNU/Linux and Windows, since some games still aren’t available on Linux
  6. Should be able to save sets of pre-defined sources and targets so I can sync with one click or command

If you have similar needs, I might have a recommendation for you: Unison. Unison is not new, but directory synchronization (especially cross-platform) is not a trivial problem, and Unison has had a solution since 1998 and has only improved since then.

I have tried WinSCP’s synchronize mode on Windows, which worked quite well, but with Unison I now have a solution for Linux, Windows and Mac OS X (not that I’d touch that with a pole).

I didn’t actually need to do anything to get Unison to work. I have an SSH account on a server, and I just had to make sure that server has Unison installed as well (apt-get install unison-all on Debian GNU/Linux). Then I simply create one profile per game. A profile contains the source directory (where the savegames are stored on the local machine) and one target (the SSH server and subdirectory for that particular game).

With this set up, I can double-click a profile, it shows me the changes it needs to sync, and I just have to send them off with the “Go” button. Trivial!

So far, Unison has made no mistakes whereas Steam Cloud made two, twice assuming that the remote files were newer when in fact they were older. Maybe it’s a bug with Steam’s timezone conversion vs. DST? Anyhow, it feels nice to have my save game syncs under my own control, so if I fuck up the timezone, Unison will look at the file’s actual contents and do the right thing.

The hardest part now is to find out where each game saves its savegame files, but that’s something you can sort out with a search engine.