Raspberry Pi Catch-All

Note that you can change an MBR disk signature with Windows using the diskpart utility, so you could at least modify the card so you could load it on the Pi, and then use the Pi to go fix /boot/cmdline.txt and /etc/fstab with the updated value. (which you can get with blkid -p if you forget it.) So if you get into the same hole I was in, you don't absolutely have to have another Linux box, but it would be a little easier.

If you don't even have access to Windows, another option would be editing the partition id on the *booted* filesystem, the internal SD card. That would probably work okay, but doing that kind of low-level monkeying around on mounted disks always worries me.

edit: because I had a fallback position ready to go, I went ahead and tried that, changing the disk signature of the mounted drive. It worked fine. Basic process (note that /dev/mmcblk0 is the internal SD card, should be the same on any Pi 4):

Spoiler:

sudo to root

blkid -p /dev/mmcblk0 # look for PTUUID="a525a3ea" That's the default Raspbian image value. #If yours is different, anytime I tell you to look for a525a3ea, look for your value instead. fdisk /dev/mmcblk0 x # for expert mode i # disk id 0xdeadbeef # substitute any random 32-bit hex value you like, prepended by 0x # do not forget this value! You have to remember it long enough to enter it in three places. r # return to regular menu w # write out partition table q # quit # you are now dangling over the abyss. If you reboot now, your Pi won't start. Don't reboot. cd /boot #edit cmdline.txt #look along the line for "root=PARTUUID=a525a3ea-02" #change a525a3ea to the value you should be remembering ... leave the -02 intact. #write and quit cd /etc edit fstab # you will see two lines with PARTUUID=a525a3ea-01, and PARTUUID=a525a3ea-02 # change a525a3ea to your remembered value on both lines, leaving the -01 and -02. # write and quit

Do a sync, and reboot. It should come right back up, and now you can mount and manipulate a dd image backup successfully.

I have found a use for my Raspberry Pi. I can now remotely execute commands on my Pi using the Shortcuts app on my iPhone. I only have two commands setup so far, one for turning on my server and one for turning on my HackMac. Simple wake on lan commands, but now I can execute them from anywhere I have an internet connection. It is setup using TriggerCMD which is a web service that can be used with any OS to execute various commands on your system including shell commands.

I have been having some issues with the power supply, but once I get that figured out I think this will become a nice little low power always on machine so I can turn on the other computers if/when I want/need to access them.

I'll repeat that the Pi4 is a fantastic little server. Put a fast card in it, and you can barely tell it's not an Intel box. It is a genuinely comfortable machine to use remotely, where the Pi 1 was terrible, and the Pi 2 was barely acceptable.

Ubuntu has an image out for it now, which is a full natively compiled ARM7 version. Raspbian is compiled for ARM6 plus hard float, because it has to run on the weak sister ARM6 chip on the Pi 1. At least in theory, ARM7 binaries should be quite noticeably faster, as ARM7 chips add a bunch of features.

However, there's a kernel bug in the current Ubuntu release, where the USB ports don't work if you have 4 gigs in the machine, which of course I do. This can be worked around, but I've been holding off, waiting for the 20.04 release.

This thing really has a pretty good processor, and I'd enjoy seeing it used to its full capabilities.

The Pi4 has an ARMv8-A 64-bit capable CPU, so why the half-step?

I was thinking of getting one to use as a minecraft server for our family and friends.

astralplaydoh wrote:

I was thinking of getting one to use as a minecraft server for our family and friends.

I highly recommend it. I'm running a server for my kids on one.

Do you have mods on the server?

Kurrelgyre wrote:

The Pi4 has an ARMv8-A 64-bit capable CPU, so why the half-step?

I might be wrong about the Ubuntu target. I thought it was ARM7. I'll have to double check.

astralplaydoh wrote:

Do you have mods on the server?

I don't, but I can't imagine there's any reason why you couldn't install them.

I used this as guide as my starting point https://raspberrytips.com/minecraft-... and periodically check back with https://www.spigotmc.org/ to get and install the latest updates.

I also printed this https://www.thingiverse.com/thing:24... to house the PI and installed some red LEDs (e.g. redstone) that flicker in a random pattern after the PI boots up.

I went and looked at the download page, and the Ubuntu image for the Pi series comes in two flavors, ARM64 and ARM32. It looks like the 32-bit version is the same as Debian, the 'armhf' variant, but ARM64 is full ARM8. They say it should run a little faster, but really should only be run on the Pi 4, which has more RAM. It's kind of a waste on the 1MB Pi 3.

They may have already fixed the USB bug, as they've released a .1 image, but I'm still going to wait for 20.04. It should only be another eight weeks or so.

Do you think a Pi 3 is enough to run a minecraft server just for 2 or 3 local players?

Mixolyde wrote:

Do you think a Pi 3 is enough to run a minecraft server just for 2 or 3 local players?

I've successfully built and run the MInecraft server from the links I posted on a Pi 3b+. I remember having to limit the amount of memory that it used for both the compile (it failed otherwise) as well as execution, but that was as simple as specifying the limits on the command-line for both commands. The server seemed to run just fine but I only connected to it and wandered around for a few minutes. I never did any sort of performance testing with more than one person.

If you've already got the Pi 3, give it a shot! Otherwise, if you were going to buy a Pi, maybe spring for the 4 since then you've got the extra overhead?

I recently got a Pi4 mainly to play with a flavor of Linux, which is an OS I have no real experience with.

So far I am using it as a Pi-hole DNS server. It's handy in that I now have an ad-blocker that manages it for all devices on my LAN, from a single point. That function doesn't even put a dent in the CPU/RAM load though. Next I may add a media server function once I pick up a USB 3.0 external drive or two.

Mixolyde wrote:

Do you think a Pi 3 is enough to run a minecraft server just for 2 or 3 local players?

I think you might run into RAM issues there, at least if your world got at all substantial. You'd probably prefer a 4G Pi 4. But, if you've already got the 3, you could try it, and if it's not working out, you can probably just upgrade to a 4 for about $75 or so, with the new power supply and new case.

I originally bought a Vilros kit for the RPI4, and I ended up being unhappy with the case. It was reasonably well built, but it had a huge hole in it to allow access to the GPIOs, so it let all kinds of dust in. It also had an absolutely terrible, noisy, cheap fan that eventually started to fail as soon as I ran it when it wasn't perfectly level.

I bought this replacement: GeeekPi Raspberry 4 case, and I've been very happy with it. It comes with a fairly standard 40mm fan, is nice and quiet, and works well. It's got a removable top with a little clearance on the sides, so you can pull the top off, plug wires into the GPIO pins, and then presumably put the top back on, letting the wires come out the slit along the top. It looks just big enough to let standard electronic-type wires out, but I haven't actually tried.

It has nice airflow, and with the Pi4 at near-idle, stays at a nice steady +18C over ambient. It's 25C in this room right now, and the Pi 4 is reporting 43C on both the CPU and chipset sensors.

edit: as Heretk is pointing out, with an external USB 3 enclosure, it could probably also be an acceptable media server. The 4 has a very great deal more bandwidth than the 3, so keeping Gigabit Ethernet fairly close to saturated, pulling a file from a hard drive, should be easily possible.

GeeekPi's got a much bigger enclosure that comes in several pieces, designed to hold a single SATA hard drive. It's pretty clever, it uses a little U-bridge that clips onto the 4's bottom USB3 port, and then sticks right back into the case again, attaching to a tiny USB->SATA circuit adapter. Then, at least if I understood the video correctly, you mount the drive upside down directly underneath the Pi, plugging into that board.

It's kind of expensive as Pi accessories go, as you have to buy each piece separately (each one has different functions), but it looks like a very good solution. Fully decked out, it ends up with a power control board that drives everything in the case, with a single input power plug and a front panel power switch, much like a very small PC case.

I have not, however, bought it myself, as I don't intend to attach a real hard drive to mine.

Can I have Home Assistant and Octoprint on the same Pi? I know they both have images built around them.

That can probably be done, but it doesn't look like Home Assistant is going very far out of their way to make it easy. In order to get a fully supported install, you have to use their card image, which means you had better really trust them. In looking at their install methods and caveats, I definitely wouldn't. It does not seem to me that your security is very high on their list of priorities, where their convenience most certainly is.

Once that image is running, then you might be able to use this set of instructions to add Octoprint to it. That's a fairly standard pip install of Octoprint in a local Python 2.7 environment. Whether it will work on the Home Assistant image, however, I don't know. You might need to add a base Python 2.7 to it.

Projects using Python 2.7 are somewhat risky, at this point, because it's no longer supported. Any further error or security fixes will not happen. The Python team has moved fully to version 3, and Octoprint staying back on 2 is a bad idea. (and the transition period was ten years, so it's not like the Octoprint team didn't know this was coming.)

Personally, I'd be looking for alternatives to both projects.

Oh cold gravy. Thanks.

I did more digging, and it looks like Octoprint will run under either 2.7 or 3.7, so they're staying on top of the security stuff. The instructions I linked are using Python 2.7 and implied that it was a requirement, but it isn't. You might even be able to use those exact instructions with Python 3... anywhere they say to install an OS "python" package, you might be able to substitute "python3" instead . I think the virtualenv and pip commands would work with either dialect without changes.

You could try just using those commands to add Octoprint to a HA image. It might just work. It could also require a fair bit of fiddling at the command line to try to fix it afterward.

A Pi 4 should be easily capable of running both packages at once, btw.

Very cool case for the Pi 4b here. Includes a board to reroute the HDMI and audio to the back of the case. Also moves the GPIO pins to the rear top of the case and includes a cover.

IMAGE(https://www.argon40.com/media/catalog/product/cache/01bd92052dc2a38e1c05a8994d8ff250/a/r/ar_one_pi4_01.jpg)

IMAGE(https://www.argon40.com/media/catalog/product/cache/d7d910e7f6926dd872bf6562e2701fb7/a/r/ar_one_pi4_03.jpg)

IMAGE(https://www.argon40.com/media/catalog/product/cache/d7d910e7f6926dd872bf6562e2701fb7/a/r/ar_one_pi4_06.jpg)

Looks like they have a version for the Pi 3b as well. Tempted to get one for mine.

Slicker and slicker

That is very slick, but they don't say what size fan it has. Having been burned by a truly awful fan in my first 4b case, I'd want to be sure this one is using a standard size, like a 40x10, so that replacing it would be easy.

I'm using this case, which is nowhere near as cool, but which has a nice quality fan, plenty of room, and costs $11. It comes with heatsinks, too.

I don't see it anymore on Amazon, but they also have a really slick multi-part case that comes in like three or four pieces. There's an external case with a power supply board that gives you a standard PC-style power button and power plug. Then it has some kind of internal board that runs cooling, pulling power from the case, not the Pi. I think it has a temperature sensor to know how fast to run its fan, but I'm not certain. And then there's another piece you can buy with a USB3->SATA adapter, so you can mount a 3.5" drive upside down, underneath the Pi, also pulling power from the case supply. One downside there is that they use a U-shaped connector to marry the bottom USB3 plug with the input on the upside-down board underneath, and it sticks out of the case slightly. I think it would be easy to knock it loose and damage it.

It's like $75 for all three parts, but ends up looking a lot like a very small PC, with the addition of the little U-bend USB3 protrusion. I think it's a little bigger than a NUC, but it was hard to tell from the video.

Except for the lack of a USB3 mount, I'd call this one better, for a third the price. The port and GPIO rerouting thing is pretty slick.