Raspberry Pi 400: Another Chance

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am re-evaluating my Raspberry Pi 400 unit I covered last week. Let’s get started!

The Story So Far…

Raspberry Pi 400, is the Pi 4 rearranged and built into a Raspberry Pi keyboard unit, available with multiple standard keyboard units from around the world… but not quite. I already knew about some changes they made to the CPU, but in theory, that shouldn’t have affected the 400’s wireless abilities like I was observing on my 64 bit installations: LibreELEC and ManjaroARM.

But a sample size of 3 (32 bit Raspian images work properly) is too small to claim manufacturer defect. If I was going to pay for warranty shipping, I wanted to see the failure on their own software. That is why I went looking for the elusive Raspberry OS 64 bit. I kept finding the 32 bit version, and had to call it quits last week.

Installation and Testing

But this week, I tried an official card imager with a list of 1st and 3rd party images to install; none were 64 bit Raspberry OS. There’s plenty of stuff out there about Raspberry OS 64, but the download link is well hidden from people who won’t understand what beta software is all about. In the end, I located the correct image, and between downloading, flashing, and testing, it took half an hour of low engagement.

Finally, I booted the Pi 400 using that chip, and it worked unexpectedly. I went ahead with the setup ritual — telling it the country, time zone, passwords, and the like. Options for making Wi-Fi connections came up before I even got around to asking it how many bits it was running on (see last week’s post): 64.

Further Testing

I honestly was expecting to cover the Pi 400’s exchange before this point. I just so happened to have updated my Manjaro card in an attempt to fix a problem keeping us from streaming my church’s Christmas program on Sabbath (turns out https was complaining about system time being set manually, and a couple months behind at that). The freshly updated card worked as well.

At this point, I was convinced it was just a matter of software. I booted into LibreELEC, which amusingly requires inserting the card part way through booting, and ran into the same problem as before. I even tried with an Ethernet cord we used to download the service, and saw no evidence of the clock updating.

Conclusion

The Raspberry Pi 400 is a relatively new product. With a better idea on where to look, I landed on this LibreELEC forum post. It states that the Pi 400 has a “somewhat different [Wi-Fi/Bluetooth] chip,” but by manually updating the kernal somehow, it is possible to hack something together. Honestly, I have other projects I’d rather do, and according to the same post, they’re already planning on supporting the Pi 400 in the next major release. I can wait.

Final Question

Have you ever looked at something as you were about to replace it just to poke at it a bit, only to find there was nothing wrong with it in the first place?

Raspberry Pi 400: First Impressions

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am covering the new Raspberry Pi 400 I have. Let’s get started!

The Raspberry Pi 400 is the latest in the Raspberry Pi lineup. Contrary to all its brethren, there will be no aftermarket case for this small computer: the PCB (Printed Circuit Board) has been redesigned to fit inside an official Raspberry Pi keyboard. The specs are comparable to the Pi 4 model B, but with a heat sink built in under the keyboard and a newer CPU with hardware bugfixes, the Pi 400 comes already running a little faster than its Pi 4 siblings.

Unboxing

I made my own Pi 400 kit because I needed some extra peripherals for my other Pi’s, like an extra, longer HDMI to mini HDMI, and a USB C type power switch. I already have a number of SD cards running around, so I don’t need one included.

As I opened the box, I noticed only three USB ports, two blue and one black. I was otherwise using it for a keyboard, so it works out. Still, universal recievers are a thing, and in such a case, a user would be down a port relative to normal operation. Everything else from the sides appears to now be on the back. Note, I am not intimately familiar with the GIPO pins, but there is a bank of them present.

I am, however, familiar with the camera port normally found in the middle of the board, and no such port is apparent anywhere on the case. This is most likely because it’s being marketed more as a desktop on the go, though the educational/experimental reasons for owning one are still present.

LibreELEC

One of the immediate reasons we got the Pi 400 was so we could have our entertainment system with a keyboard. (For those keeping record, the HDMI by the USB C power port is the HDMI LibreELEC wants.) Eventually, I want to rig an IR sensor to respond to a TV remote and I can pull the Pi 400 in favor of a regular Pi 4.

But the problems start here. It’s a small complaint, but the time isn’t quite right. No matter where I look, there’s no place to set the time manually. It wants an Internet connection, and when I looked into it, it was if the operating system –which was fine on a regular Pi 4– didn’t see the Wi-Fi circuitry.

Debugging

I’m disappointed I have to write this section, but I put my Manjaro card in for easier terminal access, and it doesn’t show up no matter how many commands I try under advisement. With such a new computer on the market, the first help forum topics are still being written.

What is still beyond me is that when I put my Raspian SD in, the thing worked normally. I was able to go online and perform a search. I even pulled up content from SpaceX’s latest fireball, SN 8, fresh that day. The circuitry works, but 2/3 cards say it’s not there.

I’m afraid I was unable to carry on diagnostics past this point. The two cards that didn’t see the wireless were 64 bit, and my Raspian card is 32. I had an image of the lost card (supposedly 64 bit Raspberry OS), so I tried burning it to my last clean micro SD. It took a while to flash, but the Internet worked. getconf LONG_BIT said it was 32 bit though. Same story when I tried downloading a fresh copy of Raspberry OS.

I don’t know if I have a defective unit. What I do know is that any warranty I have is ticking. I’d rather not ship off for a replacement until I’m sure of what’s going on. The closest I saw to these symptoms was maybe something on the Pi 4 jamming its own Wi-Fi somehow. I know I’ve been focusing on 64 vs 32 bit, but my tests could just as easily be official vs 3rd party. My next test should probably be to find a 32 bit 3rd party OS to test. If it doesn’t work, maybe some drivers just need tweaking.

Final Question

I’ll make it simple this time: Where is an official 64 bit OS for the Pi? I believe it exists, but the site led me to believe I was downloading it and not something 32 bit.

Family Photo Chest Part 11: Workflow

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am conceptualizing a workflow for scanning the family photo trunk. Let’s get started!

I don’t have any hard figures, but I’m fairly sure that half the project is getting to the first definitive scan. It’s been a year now, and I have yet to save a single photo to disk, but at least I have answered most of the questions that need asking and have an idea for the remaining questions I still need to look up.

Dots Per Inch

Probably the single biggest unanswered question is what dpi to scan at. Everyone has a variation on the same answer: it depends. Zoom in close enough to any picture, and you run into the individual grains making up the image. Pictures with a slight blur have a more than fair share of redundant data here, so it’s okay to ease off on the disk space they’ll forever occupy. On the other extreme, it may be preferable to scan negatives near the grain threshold to mine out as much of the original content as possible.

The process of printing can only ever lose detail. The same goes for digital image manipulation. There is research into AI’s that can believably upscale an image, but once original detail is lost, it’s gone, and you’re left with purely guesswork. The worst case scenario is to find that all scans to date are low quality, and work on the payload needs to start over.

I hear good things about 600 dpi for general use. I’ll need to experiment for myself though, but I’ve come to think about it from both ends toward the middle. Start with how much detail you need to end up with and adjust for how big of an item you are scanning. You’ll can calculate the appropriate resolution to scan at from there, barring any of the above limitations cited in the above paragraphs.

File Format

My initial impulse was to go with PNG. It’s familiar, it’s lossless, but apparently it doesn’t come enabled by default. It’s grayed out it Image Scan! for Linux, but most software doesn’t even list it. If I want to continue down that path, I’ll need to either brute force a utility to scan it directly, or I will need a converter.

But PNG may not be the proper tool for the job. Digital archivists have been using the TIFF (interchangeably TIF) standard for longer: almost three and a half decades. Still, PNG has its merits. I do intend to put the archive online. TIFF apparently handles metadata more safely and more uniformly though, and metadata is something I intend to research further and learn to manipulate.

Workstation

Next, I’ll need to ask myself exactly what hardware/software I’ll be using. At present, I am most seriously considering scanning directly into GIMP and using a plugin or script to crop multiple pictures on a page at a time. Lightweight repairs should be possible on the spot, then the extracted photos can be saved to network storage.

I have two scanners at my disposal, I’m planning on driving one with my laptop. For the other, I’m considering experimenting with a Pi 4, though if that’s not powerful enough, I can always move a tower like Button Mash, my home Minecraft server, over to the project workspace to drive the second scanner.

My dream setup is to have one workstation controlling all the scanners using some kind of remote login software (to be researched). All parts should be in the same general area and be connected by hard wires and a switch, since I have the equipment.

Workflow

I’m including this section since it is important, but it’s also something that will get refined even after I start the scanning proper. Using two or more scanners, I can keep one or two people busy, even if the computers being used are a tad on the slow side. An organized directory acknowledging preexisting relationship of similar photos, such as an album or original sleeve, can address any automatic numbering schemes.

Pacing is another element here. Had I dedicated this entire blog to this project until I was done, I would have lost interest long ago. I don’t want to be scanning all alone, so I’ll need to coordinate schedules.

Digital repair is a fact of life in such projects because a microfiber cloth can only remove so much dust. Damaged photos that require special attention will need a way to be flagged or edited on the spot. On the whole, I believe the pictures have been well preserved, though we did find one torn photo to practice on.

Takeaway

I won’t pretend to be the definitive guide for digitizing your photo archive. To do the job properly, you may need to spend on reading materials or membership in a community like Scan Your Entire Life. A lot of my research this week came from what is freely accessible from his site, but key details are behind a pay wall. However: a prominent –but unofficial– theme of this blog is using the open-source model whenever possible, and as good as his stuff looks, I don’t have the funds to invest in a paid community.

Final Question

How long have you put off scanning your old family photos?

A Collection of Raspberry Pi Projects: Volume 2

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am giving my day one review of LibreELEC running on the Raspberry Pi 4. Let’s get started!

Installation

Depending on how I divide this up, LibreELEC was one of the most painless distros to install, or one that’s taken me the longest to date. I believe my first attempt months ago failed because the download from their website was actually a small program to help download and install an image and I tried flashing it directly.

As per my custom for flashing SD cards, I made the download and tried installing on an actual Pi because it minimizes the chance for accidentally overwriting the wrong drive. This installer though, refused to work. I figure it was only compiled for desktop-style computers. It was a case of my own experience getting in my way.

Once I used their downloader to select the correct image and flash the chip, it worked. I did the usual new install setup procedures: establishing language, keyboard layout, time zone, etc. and spent a few hours poking around.

Kodi

The whole point of LibreELEC is to run one program and run it well: Kodi. I’ve never used it before, so I couldn’t tell you where the OS stops and the media program begins. Functionally, it feels like any media player sold in stores since DVD players were computerized for streaming content off the web, only it comes with a bunch of interface options.

I did have one problem after installation that stumped me enough to research. I had something all ready to play for the family, but the sound came up a no-go. A brief search quickly landed me in a community forum, where someone stated that for some reason, by default, LibreELEC on the Pi 4 only gives HDMI sound to the jack beside the micro USB C power plug. Otherwise, I was looking at possibly getting in there and messing around with things at the command line level over SSH; I have not yet found how to access a local terminal.

Future Work

There are a precious few keyboards in the home, and even fewer wired keyboards. Also of note is that my Pi 4 has been tied up for a while now, plugged into the TV. My endgame goal was never to leave this one tied up forever.

The Raspberry Pi 400 is largely equivalent to a Pi 4 (4 GB RAM) rearranged to fit inside a keyboard a la the Commodore 64. We put one on order, though suppliers are any combination of backordered, out of stock, or limiting how many each person can buy.

My plan has always been to make the SD card and put it in an appropriately specced host machine. Phase 2 of this project can proceed when I have an IR sensor to experiment with. When the keyboard is rendered unnecessary, I can think about moving the card over to a low end Pi 4 and see if it runs on 1 GB RAM.

Takeaway

No Linux experience is required to use LibreELEC. It is aimed at people who want more control over their home entertainment experience than is afforded by a commercial media player. It walks you through the scariest parts of installation, and the one problem I needed to research externally was trivial to find the answer for. Everything I can think of that someone might want in a basic home entertainment center is laid out plainly, but more advanced options exist for expert users.

Final Question

Have you ever been in a situation where your own experience got in the way of solving a relatively simple problem?

When To Use LTS

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m moving Derpy over to yet another installation of PopOS. Let’s get started!

PopOS is an Ubuntu-derived Linux distro. It’s website has install images for both the LTS or latest versions, each with options for NVIDIA or other graphics cards. Not knowing anything about which one to pick, I installed the NVIDIA and later the generic latest release images.

To date, I’ve found PopOS to be the easiest Linux distro to install. I don’t find it perfect: their GNOME 3 based desktop environment isn’t aimed at a Windows-like workflow, as I’m used to, but their website has step-by-step instructions to install a number of well-known alternate desktop environments. The GUI package manager has a few issues, but I’m convinced that’s normal in the Debian family and the proper command isn’t all that hard to learn. My biggest complaint, though, is that I’m having random Discord/Internet blinks. They’re common enough to be annoying, but too rare to readily diagnose.

The Structure of Maintenance

In one vision of a perfect world, people would only ever download raw source code to compile locally, a process Manjaro has streamlined. The Debian family’s apt repository nicely emulates another “perfect” vision where software is curated – the correct precompiled package is downloaded and installed automatically.

Neither format has an infinite capacity for continued support. Where Arch family distros simply run whatever is newest, Debian-family distros tend to accumulate changes until they produce a new, discrete version. For added stability, LTS versions are maintained so users have an option to go several years without having to go through the hassle of a major update.

Popularity of Ubuntu

Anyone who knows anything more than the name Linux almost certainly has also heard the name Ubuntu. For some, the name Linux only popped up after looking into that Ubuntu machine in the library that somehow isn’t a Windows or a Mac. Its popularity is in part due to its wide software base, drawing from both Debian’s and its own official repositories, as well as any number of PPA’s people have set up. This popularity snowball extends to software available only by downloaded from trusted websites.

Derpy’s Final? Form

One of my primary reasons for installing PopOS on Derpy Chips is having an Ubuntu-compatible research desktop that can access this software base. Unfortunately, while investigating software I want to use in worldbuilding, I found my version of PopOS simply lacked prerequisite packages. Backports were hard to find and compilation was taking too long.

What I didn’t realize my first time installing PopOS was that downloadable 3rd party software isn’t always compiled for the latest and greatest versions of Ubuntu. It could also be a question of maintenance. If you only have the resources to upkeep a few versions of your software, it makes the most sense to focus on LTS releases. This is why I downgraded to the LTS version of PopOS. I didn’t have much to back up, and I was most of the way back in a single evening.

Takeaway

If you are ever faced with the option of installing an LTS release, you really need to consider the application. If you have a dependence on 3rd party software, you may find yourself more readily at home using an LTS version. If you don’t care about any special software and want the latest and greatest without giving up too much stability, a major release may be for you.

Final Question

Have you ever taken measures to make a correct decision, only for another factor to muddle things up anyway?

I Have a Laptop Again

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am putting my laptop back in it its own case and providing my thoughts on my first week of using PopOS on a desktop. Let’s get started!

Laptop History

I’ve said it before: my laptop is now nine years old, and it has no business still running, yet here it is. Trouble started when the power port broke, and I replaced it with a cheap knockoff. The BIOS refused to charge any batteries from it. I resigned to operating from the power cord on a permanent basis.

As I became more interested in using Linux as my daily driver, I saw no harm in installing to a large, external USB 3 SSD. It actually performed better than the internal hard disk. The only downside was one more cable, and that seemed like nothing with the power cord, and I even opted for a second monitor and a separate keyboard/mouse.

Things started turning around when I got a hold of a genuine power port. Installation was a success, but shortly afterward, I accidentally nuked my Windows drive during an unrelated project. Much later, I swapped out the wiped hard disk for a more modern SSD during an emergency teardown in preparation for this week’s simple, but monumental project.

dd if=/dev/sdd of=/dev/sda –status=progress

The dd command is easily the single most inherently dangerous command I know. As such, I insisted on backing up my home directory in case I had another “nuclear accident.” I developed a series of prerequisites, such as getting an NFS share working as I expected with login credentials of one sort or another. I researched that for a while, but made not quite enough progress in that department to justify continued intense focus.

The typical go-to terminal program for do-it-yourself automatic backups is rsync. I would have used cp, as I’m more familiar with it, but rsync has a number of improvements. It’s supposed to be faster, and it intelligently ignores files already in the target directory. It also has an overwhelming number of additional options I couldn’t begin to cover.

Once I had a copy safely stored on network storage, I had rsync double check it, and I loaded up my PopOS install media –also on a USB 3– to prepare for the final copy action. The BIOS kept loading back to my main install, but instead of arguing with the BIOS, I just unplugged the wrong drive until it was strictly needed.

Both my target and my receiving drive are 1 terabyte a piece, but there’s a little room for variation in the specs. As a final check, I used lsblk –bytes to examine the exact size, and I had a relatively tiny difference in size leaning in my favor. As is becoming my custom for dangerous commands with elevated permissions, I only prefixed it with sudo after checking and double checking the command after entering it. I REALLY don’t like commands where a single character off could be a valid command I do not want to run, especially when I have hard drive designations /dev/sdd and /dev/sdb at the same time.

I only triple checked before executing the critical command. I should have quadruple checked, but everything was in place. I had dd report its progress so I could estimate its time til completion, and it turned out to about 6 hours. I was not there for when it finished, but it booted up just fine first try. My laptop is now a normal laptop again.

PopOS Meltdown and Recovery

PopOS gave me a bit of a scare this week. I customized it by installing KDE, but it started acting really weird when I was trying to play a game with my sister. The trouble started after an update. Discord and Firefox were going on the fritz, sometimes spazzing out two or three times a minute per use. Rebooting didn’t work. Loading up GNOME didn’t work. I had to put it away over Sabbath, and when I upgraded packages again, the issues stopped immediately. I am very thankful to the teams who provided a quick turn around time for whatever bug was making things unusable.

Final Question

I have been looking forward to finishing this milestone for a really long time. I feel like a soft chapter in my hobby here has come to an end. Which of my long-term projects should I return to next?

PopOS and X Drive Recovery

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am reviewing my first impressions of PopOS and compiling another short story I have about data recovery. Let’s get started!

Derpy’s Re-refurbishment

One thing I’ve learned while poking into Manjaro is that if sometimes a “Linux” program really just means it’s packaged for Debian or Ubuntu and other branches are expected to be tech savvy enough to bend compilers to their will. For that reason, I am re-refurbishing Derpy Chips with PopOS, an Ubuntu-based distro made with both privacy and Linux beginners in mind.

When the tale of Derpy Chips was last laid to rest, I had slated it for a new cooling system, as well as a new hard disk and RAM. The later two are trivial for anyone who isn’t afraid of the inside of a computer case. When the parts arrived, they basically went straight in.

The water cooling system, on the other hand, is a lot more involved. I waited until my father was available to do that with him, and I’m glad I did. We unmounted the radiator and the thing looked as if it had ten years worth of dust preventing any and all airflow! And the fans weren’t even blowing the correct direction. After applying a generous amount of vacuum cleaner and toothbrush, we put the radiator and fans back on correctly, but the old, gummed up case fan was on the brittle side. It’s now secured with a length of wire so it won’t spin off-balance.

The cooling system is now working fine. We figure that problem is solved now, but we have a spare just in case.

PopOS

I had a few bumps installing PopOS, but those were all on me. I have a new favorite USB drive to install Linux from, mainly because it’s USB 3. I forgot to umount everything before writing the install image to it, and things seemed to hang for an unreasonable amount of time. Otherwise, it was the smoothest Linux installation I’ve ever done.

I went into this knowing I’d probably be switching out the desktop environment. While the PopOS branding emphasizes the polish they’ve put into tweaking GNOME 3 to boost productivity, I am very particular about my desktop computers looking and feeling like desktop computers and not phones or tablets. Perhaps one day, I’ll get around to using it, but not at this time.

Minor complaint, but for seemingly no reason, CTRL+ALT+t doesn’t bring up the terminal. I have absolutely no idea why not, as that is the number one most important key combination in Linux — far more important than the Windows “Three Finger Salute” used in bringing up Task Manager.

X Drive

Well, It seems I just got a dinosaur of a network storage device working when it dies not two weeks later without fanfare. I spent a short while applying my knowledge from researching NFS to make it properly accessible. I went through and taught myself how to connect special to an SMB drive. I even made a link to it from the desktop. It worked. Now it won’t even acknowledge itself as an internal system.

Along the way, I was imagining a hidden clock in the drive. If the clock reaches zero, the drive stops working. The goal then is to get in, get the data, and hope there’s enough time. I posted for help, and Discord user Ghostrunner0808 walked me through the basics of single-use rsync. It uses the same syntax as cp, the copy program I was otherwise going to use. It can also start again where it left off, in case operations are interrupted.

I set up a little sandbox directory and experimented. While I wasn’t able to get all my root level hidden files to copy, I was able to get everything else. I also looked through all the help prompt and was settling on using the flags: -rtUv. r for recursive, t and U for times last accessed/updated, and v for verbose so I know it’s still doing something.

One of the network shares is meant for general access for all family members. Permissions were such that it made the perfect place to dump X Drive. I copied and modified an appropriate line from a working /etc/fstab to mount it on boot.

The whole reason I had conceived of this idea was because X Drive is little more than a regular hard disk in a plastic case and a special case to hold it on end. The plastic case was getting in the way of the SATA cable from connecting. We forcefully removed it, only to find someone showing how we could have done it without damaging the snaps.

DO NOT TRY THE FOLLOWING AT HOME. One trick I was thinking about trying was triple bagging the disk and sticking it in either the fridge or freezer. Some people have reported saving a failing drive this way, but further research found this is only effective when the read head is sticking to the platter; I could feel the platter spinning inside the case.

This one is above me. I need some form of professional help.

Sad to end on a bum note, but two out of three isn’t bad, though I will add that PopOS has only two downloads: one for systems with NVIDIA cards, and one for all other systems. I downloaded the NVIDIA one, thinking Derpy’s card was such, but I was wrong. Good thing the installation process is super easy.

Final Question

What priorities do you value in an operating system?

Trust and Privacy in a Digital World

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am doing a one-off about digital privacy. Let’s get started!

In all reality, this subject is totally improvised. My projects for this week never reached a satisfying milestone, but my father kept insisting I may have something here. Point being: this is highly under developed, and my views will likely change in the upcoming months.

Most people I know appreciate at least a little privacy every now and again. Social norms vary depending on time and place, but in general, it’s as easy as shutting a door, closing the curtains, or hollering at violators when an honest mistake happens. Businesses partition off appropriate areas for customers to enact transactions. Doctor-patient confidentiality holds medical professionals accountable in case they disperse any of a treasure trove of possible gossip their jobs afford them. We’re good at intuitively carrying on reasonable privacy measures in the real world because our physical world has been engineered to suit our privacy needs.

But for all the privacy measures average Internet goers know, they may as well be jogging naked through the park wearing nothing but a fashionable belt advertised as guarding privacy when surfing the web (paraphrased from countless VPN ads).

The digital world is constantly being restructured and redesigned, and as such, so are the tools to compromise end-user privacy. Without naming any companies or products, more than a couple companies come out and outline their intrusions in that agreement hardly anybody has the attention span to digest, while others are caught committing outright espionage against their clients for foreign countries.

As I said at the beginning, this is still a rough rough draft, but I’d like to propose a number of categories to use when evaluating a piece of software:

Category 1. Malware

Nobody who even thinks he or she understands what is happening here will mistake it for anything else. Barring a user deliberately installing one of these programs to study its operation, these programs are unwelcome, and they’re out to get you.

Category 2. Trojans

This range describes software that performs a desired function, but only as a cover for spiriting in undesirable code. They rely on people either blindly installing it, either by lying about the payload or hiding the truth in ten pages of tiny type and calling it either an EULA or a privacy statement — either of which may as well be written in ancient Sumerian for all the typical user can digest.

Category 3. Trust

In the middle of this spectrum are programs that should be safe if they’re from a trustworthy party. Wise computer users evaluate how much trust a program needs vs how much it deserves.

The more access a program needs on the system or network, the more the user should trust it before letting it loose. The longer people have used it without someone sounding the alarm, the safer the program is. Transmission confirmation is also ab important factor.

Category 4. Open Source

Open source is your friend. By exposing the source code for all to vet, a developer can get tens of thousands more eyes looking for bugs that a relatively tiny professional team may have missed. Because once a piece of software is in circulation, bad people will start prying at it. And while open sourcing makes their job much easier, it also invites good people to do the same on an equal footing.

Category 5. Learning Tools

There is little more you can do to be worthy of trust in computing than to not only expose your well-documented code aside from using it to explain an example for students to learn. By stepping through the source line by line, a lesson explicitly aims to demystify the program in question.

Conclusion

While these categories are a general when applied to a spectrum, they have a lot of overlap. An open source virus is still a virus — but I have heard of an online museum displaying neutered malware that people spend artistic energy on, landing an otherwise category 1 program among category 4 or 5 programs. A technically savvy user can theoretically use some category 2 programs by controlling them with a fire wall.

Most people feel safe as long as they don’t have category 1 software infecting their computers. Ideally, I would like to see everyone going up to category 4, but 3 is more realistic. Unfortunately, digital landscaping companies these days pumps out category 2 software, putting profits above user safety. Without a working, up-to-date intuition on active threats, digital privacy is something that takes months or years of study to obtain.

As for me, I feel like the dim-sighted leading the blind in this matter. I’ve been upset for a while about certain companies with seemingly no accountability for the digital gossip they scoop up wholesale and sell to advertisers. I don’t like being sold.

Final Question:

How well dressed are you really when it comes to living in the digital world?

Kerberos: the Three Headed Authenticator

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I believe I finally have the key holding back a number of my projects. I haven’t finished this week’s research as of starting writing, so I have no idea of how it turns out. Let’s get started!

Critical Path

Right now, my immediate long-term goal is getting photo archive pictures scanning, preferably with a custom script to streamline the process. For that, I need a reliable computer for processing photos — my laptop would work, but I’d feel a lot better if I had its long-term memories inside the case instead of hanging out for the world to snag. I would clone them inside with dd, but I’ve been holding out until I can perform a backup to the NAS. And that is where I’ve been stuck for a month or two: authentication to the NAS instead of by individual IP… until recently.

Kerberos

I often work on topics in parallel, switching on the last day if I don’t complete something. Last week, someone brought up Kerberos, an authentication protocol that’s been around since the mid-80’s, and if the Computerfile video, “Taming Kerberos,” is to be believed, it’s resistant to quantum attacks. And here is another video explaining Kerberos while addressing its weak points, something that most explanations overlook.

Named after the three-headed dog of Greek mythology, Cerberus, Kerberos follows a three-part model for authentication: client, host, and a mutually trusted authentication server. In simplified terms, you and the authentication server has two steps, one that uses cryptographic keys so both client and authentication server are sure they know each other, and another that issues tickets, or temporary passes, for desired hosts. Given a ticket, the host then does some final checks before conducting its normal business with the client.

Kerberos has more practical applications than just NAS authentication. It would appear OpenSSH is perfectly happy authenticating with it. I already have around 7 to 9 SSH-enabled devices and I don’t care to manually generate and distribute keys amongst everyone. And then there’s conflicting host keys when not everything is tied down to its own static IP and my Pi 4 I’m now swapping MicroSD cards on. I’ve resolved to just having one machine I SSH into that holds most of the keys I need and then SSH into the appropriate machine from there. In the future, I may even apply this technology for that website I’ve been working towards for almost a year now.

Compiling Kerberos

There are plenty of explanations of how Kerberos works out there. So many to the point where they clogged up my searches for actually finding an implementation of the method to use as a server. I eventually found what I believe to be the preferred download over at MIT. It does, however, come with a warning about exporting cryptographic source code from the US without permission, and that it’s illegal for it to go to a short list of countries or their nationals, though I did see some possible leeway for Canadians.

I intend to set my PackMan ghost-themed Raspberry Pi 3 (Codename: BlinkyPie) up as the host for this authentication server. With a significantly more powerful Pi in the house, it’s no longer my go-to for small scale computing, but since this is a very small scale job, processing speed and Ethernet bandwidth shouldn’t matter so much. I pulled it out of storage in plain sight and set it next to the NAS, near where I’ll need it for another project I’ve been putting off for years now. Of course, I’ll be wanting to lock that thing up tight once I have it going long-term. For now, I’ve set it up with a static IP where such a future system will go — right in there with our other network services.

The source code came in a tar file. I extracted it, but then remembered that it’s good practice to verify the download when possible. MIT provides a PGP signature. I’ve only worked with Shasums before, but it’s a similar idea: protect against corruption and tampering.

The PGP implementation I found to read about is called GPG. I had to look no farther than Blinky’s own Raspian operating system to find it was already included. It’s usually nice when a little tool you learn about is already within arm’s reach. I struggled around with reading the manual, its internal help page, and looking up use-cases online. I found their missing public key, tracked down an instruction set under “documentation” on how to compile from scratch, and was finally able to manually verify the signature for the tarball. Trying to verify the signature in a separate directory failed to produce the key, as expected.

My first attempt at building Kerberos failed. I stepped back to research details in the instruction set I previously glazed over, such as requiring ANSI C compliance.

At this point, I started to get some direct answers from members on the EngineerMan discord server. EngineerMan himself personally explained how ANSI C is just a longer name for the C language, but mostly older standards. He named c89, but said, “you won’t hear people call c18 ansi c though.”

My understanding of the situation is so: Imagine I have a big program I intend to maintain for 50+ years. I can write it to the standards present here in 2020. But if a new standard comes out in the meantime, I can either go through the bother of updating EVERYTHING each time –leaving myself open to any bugs that might crop up as a result– or I can just keep using the 2020 standards. If someone needs to compile it, the newer compiler can always be manually configured to run the older standard. Now just backdate the situation to 1989 or so and October 2020.

I tried recompiling a few times without changes, trying to sift through the overabundant console output. I think it was my third attempt where I stretched my terminal across two screens and beyond that I noticed several messages referencing missing files.

One iteration, I redirected the first phase’s output to a log file using the > operator, but two warnings about missing files went to the console anyway. One was for something called Tcl, and the other for OpenSSL. OpenSSL showed up when I looked for it, but Discord user jeffz popped in and talked me through getting the developer version. Additional packages had to be added, preferring development versions when available.

Eventually, I stabilized the configuration script (I think), at which point I copied the whole build directory to a backup. With help, I worked on brute forcing the actual compilation. Every time, a huge error log would plague me, sometimes with lines so long, it would take four screens to show the full line in tiny text. User yemou on the Nixhub Discord server spotted a tiny typo in the command fragment make CFLAGS=-std=c89. Most, but not all log activity went away after that. Oh, and jeffz pointed out some MIT Kerberos compilation instructions tailored for Debian-based distros.

Installing Kerberos From a Repository

I got close —real close– to successfully compiling. I learned a lot to file away, but when I explored that link jeffz gave me about MIT Kerberos installation on Debian, it went straight to the apt repository. I installed it and promptly messed up the admin-server package configuration.

Initial MIT Kerberos 5 configuration is unforgiving. I tried removing the packages and putting them back, but they found some other remnants to lock on to. I used the page linked above to track down and remove more mentions, but each time I plucked something out, it broke even worse. I saw someone in a similar situation asking for help. I quickly figured out how to purge when dealing with the repository, and was soon greeted with the configuration screen, though it still must have found something because it didn’t ask everything again. I read farther, and found where they were suggesting a clean install. Not what I wanted to hear, but it’s probably for the best.

This is where I sprouted off to work on last week’s topic, where I arranged for a personal master image of Raspberry Pi OS. On taking another look at the install script for Kerberos, I feel like I’m trying to install an engine to a horse and buggy — in theory it could work, but I’m getting asked questions about where the intake manifold or the gas tank are going to go. I’m spending more effort dodging the work of setting up static IP’s than I am just doing the original work.

Kerberos needs to go wait out in the dog house for a while. Who knows? Maybe I’ll revisit it in five years or so and play ball then.

Final Question

While exploring available Kerberos downloads, I happened across a development branch. They warned multiple times against the wrong people using it with decreasingly relevant warnings. They finally skill gated it by giving a set of instructions to keep the hopeless beginners out of trouble. Have you ever run across any skill gates?

Raspberry Pi OS: Review and Clean Install Image

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am going over the new official Raspberry Pi operating system and producing a custom image I can deploy in case I ever need a clean install. Let’s get started!

Raspberry OS Review

BlinkyPie is my Raspberry Pi 3B+ with a Pacman ghost case I printed and finished myself (with help). It’s supposed to eventually host an OpenCV powered feline deterrent system I’m still aiming to deploy some day. Today, I’m starting by installing the new official operating system for all Raspberry Pi’s: Raspberry Pi OS on a fresh MicroSD card.

Installation was fraught with several simple mistakes. My proper procedure is to: 1. Have an empty MicroSD card. 2. Download the OS image (over a WIRED connection) and verify it with its hash. 3. Quarantine the image and SD card on a computer I don’t mind rebuilding (no sdX other than the target SD in an adapter, internal MicroSD is mcblk0). 4. dd the image to /mnt/sdX. 5. Boot the image. 6. If it doesn’t work, lower the bit rate for the dd command (yes, it saved the project this time).

I didn’t skimp on resources this time: I got the full desktop image with recommended software. Long-term, I’m figuring it will be easier to maintain. Since I’ll be using this image over and over several times, I took a day or two to do things like localization settings, a lefty mouse, enabling SSH, and customizing the UI.

I’m looking to move away from using default, non-root accounts. Raspberry Pi OS (I’m just going to call it rPiOS from now on, if that’s okay) and Raspian before it come with one called ‘pi.’ To change it, I had to first enable SSH, log out any and all sessions for the pi user, and change over the account and home directory names — preferably without logging into the GUI as root and creating a bunch of normal user files.

I poked around rPiOS without an agenda for a bit. There was always the games folder I never paid much attention to before, so I checked that out. Of special interest were the collection of simple Python games. They had no fewer than three Tetris clones, a normal one, one with one block pieces, and one with five block pieces, like the original Soviet precursor. The five-block per piece game runs a little fast, so after some time, I realized I’d like to try and slow it down a bit. I also found a “Bookshelf” where you can read up on Pi projects. It also came preloaded with a bunch of programming tools. I know it should be obvious, but rPiOS is built for learning. It has just enough there to be plug and play for a browsing machine, I know the Pi3 chugs a little under watching my church’s Livestream on Sabbath mornings, but it should be more than enough computer for anyone without serious computation needs.

A Small, Custom rPiOS Image

I have to admit, this week’s topic was a node for a much larger project I’ll be covering next week. Suffice it to say, I’m in a position where I may need to reinstall rPiOS several times in rapid succession. That is why I’m making an image file.

Once I had tweaked rPiOS mostly to my liking, I shut it down and brought the card over to my Manjaro Pi 4. dd was not happy with me making backing up my MicroSD to a 1 TB external hard disk for some reason. Everyone helping me seemed sure it was corruption on the MicroSD card. As much as I respect their advice, I can’t help but be skeptical this time. It’s a new card with low usage so far. It boots fine, and I was trying to copy between two devices on the same USB 3 component. I’ll file this away as mystery unsolved for the time being, but for whatever reason, it confused BASH to the point where ls wouldn’t work with relative paths until I changed directories.

I eventually used the internal rPiOS card duplicator and made a physical copy over top my RasPup install. I tested it, and It booted normally. Moving things back over to the original card, I followed a tip I found in this video and used dd if=/dev/sdX | gzip > imageName.gz to make a compressed copy of my pi SD directly on itself. I copied it over the network with scp, and unzipped my image.

Now, many guides on rPi backups invoke partition tools I’m still too scared to touch, especially on a timeframe. That’s why I downloaded and used PiShrink, a shell script available on GitHub that downsizes your Pi images so you’re not saving empty space in storage — or even worse: transmitting it to a friend. Apparently it’s popular for use with RetroPi, a Pi distro for emulating old games.

My MicroSD cards are 32 GB each. My final image is down to 9. If I had more time, I may try again without the default desktop background, since I’m planning on never using it, and I think my custom desktop image is a good chunk of the added size.

Final Question:

What useful finds have you made when looking for something similar?