A Single Board Computer From A TV

It is an annoyance for some members of our community, that it has become almost impossible to buy a TV that’s not a so-called “smart” TV. These units contain a computer as well as the display, and it boots into a locked-down OS with a user interface and a load of streaming apps. Can anything be done with them other than what their manufacturers intended? [Nina Kalinina] has managed it, taking the mainboard from a discarded LCD TV and liberating the ARM Linux board within.

On the board are all the inputs you’d expect from a TV, along with Ethernet, and a couple of extra USB ports hidden in the WiFi interface. There’s a UART available on the SCART connector, and accessing the U-boot menu is achieved by the unusual means of sending a character to the infrared port using a Palm Pilot. Surprisingly the device tree in the Flash was editable, so with the Linux OS accessed, the board was revealed as having a dual-core Novatek SoC.

This is reminiscent of the days when the new hotness was dragging a Linux box out of a home router, and just as those were quickly eclipsed by inexpensive boards such as the Raspberry Pi, so might these TV boards meet the same fate. If, however, they can be made to drive a screen with something more useful than the TV interface then that might change, as who wouldn’t want to make an old smart TV a bit more useful?

Linux Fu: Easy VMs

It wasn’t long ago that we looked at easily creating Docker containers from the command line so you could just easily spin up a virtual environment for development. Wouldn’t it be nice if you could do the same for virtual machines? You can. Using Multipass from Canonical, the makers of Ubuntu, you can easily spin up virtual machines under Linux, Mac, or Windows. Granted, most of the virtual machines in question are variations of Ubuntu, but there are some additional images available, and you can create your own.

Once you have it installed, starting up a new Ubuntu instance is trivial. If you have a set configuration, you can even set up predefined setups using a YAML file.

Continue reading “Linux Fu: Easy VMs”

Cat9 And LASH Want To Change Your Linux Command Line

It is no secret that to be a true Linux power user you have to deal with the command line. Many people actually prefer to use the command line. However, the shell — the program that provides that command line — is mired in a back history which means it has to work with existing things no matter how modern it tries to be. However, a new set of projects wants to replace most of your user interface stack starting with the shell. At the top of that stack is Cat9 which is technically a shell, but not in the way you probably imagine a shell.

A traditional shell lets you run programs one at a time, feed them input, and observe their output. Sure, you can stash the output away for later use. You can run programs in the background or in parallel, but that requires special attention. In Cat9, everything is asynchronous and results stay around until you deliberately drop them. It is trivial to grab data from a previous command or, for example, to switch to a directory that was in use by an earlier task.

Continue reading “Cat9 And LASH Want To Change Your Linux Command Line”

If Only The Kids Knew About Pipes

Being a parent is hard work. You need to prepare your child to operate in the world. Reading, writing, arithmetic, and how to make good choices are just the beginning. They also ought to know regular expressions and Unix pipes. [Jackdoe] can help with that last one, thanks to their Unix pipe card game.

As an example, the task “print the most common line from a file” would require the answer:

cat 03.txt | sort | uniq -c | sort -n | tail -1

You can vary the rules to declare whoever has the smallest pipe or the largest pipe that accomplishes the task as the winner. We’d add a house rule that whoever has the fastest pipe ought to get something. We don’t, however, think this card game will make the Vegas tables, unfortunately.

You can print your own card deck and even the box. Or you can buy a nice set, if you don’t want to spend the time. You should probably know about cat, grep, tail, head, wc, sort, and uniq along with their options.

If you want some other esoteric kids’ learning activities, they also have “Programming Time” which teaches algorithms and Python, and “4917” to teach the basics of machine code.

If you want help with the other key skill — regular expressions — check out regexp golf or crosswords.

Linux Fu: Atomic Power

People are well aware of the power of virtual machines. If you want to do something dangerous — say, hack on the kernel — you can create a virtual machine, snapshot it, screw it up a few times, restore it, and your main computer never misses a beat. But sometimes you need just a little shift in perspective, not an entire make belive computer. For example, you are building a new boot disk and you want to pretend it is the real boot disk and make some updates. For that there is chroot, a Linux command that lets you temporarily open processes that think the root of the filesystem is in a different place than the real root. The problem is, it is hard to manage a bunch of chroot environments which is why they created Atoms.

The system works with several common distributions and you install it via Flatpak. That means you can launch, for example, a shell that thinks it is running Gentoo or Centos Linux under Ubuntu.

Continue reading “Linux Fu: Atomic Power”

Linux Fu: Eavesdropping On Serial

In the old days, if you wanted to snoop on a piece of serial gear, you probably had a serial monitor or, perhaps, an attachment for your scope or logic analyzer. Today, you can get cheap logic analyzers that can do the job, but what if you want a software-only solution? Recently, I needed to do a little debugging on a USB serial port and, of course, there isn’t really anywhere to easily tie in a monitor or a logic analyzer. So I started looking for an alternate solution.

If you recall, in a previous Linux Fu we talked about pseudoterminals which look like serial ports but actually talk to a piece of software. That might make you think: why not put a piece of monitor software between the serial port and a pty? Why not, indeed? That’s such a good idea that it has already been done. When it works, it works well. The only issue is, of course, that it doesn’t always work.

Continue reading “Linux Fu: Eavesdropping On Serial”

Back Up Encrypted ZFS Data Without Decrypting It, Even If TrueNAS Doesn’t Approve

[Michael Lynch] recently replaced his Synology NAS with a self-built solution built on ZFS, a filesystem with a neat feature: the ability to back up encrypted data without having to decrypt it first. The only glitch is that [Michael] is using TrueNAS, and TrueNAS only wants to back up unencrypted ZFS data to another TrueNAS system. Fortunately, there’s a way around this that isn’t particularly complicated, but definitely requires leveraging the right tools. It also provides an educational walkthrough for how ZFS handles these things.

The solution is a small handful of shell scripts to manage full and incremental backups and restores of encrypted datasets, without having to decrypt the data first. As mentioned, this is something TrueNAS will handle by default, but only if the destination is also a TrueNAS system. Now, [Michael] can send that backup to off-site cloud storage with only a little extra work.

There’s one additional trick [Michael] uses to monitor his backups. He leverages a paid (but with a free tier) service called Cronitor. It’s not very obvious from the site’s features, but there is a way to implement cron job monitoring that doesn’t require adding any software whatsoever. Here’s how that part works: Cronitor provides a custom, unique URL. If that URL isn’t visited regularly (for example, because the cron job fails), then the user is notified. By integrating this into an existing cron job, one can be notified. Such an integration would look like this:

0 0 3 * * monthly-job && curl --silent https://cronitor.link/p/<API-KEY>/monthly-job?state=complete

In short, if the cron job runs successfully, curl checks in by visiting the custom URL. If that doesn’t happen, the user gets a notification. No added software, just a simple leveraging of a free service for some added peace of mind.

Backups are easy to neglect, so maybe it’s time to take a few moments to consider what you do for data storage, including how you’d recover from disaster.