Sunday, May 25, 2014

Sunday: Fuck fuckery

Somehow last night, the master boot record for the hard drive that controlled The One Ring Computer that runs my life became corrupted.  And the system crashed.  Casting me into the outer darkness.

Upon discovering this fact, I sojourned to that black rotten tower that exists there, to obtain the supplies necessary to rebuild my kingdom of automated perfection.

Yes.  I went to Best Buy, and actually bought something there.

Specifically, a 500GB hard disk, the SATA cable that should be in the fucking box, but isn't in the fucking box so they can sell you a motherfucking $11 SATA cable, because you're buying it at Best Buy, so clearly you have no other options.  And a USB stick.

Reinstalled the system, and almost everything that runs on it is now back up.  I was able to get the bad disk to mount and read, so I was able to salvage almost everything.  The status report:


  • Wifi.  Since this serves as the wifi router for my apartment (using hostapd), this was the most essential service to turn back on.  Sitting on the floor with the keyboard and mouse that came with my PS2 Linux Kit reading the TV isn't the best way to configure things.
  • CVS.  All of my papers, configuration, code, random bits of things I need to keep "safe" are all kept in CVS.  This was probably the next most important thing, but with the disk readable, it's basically just an rsync to fix.
  • Email.  I concentrate my email here, because logging into to a computer you don't own is a bad way to read email.
  • RSS.  This was a challenge.  The old database files are incompatible with the new version of tt-rss.  The solution here was to shutdown the database server, repoint it to look at the old files, mysqldump the database to text, shutdown again, point back at the compatible files, and then manually re-enter all my feeds by perl scraping them out of the dump file.  Clunky, and now I have to mark as read something like 20k RSS entries, only ~500ish maybe are new things.
  • Network storage.  Since giant desktop disks are easier to work with, this is where all my storage lives.  NFS farms it out to the wifi cluster, and using the magic app on my phone, it syncs its data back there too.  This was easy, as it's just writing /etc/export and symlinking things into the correct locations.
  • Home directory.  Just another rsync.
  • DVR.  I'm not even going to bother trying to get this running tonight.  I think it will be as easy as ingesting the database dump, and then installing mythtv.  I have the /etc configuration stuff too, so it's just a matter of getting it set up the same way.
  • DVR part 2.  This is technically an X11/gdm issue, as I need to have the display server know that when it starts up, if no one logs on within fifteen seconds, that it should launch a session for the mythtv user, and autostart the front end.
  • Consistent, indestructible backup system.  Based on this collapse, it's clear I need to automate backups.  The list being:
    • rsync /etc to storage disk.
    • rsync /home dir to storage disk
    • rsync /home/cvs to storage disk
    • mysqldump ttrss to storage
    • mysqldump mythconverg to storage
    • rsync storage disk to backup storage disk
    • rsync backup directory to USB attached storage.
    • This is where an rsync to a remote drive would live, but as raspberry pis have issues with USB, I'm a bit hesitant to use that to run the remote system.  I should think about this more.

No comments:

Post a Comment