Good Morning from my Robotics Lab! This is Shadow_8472, and today, I tried adding a Git server to my Bitwarden server, and blew most of my time on a detour. Let’s get started!
Git
Git is an open source version control platform, not to be confused with GitHub, a website and hosting service implementing the software. Git is sort of like an Undo/Redo history, but you can switch off old changes and put the new ones on. It will be very useful –if not project saving– while building my social robot. The only problem is that I need to learn how to use it from a developer’s point of view.
I want to install a Git server. My target is my Raspberry Pi 3B+ hostname: BlinkyPie operating system: Raspberry OS lite. It’s already running my Bitwarden server to host passwords, and has plenty of space on its SD card for starting out and ample room in its CPU cycles.
Failed installation
As always, the first step in installing any piece of software in Debian family Linux distributions (distros) is to update repository information. sudo apt-get update The log put up a warning about the locale. I didn’t think much of it until Git didn’t install.
Logs are not always the easiest things to understand. They’re also not the easiest for search engines to decode when nobody has made attended to the exact wording. Even now, I have no idea what’s going wrong. What I do know is that when I tried messing with the locale configuration settings under raspi-config, the whole system would stop responding to any command I sent remotely logged in over SSH other than exit (ending the session). Further attempts to connect would fail until I rebooted from the physical switch and I would repeat the cycle.
System Failure and Backup
Things got really messed up to the point where I started worrying if I’d ever get my passwords back. I mentally went into recovery mode, trying to salvage what I could. I started by using dd to Duplicate the Disk onto the NAS so I could restore it if I messed it up worse. I also observed that my Bitwarden plugin has a limited-time retention of my password vault in case it can’t reach its host server. My vault was soon exported, where it would be safe in case of a total system wipe and reset.
With the only irreplaceable nugget safely tucked away, I unsuccessfully turned my attention to extracting the Docker image hosting Bitwarden, and settling for the contents of the home directory. This whole time, I was also researching what operating system I was going to replace Raspberry OS with. I seriously looked at Arch, Manjaro, and Apache, though that’s not something I can just do in a single day and expect satisfactory results: I gave repairing what I had one more chance.
Net Work: Nothing
After sifting through the tons of free tools for checking SD card integrity, I landed on linux.goeszen.com/how-to-test-an-sd-card-on-ubuntu. It tells of a tool that “comes with most debian based *nix systems” called dosfsck (also present on Manjaro). I told it to repair the SD card and test for bad clusters. It found a “dirty bit.” I won’t pretend to understand, but it appears to involve the computer’s CPU tracking modified data in RAM.
There was another error it found and repaired I wasn’t able to understand myself, but when I booted it back up, everything was back to the way it was before. The next step is to make another image and do some research before hacking another OS in there.
Takeaway
In retrospect, I probably should have checked if GoldenOakLibry, my Network Attached Storage (NAS) unit, can do Git easily. I’ll probably need more than the 64 GB of storage in the server’s card. Besides, I’m asking for trouble if I don’t at least schedule regular backups for something as important as passwords, even if I weren’t thinking in terms of potentially faulty SD card.
Final Question
On a scale of annoyed to paralyzed, if you had to roll a many sided die and yank that hard drive as if it were now destroyed, how much pain would you be in?