Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
cruft
Oct 25, 2007

Klyith posted:

SD cards can get super-hosed by power loss during a write.

[nice nutshell explanation of why removed]

That was a super helpful post, thanks for learnin' us.

BRB gotta go track down whatever's still writing to / on my homelab server.

Adbot
ADBOT LOVES YOU

cruft
Oct 25, 2007

Klyith posted:

It can leave chunks of flash in busted non-repairable states that the controller can't handle or even detect.

Follow-up question, if anybody knows: it was my understanding that the SD card interface is SPI. Like, 4 pins, straight up, just SPI.

Assuming I'm working on good information, is it typical in a SBC like a Raspberry Pi to have a dedicated controller chip, maybe with an interface to the system bus? Or do they just run 4 traces directly into the SPI pins on the CPU?

Splode
Jun 18, 2013

put some clothes on you little freak

cruft posted:

Follow-up question, if anybody knows: it was my understanding that the SD card interface is SPI. Like, 4 pins, straight up, just SPI.

Assuming I'm working on good information, is it typical in a SBC like a Raspberry Pi to have a dedicated controller chip, maybe with an interface to the system bus? Or do they just run 4 traces directly into the SPI pins on the CPU?

You can interface with an SD card with SPI, but you use a full SDIO bus if you want to interface with it properly

Generally this bus comes straight out of the CPU, sometimes you might have some ESD protection and/or level shifting in between.

Splode fucked around with this message at 19:23 on Mar 7, 2023

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
SPI is like a back up communication method that you have to do special commands to get going.

AlternateAccount
Apr 25, 2005
FYGM
Is there anything fancier/better than SD besides just booting from a USB3 stick instead?

Thanks Ants
May 21, 2004

#essereFerrari


https://thepihut.com/products/raspikey-plug-and-play-emmc-module-for-raspberry-pi

Inept
Jul 8, 2003


For that much you can just buy 256gb nvme drive and an enclosure though

Blue Footed Booby
Oct 4, 2006

got those happy feet

AlternateAccount posted:

Is there anything fancier/better than SD besides just booting from a USB3 stick instead?

You can also use USB to a SATA SSD you happen to have lying around.

Eletriarnation
Apr 6, 2005

People don't appreciate the substance of things...
objects in space.


Oven Wrangler
If you do have an SD card that seems to have been irretrievably corrupted, try the SD Association's formatter on it before throwing it out: https://www.sdcard.org/downloads/formatter/

I have had it restore cards and flash drives to normal operation (at least, as far as I could tell) when neither Windows' diskpart or fdisk was able to work with them.

Klyith
Aug 3, 2007

GBS Pledge Week

AlternateAccount posted:

Is there anything fancier/better than SD besides just booting from a USB3 stick instead?

To be clear, I've had a pi running the same SD card for years through a fair number of power outages and it's not been a problem. Though my pi is a music box and git repo so it doesn't write much.



IMO the sane way to handle the fragile nature of SD cards is to be aware of the problem and make a backup image of your card if you have setup or customization that was any effort.

And if you need a reliable, fault-tolerant machine that can constantly write to storage, the correct answer isn't a pi with extra accessories, it's a real computer.

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.
I want to convert all our Pis to read only file system on the SD card but it's not currently my main task more of a "nice to do, someday" or something to put a co-op on if we ever hire one

cruft
Oct 25, 2007

priznat posted:

I want to convert all our Pis to read only file system on the SD card but it's not currently my main task more of a "nice to do, someday" or something to put a co-op on if we ever hire one

One time I tried to get flatcar container linux running on a pi, but I ran out of fucks to give after hour 8.

Is there an out-of-the-box distro for RPi that has a read-only /? I only really need systemd-networkd and docker.

cruft
Oct 25, 2007

cruft posted:

Is there an out-of-the-box distro for RPi that has a read-only /? I only really need systemd-networkd and docker.

Here's what I've found:

  • Alpine Linux using this guide
  • Flatcar Container Linux using this guide (I failed to get it working)
  • Fedora CoreOS (guide)
  • Fedora Silverblue (homepage: this may have been obviated by Fedora CoreOS)
  • OpenSUSE MicroOS (home)
  • NixOS (home)
  • GNU Guix (home: seems like a desktop distro)

I'd use Flatcar if I could--I like it a lot--but after a Saturday morning I wasn't able to get it to boot.

I've used Fedora CoreOS at work and freaking hated it: one of my co-workers calls it "Fecos" now to express disdain.

I have a high regard for Alpine: I actually based my own specialty embedded Linux distribution off of some concepts Alpine pioneered. This might be a good way for me to go.

MicroOS looks intriguing. CoreOS used to be The poo poo for container OS. Then Red Hat bought them and almost overnight it changed to some weird ostree bonkers thing that now needs rpm somehow, so a fork sprung up called Flatcar that was the original CoreOS. Then Microsoft bought Flatcar. So I guess MicroOS is openSUSE's offering of the same basic idea, so they can stay in the game. I'm not crazy about it using NetworkManager, and I'm not positive "we use btrfs snapshots a lot" is the read-only / I'm after, but I need to read more, because it also says it's not altered during runtime.

I've played with NixOS before. It feels a lot like a research OS, where they invented a bunch of stuff that didn't exist at the time, and now there are better alternatives. Having to learn the "nix" tool seems like maybe something I don't want to invest time in.

GNU Guix looks like a desktop distro.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
You're just making up syllables now, I'm pretty sure

sb hermit
Dec 13, 2016





cruft posted:

Here's what I've found:

  • Alpine Linux using this guide
  • Flatcar Container Linux using this guide (I failed to get it working)
  • Fedora CoreOS (guide)
  • Fedora Silverblue (homepage: this may have been obviated by Fedora CoreOS)
  • OpenSUSE MicroOS (home)
  • NixOS (home)
  • GNU Guix (home: seems like a desktop distro)

I'd use Flatcar if I could--I like it a lot--but after a Saturday morning I wasn't able to get it to boot.

I've used Fedora CoreOS at work and freaking hated it: one of my co-workers calls it "Fecos" now to express disdain.

I have a high regard for Alpine: I actually based my own specialty embedded Linux distribution off of some concepts Alpine pioneered. This might be a good way for me to go.

MicroOS looks intriguing. CoreOS used to be The poo poo for container OS. Then Red Hat bought them and almost overnight it changed to some weird ostree bonkers thing that now needs rpm somehow, so a fork sprung up called Flatcar that was the original CoreOS. Then Microsoft bought Flatcar. So I guess MicroOS is openSUSE's offering of the same basic idea, so they can stay in the game. I'm not crazy about it using NetworkManager, and I'm not positive "we use btrfs snapshots a lot" is the read-only / I'm after, but I need to read more, because it also says it's not altered during runtime.

I've played with NixOS before. It feels a lot like a research OS, where they invented a bunch of stuff that didn't exist at the time, and now there are better alternatives. Having to learn the "nix" tool seems like maybe something I don't want to invest time in.

GNU Guix looks like a desktop distro.
:nice:, thanks for this!

I'm tempted to roll my own with buildroot/yocto but embedded linux can be a bit of a grind.

cruft
Oct 25, 2007

sb hermit posted:

:nice:, thanks for this!

I'm tempted to roll my own with buildroot/yocto but embedded linux can be a bit of a grind.

You might give openwrt a spin if you're thinking of this route. I should have listed it as another read-only / distro.

sb hermit
Dec 13, 2016





cruft posted:

You might give openwrt a spin if you're thinking of this route. I should have listed it as another read-only / distro.

I never saw it as a distro. Thanks!

Buck Turgidson
Feb 6, 2011

𓀬𓀠𓀟𓀡𓀢𓀣𓀤𓀥𓀞𓀬
Guix doesn't ship with proprietary software or firmware. You might struggle with the RPI4 if you go with that.

I've used both Alpine and NixOS, but I haven't tried Alpine set up with root read-only. Reading that guide it seems like a bit of work. I would rather go with Nix because it is set up to do this right out of the box. It's also had some changes to make it more user friendly in recent updates.

poverty goat
Feb 15, 2004



Instead of trying to diagnose my poo poo I just set up a fresh install of mainsail on USB and everything seems to be working nominally again :toot:

see you all again in a year if it breaks again

cruft
Oct 25, 2007

poverty goat posted:

Instead of trying to diagnose my poo poo I just set up a fresh install of mainsail on USB and everything seems to be working nominally again :toot:

see you all again in a year if it breaks again

LOL, you win, tuyop.

... for now

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

cruft posted:

LOL, you win, tuyop.

... for now

I was kind of hoping the op would image the card and share it so we could play with their software and see what’s up.

I know that’s not going to happen because of all the revealing info on a given install but still, the conversation would have been very informative for me at least!

poverty goat
Feb 15, 2004



cruft posted:

LOL, you win, tuyop.

... for now

honestly i probably spent more time and effort thinking and postng about fixing it than I did flashing the thumbdrive, installing 3 things and dropping printer.cfg into the webui

cruft
Oct 25, 2007

poverty goat posted:

honestly i probably spent more time and effort thinking and postng about fixing it than I did flashing the thumbdrive, installing 3 things and dropping printer.cfg into the webui

All right, fine. The winner is tuyop forever :eng99:

Sir Sidney Poitier
Aug 14, 2006

My favourite actor


I've got I think is a Pi from 2012, it's got a 4GB SD card in it, it all works fine. Say I want to get a bigger SD card, what do I need to worry about in terms of compatibility, if anything? Are newer variants compatible with older readers, provided they don't exceed a given size?

Klyith
Aug 3, 2007

GBS Pledge Week

Sir Sidney Poitier posted:

I've got I think is a Pi from 2012, it's got a 4GB SD card in it, it all works fine. Say I want to get a bigger SD card, what do I need to worry about in terms of compatibility, if anything? Are newer variants compatible with older readers, provided they don't exceed a given size?

Official max size for Pi 1-3 is apparently 32gb, but from what I can see that is mostly based on the boot partition supporting FAT only and early Pi OS installers not being great at dealing with larger storage.

I've used two different 64gb cards with my 3 and not had problems, or even been aware that I was using higher than supported size. I think most image-based distros now go with a "start small, expand after installation" that doesn't break compatibility.

MikusR
Jan 5, 2008

Sir Sidney Poitier posted:

I've got I think is a Pi from 2012, it's got a 4GB SD card in it, it all works fine. Say I want to get a bigger SD card, what do I need to worry about in terms of compatibility, if anything? Are newer variants compatible with older readers, provided they don't exceed a given size?

Even on the rpi1 you can move the system to an usb stick/drive. And use the sd only to kickstart boot.

Talorat
Sep 18, 2007

Hahaha! Aw come on, I can't tell you everything right away! That would make for a boring story, don't you think?
Is there a list of cool projects for pis anywhere? I’m thinking about setting up a pihole but using an entire Orange Pi 3 LTS for it seems overkill, I was wondering if there were other services it would make sense to collocate on the same server

spiny
May 20, 2004

round and round and round
Is anyone else here using a Pi for terrarium related projects?

I've been given (and told to fix) an old 'BioPod' setup whcih was some sort of automated enclosure with an app you could tell it what you were putting in it and it would set temp etc.

All the sensors are dead, but the enclosure itself is sensibly built with lots of options for water pipes and stuff, so I did a search and found TerrariumPi ( https://theyosh.github.io/TerrariumPI/ ) and have been fiddling with it for a few weeks.

I currently have an old Pi3 with a relay board and a temp sensor (a '1 wire' sensor). The software triggers the relays, so I have lights on timers, a mist pump on a timer and a heat mat that regulates the temp by using the temp sensor.

My Q is what humidity sensors are reasonably easy to use, the Terrarium software has a list that it supports, but just asking if anyone here has used a partucular unti that is easy to add to the Pi ( https://theyosh.github.io/TerrariumPI/hardware/ )

This is my current janky setup, if anyone is interested :)

prototyping layout, once I figure out where everything needs to go, it'll be condensed down so it firts in the tray the original controller board used to live in



pipes and such, the tank can have about 30mm of water depth and has inlets for pumps / filters etc. I'm going to be using this to have some ferns in it.



current inhabitants - some plants I brought from home, just to soak up some of the water the mister sprays in.

Vaporware
May 22, 2004

Still not here yet.
Managed to kill my CM4 install by power cycling during an update. It would boot, just couldn't find the OS. I could have untangled it I suppose, but it was only like and hour to get it back up with most of the special snowflake drivers that SEEED Reterminals use. Oh well glad I didn't work too hard on the stuff in there. If I do the RPIBoot and mount it as a device i can dump/image the whole eMMC right?

Cockmaster
Feb 24, 2002
I've been looking for a Raspberry Pi 4B that's not bundled with crap I don't need or marked up by some rear end in a top hat scalper, and I noticed that Newark is taking preorders with stock expected in late April:

https://www.newark.com

Hadlock
Nov 9, 2004

Klyith posted:

To be clear, I've had a pi running the same SD card for years through a fair number of power outages and it's not been a problem.

This has been my experience as well

DerekSmartymans
Feb 14, 2005

The
Copacetic
Ascetic

Hadlock posted:

This has been my experience as well

:same:

Chilled Milk
Jun 22, 2003

No one here is alone,
satellites in every home
It happened to me twice within maybe 6 months of each other, out of however many years it's been since the 3b. I was much more prepared the second time. That was also when I switched over to Fedora IoT (CoreOS/Silverblue for little guys) and it's been solid the last few years. There's probably more stuff I could do to minimize writes but, yeah pretty low priority when it's already easily reproducible.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I've been looking for this link again for years:

https://www.bunniestudios.com/blog/?page_id=1022


SD cards are poo poo, don't even trust ones you think are real (because they may not be)

xzzy
Mar 5, 2009

Even the good brands cheat a bit. I wouldn't go so far as to say it's deliberate deception, just that they make a product to a given specification and when they start modifying the product the performance can change. The creator of the Dirtywave M8 (a teensy based handheld synth tracker) is super picky about which cards work because of inconsistent read or write speeds.

Like an official SanDisk 32gb? Great. The 64gb or 128gb models? Will see performance problems because of read speeds.

spiny
May 20, 2004

round and round and round

ante posted:

I've been looking for this link again for years:

https://www.bunniestudios.com/blog/?page_id=1022


SD cards are poo poo, don't even trust ones you think are real (because they may not be)

This was a good read, cheers.

Roundboy
Oct 21, 2008
Public PSA that an orange pi 3 lts was easy and cheap to get, and has so far been a drop in replacement for everything I ever needed it for.

AlternateNu
May 5, 2005

ドーナツダメ!
So, I'm a complete newbie when it comes to SBCs, but my job has us tinkering with some IoT projects and Rpis are one of our options. (The other being Arduinos.) But I'm coming into this without a Linux or Python background. (A bit of C++ but that's it.)

So, I guess what I'm asking is what are some good beginners resources for manipulating/programming an SBC, and what are some good basic test projects to get used to the interface/hardware (or repositories for community tested generically useful programs)? I'm interested in pi-hole and retropi coming from a retro console modding kick, but I'm not a software guy by any means. So, I'm a bit out of my depth.

Edit: I was able to get my hands on a CrowPi set up, which seems like a good starting point. But instruction would still be useful.

Talorat
Sep 18, 2007

Hahaha! Aw come on, I can't tell you everything right away! That would make for a boring story, don't you think?

Roundboy posted:

Public PSA that an orange pi 3 lts was easy and cheap to get, and has so far been a drop in replacement for everything I ever needed it for.

I’ve been using these as well! Had a little trouble getting the right armbian versions for Wi-Fi to work (you need to use the bullseye version not jammy) but otherwise works great! I have one acting as a Spotify connect daemon hooked to my speakers so I can cast music to them.

Adbot
ADBOT LOVES YOU

cruft
Oct 25, 2007

AlternateNu posted:

So, I'm a complete newbie when it comes to SBCs, but my job has us tinkering with some IoT projects and Rpis are one of our options. (The other being Arduinos.) But I'm coming into this without a Linux or Python background. (A bit of C++ but that's it.)

Given this background, my advice is to go with Arduino. You're going to have enough new stuff with that, there's no need to throw learning a new language *and* operating system on top. I'm in the Arduino thread too (as are many of us) and am happy to help you out there :)

However, if you're set on Raspberry Pi, I think a good starter project would be to install Raspbian, fire up Python, and get it to blink an LED. It's going to be a long road if you don't have anyone nearby to help you out, but we're here for you on the something is awful dot com forums!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply