Thursday, 16 August 2012

How to fuck up an operating system?

So I realised even the non-gnome image of Angstrom was still using systemd. The only reason seems to be that 'all the other distributions are using it'. Fuck off.

Well, I saw sysvinit was still there and installed that. But I noticed systemd was still being used as the preferred 'alternative' (sigh, another linux-invented fuckup of a system that is too). I fixed that to point to the proper init, but lo and behold, I had a broken system. Ahh, so that's why my narcisuss image didn't boot ... the offered option of init was merely an illusion.

The problem is that although the init scripts are there - they're mostly fucked up, and a huge chunk of shit is simply missing. Almost all of rcS is just not there.

So I see what's happened here - the systemd guys pretended to work on 'migrating' init scripts to systemd because they couldn't go the whole hog. You see, lower risk and all that. But what they were really doing is systematically vandalising the existing scripts - ones that worked and didn't need to be changed in years - so that they could never be used again for going back to the normal init. And when someone asks about init, they can claim the high moral ground by stating they did the work, and now "well it's up to you if you want to maintain the scripts" - and who is going to bother with that hassle? Of course, if they hadn't gone through and intentionally fucked them all up they wouldn't need any bloody maintenance to start with.

One should probably not attribute something to malice when incompetence would suffice, but it's hard to see this any other way.


Anyway, I managed to get some sort of fucked up version of a boot working. I added a couple of things to rcS:

mount -o remount,rw /
mkdir /dev/pts
mount -n /dev/pts
I also commented out the source of 'functions' from /etc/init.d/crond (they are provided by busybox).

That mostly works, although the network isn't activated properly - it starts but DNS isn't setup properly (i can ssh in, but emacs does some lookup at startup). A stop/start of the network fixes that, and with uptimes of weeks I think I can cope with that. It wont shutdown either, but what use is a filesystem it if can't handle the power going off or a reset button (There's also log rolling and other cron shit which has also been broken, but at this point I just don't care).


What the fuck is this shit? According to the package description it's a HTML5 terminal emulator. Why is that even installed on an embedded computer, and why is it automatically started and chewing up resources for no good reason?

Totally bizarre.


I have a feeling my sluggish-as-fuck emacs had more to do with whatever the hell 'gateone' is than systemd or anything else - but I can't be certain, nor do I particularly care for the specifics (possibly both - they were always both at the top of the process table, low cpu usage, but always running). I got rid of both and my problems also not-so-magically disappeared (hah ... funny that).

So with all that done, the whole system and emacs in particular is actually usable from a remote ssh login (but not emacs over X, because the gtk guys in their infinite wisdom decided client-side text rendering is the way to go - which pretty much killed the usefulness of remote X in one swooping fowl a few years ago).

So no more random pauses of up to half a second just because the system decided I was getting too much done.

And it even boots faster! Even if it's only because almost nothing is started apart from networking, getty, and sshd - but funny, that's all I thought it was starting anyway.

And so, the answer to the question in the title is obvious: let someone who hates the entire design and philosophy of the operating system replace it's core components, one at a time.


Koen Kooi said...

Systemd has nothing to do with the initscripts being broken. None of the initscripts were changed, so you're seeing the pure undiluted shitpile of custom 'embedded' sysv script from the yocto project.
The switch to systemd was mainly to get away from having a custom fucked-up sysv script for every package in the base OS.
Systemd sure isn't perfect, but it allows the angstrom people to use systemd units from the upstream projects and not maintain a mountain of fugly busybox compatible shell-scripts.
AS to why systemd and not upstream, openrc or init-ng: I couldn't get upstart and openrc to work within a day, systemd only took a few hours and patches I send to fix bugs are usually reviewed and applied within a day.
In retrospect the timed gained from not using and supporting shitty sysv scripts is spent arguing with the pulseaudio haters.

NotZed said...

Is that reference to 'pulseaudio haters' supposed to be an insult? Funny, you're the one who chose to come to some random blog and argue your point with a stranger, on his own blog. Maybe you just like wasting your time - as you've just done it again.

Because it seems the rest of your comment just confirms my post: after systemd was made to work, only systemd will work.

Swift Griggs said...

To the commenter who whined about Pulseaudio haters. Hey, now that you mention it, Pulseaudio sucks too. Esound solved that (software mixing) problem _many_ years ago and is kind enough to have an option to NOT camp on the damn sound device when it's not using it. The missing features in Pulseaudio are:

* Audio Skipping

* Dependency on other things that suck.

* Unreal CPU usuage

* Horrible Latency

* Snap, Crackle, pop.

If folks are trying to defend systemd and other garbage on "having to write tons of init scripts" my response is "give me a fscking break." You can write in a bunch of other scripting and it's-not-C languages and you can't write shell script? One for everything installed on the system? No. Try one for the crap that needs to start/stop which should be a relatively small list. If you ripped out sysVinit that's been working for 40 years to replace it with systemd for that lame excuse then you need to switch to Windows or some other desktop OS with your same lack of understanding of fundamental Unix philosophy. There's a wiki page for it. I suggest you start reading or jump ship to a less enlightened platform.