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.

I got one of the Argon One cases for my 3b and i have to say it is very nice. Was super easy to put together and I like the way it integrates a multi-function power button into the case (it can be set to do multiple things with a press, short hold, long hold, and really long hold). The fan it comes with was a little loud with the default settings but once I installed and configured the fan settings a little bit it was much better. I didn't measure the fan but I think it would be easy to replace once you get the correct size. Was a impulse purchase seeing as I don't really need it.

I need to setup a few more things on my Pi to make it more useful than just using TriggerCMD to fire off Wake-On-LAN packets.

Has anyone here tried Steamlink on a Pi 4? I've tested a Pi 3 in the past, and it wasn't as smooth as I was hoping (on a wired network). Does the Pi 4 improve things a bit? For some reason I'm in the mood to do a stupid purchase this week, and a Pi 4 would probably do the trick.

I'm not sure how the client works on that. Is it the Steam binary, provided by Valve?

The RPi 4 had really bad video support when it first shipped; I believe the underlying chipset is fairly capable, but the hardware drivers weren't really working yet. Trying to watch, say, YouTube was almost impossible. Raspbian has been adding steady updates to a lot of video-related packages, so it might be better now, but it was atrocious a year ago.

I'd say it's pretty chancy unless someone explicitly tells you that it works well. The RPi 4 definitely has enough Ethernet bandwidth to handle even the highest-bitrate video connections, but video acceleration support will be critical. The CPU is much faster than on the 3, and is enough to be genuinely good for lots of basic applications, but it doesn't have the grunt to decode HD video in realtime. That's only gonna happen with a video chipset assist.

Thanks! I think I will order one and give it a shot. If it doesn't work, well, at least I can use the Pi4 to upgrade my file server, it would benefit greatly from the faster ethernet and faster USB ports...

Edit: ETA Prime (who usually does emulation videos) did one last year on YouTube about this very topic, and it seemed to work pretty well. Anyway, I went ahead and ordered one, it should be here some time next week. I went with the 8GB model.

Got the Raspberry Pi 4 tonight, flashed an SD card with the latest revision of Retropie, added the Steamlink app, ran a quick test over ethernet with Rise of the Tomb Raider, and it seemed to work pretty well! I will test more tomorrow and over the weekend.

The only problem I foresee is for games that I use Joy2Key for (like the original Tomb Raider that I replay once or twice a year), that doesn't seem to work, and I was never able to make the built-in Steam equivalent to work for some reason.

Edit: I assume nobody cares, but in case somebody does:

I ran some more tests tonight, with the main computer in my office and the Raspberry Pi 4 in the living room, being connected through powerline ethernet adapters (I'm in an apartment and don't have the luxury of being able to have ethernet outlets everywhere like I would like).

Some observations:

  • The network speed is actually sufficient for this to work much better than I anticipated. I again tried with Rise of the Tomb Raider and the framerate (to my untrained eye) felt consistent throughout.
  • Of the two computers I tried, my gaming laptop performed very well, with no lag whatsoever, and good video quality. (I think the video card in it is a GTX 1060, with an Intel i7 8th generation). My Alienware Alpha R2 (with a GTX 960 and a 6th generation i7) basically shat its (virtual) pants trying to keep up.
  • Steam Input for games that don't have native controller support actually works! I tried it with Tomb Raider 1996, and it worked like a charm.

I am somewhat optimistic that, for someone like me who likes to play PC games sitting on the couch but doesn't want to have a gaming computer underneath the TV, this might be an acceptable compromise (for 1080p gaming anyway).

Still a total Linux noob here.

I added an external WD 4TB SSD and Google-fu'ed my way into using a Samba share to set it up. Everything worked great, I could access the drive from all of my PCs, even my phone. Up until I had to reboot the Pi 4 and now the drive is not accessible. Is there a proper way to mount a drive in Raspian where it will auto-mount after a reboot?

How are you mounting it now? Usually it's something you'd write into /etc/fstab.

Kurrelgyre wrote:

How are you mounting it now? Usually it's something you'd write into /etc/fstab.

I just followed some directions from a web site via Google, which apparently I did not save. I Googled again the it looks mostly like the Samba section on this site - RP4 Samba sharing.

I do know it was a Samba share. I checked the /etc directory after the issue presented and I did not see a /fstab sub folder.

Assuming you're using the default Raspberry Pi OS, you might want to look at this article, specifically 'Setting up automatic mounting'.