Well, I wonder if anyone's interested in hearing about my latest Linux adventures.
So, as I
posted in the entertainment systems thread yesterday, all media playback on my television, along with my multi-purpose server, were being driven for a number of years now by a fine little workhorse of a system. It had basically existed in this form since 2013, although it was built around the same hardware as a server I'd put together in 2009, so all in all it was fairly old.
Since the upgrade to 16.04, it has been causing me a certain measure of pain, as very briefly alluded to
here. And since I started living away five nights a week, it really decided to jack up the insubordination! We'd switch the TV input to HDMI and find only a black screen. I'd try to reboot to fix it but it'd stall and someone would have to hard-reset it. Attempting to mitigate this by uninstalling the proprietary NVIDIA driver only caused the resolution to drop to an unacceptable 640×480 (again, this was over HDMI

). And when it did work the interface was ridiculously unresponsive.
We all decided enough was enough, and I came up with a few options in my head. We could transfer the "frontend" responsibilities to a fairly powerful Raspberry Pi, and keep the server and recording backend on the same machine. It seemed like an okay solution, but it would have involved connecting the Pi to the SATA DVD drive, which would involve an adapter for any official Pis.
The other options were "replace the hardware", "replace the software" and "replace both". I eventually decided on "replace the hardware". My gut instinct was that bad RAM was at play here, which is something I'd had problems with before. I figured that getting RAM to go in a nine-year-old motherboard was going to be more trouble than it was worth, so I went to Maplin Electronics
to celebrate being made a mod and bought a new motherboard/CPU/RAM bundle off-the-shelf. Nothing too spectacular, but I figured it couldn't be worse than something so much older. The bundle came with 4 GB of RAM, which was the same as had been in the previous setup (and indeed was the maximum that the old motherboard could take). I decided to buy an 8 GB stick and add it to the mix, because why not?
I proceeded to set this all up. I had hoped to get rid of the NVIDIA graphics card, but the HDMI port on this new motherboard (which is being driven by an AMD APU) for some reason produces garbled output when driven by a Linux kernel. So I put the NVIDIA card back, but didn't bother installing the driver for the time being. Therefore, the TV side of things was not really useable (it was a work-in-progress!) but I did notice an interesting statistic about memory usage: 8 GB of 12 GB used. So the original problem wasn't bad RAM, it was just not enough RAM! But why did it only become a problem recently?

I suspect it maybe something to do with using the swap partition, and the fact that there's been a hell of a lot more disk I/O going on on that server since I started using it for backups. Still, it's not like those were going on constantly.
Anyway, the RAM thing, it seems, was only half the story. There were still cases of reboots stalling. I looked into the journal and found systemd complaining about circular dependencies. Seeminly upgrading to Ubuntu 16.04 had produced a very messed-up init configuration.

I could've gone through it and sorted it out manually, but I decided it was time to consider the other option: "replace the software". In the back of my mind, based on a
recommendation Inco made some time back, I had an idea to just do a clean install of CentOS and abandon Ubuntu. There was a huge partition going to waste on one of the hard drives, which I had intended to use for backups, but it never really worked out (something I need to look into again now I've solved the resource problem!).
But before doing extensive software maintenance, I had to finish moving something critical off that machine, so it could stay alive for the duration: my mail server. I'd been noodling away with running that on Debian via
Linux Deploy on my Samsung Galaxy S II. Basically it was able to run every component, except for the ClamAV dæmon, which handles checking mails for viruses. For some reason starting that particular piece of software caused the entire phone to reboot within thirty seconds. I have no idea why it's so resource-hungry. At any rate, I deemed it non-critical, but still allowed the project to languish somewhat.
However, I decided to give it one big final push at the start of my long weekend. It took sorting out a few silly problems with permissions and groups, but fairly soon I had a working mail server running on a little smartphone! I finished up the migration fairly quickly. So now my mails aren't filtered for viruses anymore. But I should be able to spot them myself.

Also I might look into running the dæmon on a different machine and splicing it into the delivery system when available.
With that out of the way, I was able to shut down the main Ubuntu-based server and breathe a sigh of relief.

But before I did that I torrented and burned a CentOS 7 image so I'd be ready to get going with installing it. In the heel of the hunt I installed it twice. The first time I noticed whole-disk encryption was a thing and decided to enable it for the hell of it, but then I realized that typing a passphrase at every reboot is not the route I want to go down.

Even without that, the security policies are much more stringent than they are on Ubuntu, with SELinux and firewalld, which I never dealt with before. These two things made getting all my services back up and running a little more difficult, but I still had the whole lot done within 24 hours. (Bonus points for having most of it going on during April Fools' Day!) I had done a full MySQL dump before shutting down the Ubuntu system, so I was able to reimport the databases for MythTV and Wordpress with ease, and get those services running again. And as a bonus, CentOS doesn't need the proprietary NVIDIA driver to realize that HDMI output should be driven with a HD resolution!
On Monday I proceeded to relax and use my newly-working "entertainment system" to watch some more Scooby-Doo: Mystery Incorporated. I also copied all the DVDs onto my laptop's hard drive, expecting to be able to watch them while out of town.
Except it turns out that RCE region-protected DVDs, which the later discs in the series apparently are, do need to be decrypted using something involving the physical disc. So I figured it was time to learn to rip DVDs properly. I thought to myself that I could compile and install HandBrake on my Linux from Scratch system at the weekend, and go from there. Still, the waiting sucked. But then on Tuesday night I realized that I didn't need to wait. The disc I wanted to watch was already in the server. The server that was no longer underpowered and to which I had easy SSH access.
So I looked into installing HandBrake on CentOS. Turns out there are no pre-built RPMs (only DEBs) so I needed to compile it myself anyway. This would've been fine and dandy, except that the SSH connection kept dropping, thereby interrupting and killing the build. Eventually (by now it was Wednesday!) I decided to install
Screen, and use it to detach from the build so it could run in the background without depending on the SSH session. It took ages to figure out how to "yum install" all the development files it was looking for but eventually it was done.
I proceeded to launch HandBrake on an SSH session with X forwarding. The graphical interface was quite responsive, even over SSH, and it was very easy to get it to start ripping the entire disc. It all seemed to be going well for about an hour, but then, again, the connection dropped, stopping the encode and leaving me with a useless incomplete M4V file!

So I figured out how to export the queue from the graphical version of HandBrake, and then used the command-line version, via Screen, to execute the queue. I detached and went to bed.
Tonight I found, sure enough, the rip had completed! Because I was lazy I had got it to rip all the episodes into one file. At first I tried mounting the folder via SSHFS and just loading up this big file in VLC, streaming it, but the connection wasn't good enough for that. And my data plan is good, but probably not good enough for me to pull in that entire file!

So I went back and chopped out just the episode I wanted, then copied it via SSH to my laptop and watched it!
Incidentally it was the one in which Velma complained about Shaggy ("I mean, some idiot") clicking on a stupid banner ad on her PC and turning it into "botnet central". Suitably technical for all the hacking that had been done just to get it onto my screen!
EDIT:
http://www.phoronix.com/scan.php?page=n ... ping-Unity
…
On the
fifth of April. Not the first. Wow.
