Fixing things that tend to show their age

So, here's a frigging rant. And a bit of wishful thinking. My current existence in technology world is pretty much relegated to plugging holes, and hoping problems don't crop up elsewhere. I am optimistic, however: it's always weird that despite of my experience in the field, I always have new things to learn!

Mount a tape, hit a button: The Woe that is Backups

October 14th and 15th: Backups. Shitton of backups.

I'm not good at this, and I'm sorry.

I apparently did the previous full backup of my Debian desktop wayyyy back in 2011.

Admittedly, that was a big change for better at the time. Before that, I had no backups whatsoever, aside of automated database dumps and whatnot that are made on the same disk. For offline backups, all I basically had was my old hard drives, and it's been years since I bought new ones. In summer 2011, I purchased a 1 TB USB hard drive for making backups. Quite sufficient, because my desktop computer has a hard drive of measly 250 megs.

And the funny thing is, even when I did make backups in 2011, I didn't actually save the backup scripts I used to make them. Aaag!

So yeah, it was a step for better, but since I didn't exactly live up to those ideals, it's time to get a frigging grip and get this shit a-rollin.

So my current plan is to make a tar backup of the entire system at set period of time, then use rsync to make incremental backups of /home meawhile, because that is most frequently updated place anyway.

Whooo – tar backup. ”tar” stands for ”tape archive”, you know. Highly, highly traditional Unix shit. In stone age, you had ”tape drives”. Not flimsy cassette tape shit that was sold to consumers, but big frigging fridge-sized tape drives and wiiiiide magnetic tapes in huge spools. If you think of an old computer, you practically have to think of rows of tape drives with tape drives spinning wildy. Because that tells you that the computer is doing something.

...of course, these days tar isn't used for tapes much. Or backups. It's usually used kind of like how .zip files are used on Windows. The reason Linux-land uses tar is that it preserves the filesystem attributes, so a file that goes in the archive is the same thing that comes out of the archive. Simple enough. Unlike Windows, the files on Unix-like operating systems are just are files. All I need to restore the backup is to uncompress the tar file, create mountpoints (that is to say, empty directories) for certain paths that are managed by the operating system kernel automatically, re-install the bootloader and check if paths still work.

Uncompress the tar file? Oh yeah, tar doesn't offer compression on its own. I actually compressed the backup with an utility called gzip, which means that the backup took frigging 10 hours, because my computer is kind of slow and stuff.

The another piece of backup I do is to make a copy of my work files (that is, the entire home directory) with rsync. The cool part of this is that I can make fast periodic backups of this data because, as the name of the tool suggest, it's supposed to be synchronisation.

I had previously erred, but I have a plan now. Honest.

It's kind of like how I did with the Avarthrel website previously. When I set Avarthrel Drupal site up, I felt I was learning about things, but there was a general feeling of ”I think I messed something up, I'd better leave it as it is”. Now that I've done some work on beastwithin.org, I feel like I've actually gotten something done properly and I've learnt a lot about how Drupal actually works, so there's no excuse to ”leave things as they were”.

I just lacked skill previously.

I've learnt from my mistakes.

I can fix this shit.

Wish I was running DD-WRT: The router anomaly

Fortunately, the flaw in question doesn't seem to be exploitable from the WAN side (because the designers obviously showed some signs of sanity and didn't let that sort of stupidity happen), and also doesn't seem to work on my particular firmware version because I couldn't replicate it following the steps. The problem could still be lurking there in the new firmware version, just in different form (the ”password” string changed a bit).

But still, dammit, it would be frigging nice to have a new router.

The DI-524 has Linux-based firmware, but it's a custom one and not exactly supported these days (last update done in 2007). It'd be nice to have a router that actually supports a community-supported firmware, like DD-WRT. A real brand-name distribution, instead of some random hacks D-Link cooked up one beautiful day.

It's just that most of the routers that have all the features I want are around 30€ and don't come with DD-WRT, and if I want DD-WRT, I need to pay something to the tune of 80€-100€ or for extra features I don't immediately need. A lot of routers that do DD-WRT that I could find for sale right now seem to all come with ADSL modems, for example. I already have a router that does that for external net access. They do come with features that would be absolutely nice to have, like DLNA and support for external USB drives that would show up as NAS drives, which would be fantastic because fully integrated NAS drives are fucking expensive and probably don't come with the configurability at all. Just get one of these routers, stick one of those terabyte USB hard drives in, and bam...

Desktop: Things that kind of work, and things that kind of don't

I don't like switching desktop environments. Maybe some people do, but I want to have constant level of productivity without hassling myself with all sorts of weird-ass configuration changes.

Probably the desktop environment I was most productive in was GNOME 2. GNOME 3 rolled in and basically added requirement of 3D acceleration and had the somewhat broken first version of GNOME Shell.

I've heard GNOME 3 is somewhat usable these days and the first kinks have been ironed out and major horrible bugs have been fixed. Unfortunately, currently in Debian Unstable, GNOME 3 is unusable for reasons I can't quite comprehend. I can't actually even log in. The gnome-control-center doesn't show me any configuration applets so I can't even customise the applications. The worst part of this all is that I have no idea what brought that on. Is it my obsolete GNOME 3 configuration files? I get the idea that GNOME these days is turning extremely hostile toward power users, and by ”power users” I mean ”the people who have to figure out why mommy's computer no longer works”. (Just enable proper error reporting, guys. Windows doesn't tell you what's messing it up, and people hate fixing it. OS X usually does, and people love fixing it.)

(Why not go for KDE, you may ask? In GNOME, even when I'm not using the desktop components, I love the applications. Exact same thing with KDE. On GTK+ side, I love Firefox, Emacs, LibreOffice, GIMP, Inkscape, MyPaint and Shotwell. On Qt side, I love Psi and VLC and K3B.)

So, for time being, I had to stick to LXDE, because it actually worked.

I originally stuck with LXDE because it's very lightweight and my desktop computer only had 512M of RAM; in fact, I had to ditch GNOME 3 because it ran like a slug on 512M.

Now the computer has much more comfortable 1.5 gigabytes of RAM and... well, LXDE is still viable, isn't it? No reason to change, and I just use the additional bunch of memory for something productive, like application or something.

So why did I switch from LXDE?

Simply put, LXDE uses PCManFM as its file manager.

PCManFM is unfortunately quite buggy, up to the point it was interfering with my productivity.

Shotwell, as far as I can tell, is absolutely the best digital photo library app for Linux, and there's two ways of getting photos out of it: drag and drop the image to desktop or file manager folder to make a copy, or copy the file on command line, which requires guessing and squinting for the file name and all that command line guff. Now, Shotwell is a GNOME application and PCManFM just couldn't handle something as simple as drag and drop between two desktop environments that have long ago standardised this stuff – I could drag a file out of Shotwell, but as PCManFM wasn't on receptive mood, that effectively froze X11 entirely until the drag was completed, which obviously never was. Hence, the only way to proceed would be to flip to virtual terminal, log in, kill Shotwell (and thus make X11 realise the drag-and-drop operation was aborted), and flip back. Royal pain in the neck.

Luckily LXDE offers options, and I wanted to use GNOME's Nautilus, but unfortunately that brings in more GNOME components that clash with LXDE's components. XFCE uses a nifty small file manager called Thunar, which actually doesn't draw desktop on its own and needs XFCE's desktop component for that.

(And the annoying thing is, most of the apps actually want Nautilus in one form or another, though not outright require it. Dropbox works wonderfully on its own on the background, for example, but only visibly integrates with Nautilus.)

Mastering the Boot Sequence: A Dance for System Administrators

I upgraded the Linux kernel to 3.11. And upgraded some system components.

Unfortunately, those system components failed to bring the system up.

This had nothing to do with the kernel upgrade – somehow, a fairly critical piece of system failed to load during boot. It just stopped loading the services and thought that the system was ready to run. The machine was basically stuck at the end of the boot process where it just couldn't load any more stuff from the boot-time copy of minimal operating system (which we in the trade call ”initial RAMdisk” or initrd).

So every time I rebooted, I had to manually bring my disks up (replacing the boot-time minimal copy of OS), bring the system to maintenance mode, then immediately bring the system to multi-user graphical mode (which loaded the relevant services).

That's just 5 extra commands I have to type during boot, but it sucks. And it would suck even further if I didn't know what I was doing.

So what's the ultimate cause of this problem? (Well, the actual cause of the problem is that sysvinit-compatible version of udev isn't included in initrd, but that's just tech-gobbledygook for the immediate cause. I want something broader.)

The real reason is the Linux boot sequence is arcane.

Debian's boot sequence is based on sysvinit. Every Unix-like system has a program called init which handles the crucial parts of initialisation, background service management and termination.

Debian is likely moving away from sysvinit, which it has used since time immemorial.

Ooh, reminiscing time. The first Linux distribution I got was Slackware. When Slackware went boom once, I also used Debian briefly on my dad's old PC, but when I got my own PC (we'll get to that in next section), I initially installed Slackware because I remember thinking the sysvinit shit was incomprehensible.

Spoiler: I never changed my opinion since. It's still basically incomprehensible and I'm glad Debian automates every last bit of it so I don't have to.

So, October 21st – I switched from sysvinit to optional alternative initialisation system, systemd. And lo and behold, the system actually brings itself up without my intervetions!

I think I will stick with systemd, but I find it weird how it changes yet another thing about my system... oh, I need to ramble about that next.

Wishes for an upgrade: Where I see myself in 4 years

According to my diary, I installed Debian GNU/Linux on my first very own PC (an Osborne Pro Pentium 166MHz) in February 14th, 1997.

I had actually gotten the computer some while before, but, like I said, I first installed Slackware on it.

But February 14th, 1997 is an important day.

I installed operating system on my desktop PC that day.

This PC.

Oh, it's the same frigging PC! I've only changed motherboard/processor/chassis/all that guff 2 times and switched hard drives goodness knows how many times.

Same frigging operating system install, though.

And I've survived one really, really gruesome and risky step – switching from libc5 to libc6. Upgrading stuff to the new era of computing, there. And a few days ago, I did another pretty crucial optional and reversible switch – sysvinit to systemd. Over my soon two decades of using Linux, I've come to depend on so many things, yet I'll never be surprised when old shit that was hastily cobbled together gets replaced with new, amazing stuff. I'm typing this in Linux and it suddenly struck me that we have fucking antialiased TrueType fonts, woo. Didn't have that shit in 1997! We had Type 1! And pixels!

And here's the thing: I don't think I'll be reinstalling the system any time soon. I can keep doing these awesome migrations.

The only conceivable reason I should reinstall would be due to fact that Debian isn't likely going to offer any way to switch from i386 to amd64, at least not yet. The current Debian system lets you install both 32-bit and 64-bit libraries so that i386 applications run on amd64, but there isn't yet any support for installing both 32-bit and 64-bit applications, or especially kernel. As things stand, you'll need to reinstall the whole operating system if you want a 64-bit operating system.

Of course, nothing stops me from buying a 64-bit processor and running the 32-bit operating system on it.

But I've decided now that I won't be reinstalling the operating system before February 14th, 2017. And with some luck, I might not even need to if Debian, for some obscure reason, offers a migration for that.

I'll just need to switch somehow to 64-bit Linux eventually though. Absolute deadline is probably February 14th, 2037, because as far as 32-bit Linux is concerned, there won't be February 14th, 2038. =)