A Collection of Raspberry Pi Projects: Volume 3: PiCore

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am finishing off the year with another entry into my Raspberry Pi operating system collection. Let’s get started!

I have a number of Pi projects going around now, and not enough Pi’s equipment for everything. My Pi 4 is mainly serving as the family’s entertainment system (I happened to find a Steam Controller driver for it), and my Pi 400 –which I originally intended for that job– is running my Raspian reverse Wi-Fi router card because it’s not supported yet by LibreELEC outside beta releases. I’m tossing these microSD cards around like playthings, and my family has expressed mild concern.

But today, I am taking notes as I build a side project to help with my Photo Trunk project. I have no idea if it’s going to work well, but I’m hoping! Worst case is I learn a few things and move to something more appropriate.

PiCore Installation

I’ve covered Tiny/Micro Core Linux before. I know it’s very much a build-your-own experience type of distro without being totally unapproachable for beginners intent on learning. I am installing it using BlinkiePie (Pi 3B+) with the intention of moving it to a Pi 4 unit later.

The two documents on the download page, IMPORTANT and README, explain how to install the operating system to an SD card and expand the second partition. I followed along more or less blindly.

At one point, fdisk is opened, and I was instructed to “write down the starting and ending sectors of the second partition.” [source] When I listed them, fdisk reported StartCHS, EndCHS, StartLBA, and EndLBA. I looked, but I wasn’t able to find any other examples of fdisk reporting in this way. I only learned about “Cylinder Head Sector” and “Logical Block Addressing” by separating the acronyms. I proceeded to make a new partition, and fdisk was nice enough to mention the largest size I could go.

Construction Pains

I was expecting to start with something resembling the larger “Tiny” Core variant with a desktop environment, but PiCore only has a “Micro” Core image available. GIMP is very much a textbook GUI program, but the tce package manager was more than happy to install it and I estimate fifty dependencies.

I browsed over to the TinyCore forums, and was actually able to activate my account. The connection still isn’t secure, so don’t go using any personal standardized passwords. 50-99 alphanumeric characters with symbols say that’s not an attack vector against me though.

As I was getting ready to look for help in the dedicated Raspberry Pi section, I noticed a thread here where someone was looking to install a desktop. I went ahead and installed xorg, a name I know has something to do with Linux GUI’s, but like the original poster in the thread, I found myself unable to do anything after booting to a simple black screen.

Further experimentation discovered that by holding CTRL+C during startup, I could interrupt xorg from trapping me away from the command line. The results were a bit unpredictable, though. The first time, I somehow ended up as root. Other times, I found myself as tc, the default username, and other times, no login transpired.

I installed the remaining recommended packages, but neglected the window manager. Results were interesting. There was a dock at the bottom of the screen I could interact with, but no visible pointer. I toyed with the setup before rebooting again. GIMP was no trouble to get running with a window manager on board.

Takeaway

In many ways, MicroCore feels like it’s a model operating system. All the parts are exposed but there aren’t so many the mind can’t grasp the overall system. Additional work will need to be done if I want things like automatic connection to GoldenOakLibry or even Wi-Fi for that matter. I still have much to learn.

Final Question

I don’t like the window manager I found. Which one might you recommend?

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.

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?

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?

A Collection of Raspberry Pi Projects: Volume 1

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am playing with some SD cards I got to try out additional systems for my Raspberry Pi 4. Let’s get started!

The Plan

I would like a computer where I can format drives without having to worry about nuking any drives I can’t easily repair should I get a single keystroke wrong again. I need a quarantine machine.

Earlier this year, I got a Raspberry Pi 4 to serve as a head/firewall for a model supercomputer (still pending). Back then, I found three microSD cards, but only one was good for booting Raspian, and I ended up with a neat, little Wi-Fi to Ethernet router. I like my reverse wireless router. I don’t want to give up my reverse wireless router.

I started shopping for microSD cards, and came across a then-recent Tom’s Hardware article where they tested several brands for use with Raspberry Pis and compared them in different areas. Going off their recommendation, I selected the Silicon Power 3D NAND. I figured I may want more than one, so I got a 5 pack. The next size up was 10, and I’m not quite that avid a Pi user at the present time.

Besides a Quarantine Machine, additional applications include:
a general purpose operating system,
an actual firewall/supercomputer head
a media center
a home-network wide ad blocker
And it would be good to have a backup of my Quarantine card in case I really goof it.

Manjaro ARM

While I was installing Manjaro on my desktop, I noticed they have a version for ARM processors, such as the Raspberry Pi. They even maintain an image for installation on the Pi. I went with XFCE to preview for an upcoming project.

Installation was a nightmare due to user error. I must have tried three or four times to load Manjaro onto the first partition on a microSD card. Along the way, I found a thread where someone was reporting issues with installing the current version, 20.08 (named after the year.month), and people told him to try 20.06. My advice: if you’re thinking about trying to install any version of Manjaro, don’t try to downgrade. I don’t remember how I did it, but I got an older image to update later.

Once I went back to the official documentation and saw I was supposed to aim the dd command directly to the drive itself, I got it next try using the older image. The interface to finish installing felt unintuitive, leaving me to research keyboard standards. I would not recommend for anyone new to Linux.

Where the installer lacked polish, the XFCE desktop environment made up for it with some nicely preconfigured settings. Perhaps I was a bit harsh on it before. I was especially happy to be rid of the ugly, black lines around the screen present on Raspian. And of course, once I found the pacman command to update and checked the version, 20.10 had been released.

I went to hone this install in, reviewing some of my past lessons. A brief search didn’t help me set a static IP, but I moved on anyway. SSH was enabled by default, but it gave me an infuriating time confirming the host key fingerprint. I ended up caving to move on, but I did learn something about the improved security of a newer standard called Ed22519.

Raspup

Puppy Linux –in theory– is an excellent choice for an expendable Linux install on a Quarantine Machine because. It’s small, it’s enough to get you by as a daily driver if you can stand its slightly offbeat control scheme, and most importantly, it’s easy enough to reinstall. It’s also made for x86.

That’s where the people over at Raspup stepped in earlier this year. Installation was much easier than Manjaro, but that was where the polish ended. It’s so new, they don’t show up on Distrowatch. Their site doesn’t have a recognized security certificate, and has some oddball domain going on.

As for the operating system itself, I found its lack of Ctrl+Alt+T bringing up a terminal to be the greatest shortcoming in terms of my user experience. It also seemed obsessed with using linked GUI windows for everything initial setup. It also took way too long to boot up. While it did have those black bars around the screen, it did have a utility to adjust them between reboots. I don’t have the patience for it right now.

The most impressive thing about Raspup is their claim to work on any Raspberry Pi version, though the compute module remains untested. I honestly wish this project the best of luck, but at present, I can only recommend this cute, little project if you’re bored, want to poke around with something new, and have a spare microSD card for your pi. [Link to Raspup]

Other Projects

My goal was to also include a media station, but that didn’t install correctly as my research window for this week was closing. I’d also like to see about extracting an IR sensor from a dead piece of hardware, but that project can easily fill its own month of blogs.

While doing my write-up, I considered Tiny Core again, and there appears to be one for the Pi. I may do this one on the sly without reporting on it.

Six plus microSD cards is a lot to manage for a single Raspberry Pi. The five pack cards each came with an adapter, so I borrowed a label maker and applied labels to those.

Closing thoughts

One of the quirks I noticed with Manjaro on the Pi was that my USB SD card reader was showing up as /dev/sdc. Normally, SD family cards, such as the one inserted directly onto the motherboard at the time, have a different designation, so that’s something to look into. On the other hand, this discrepancy may be just what I’m after in terms of a safe computer to blast away at disk destroying operations. It only took one wrong keystroke, and if I don’t pursue Tiny/MicroCore Linux again, this may have the safety margin I need where I can disconnect any unneeded drives without opening any cases.

Final Question

What other Pi distros would you like to see reviewed on here?