Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have to ask others, have people had good luck with this?

I have tried to do this multiple times, with multiple models of Pi and every time after 6ish months it just seems to completely stop working. I can't get it to boot even off of a new sd card.

Am I doing something wrong or does the hardware really not want to be run consistently in this manner?

I have since decided to just run some home automation VM's on my media server which has worked flawlessly (minus networking being weird sometimes).



Have had the same problems, though it's always the Pi chewing up the SD card, a new card solves it. These guides really need a warning saying "If you find this useful, switch to using a server that doesn't rely on an SD card after ~6 months"

The Pi is fantastic for getting a taste of self-hosting / home automation as it's so cheap but by no means should it be relied on.

I moved our Home Assistant install to a docker container on basic PC and it's been rock solid after several SD cards were eaten by the Pi. Though I still have DNS (via PiHole) running on a Pi and that's starting to act up.

Only time I've found Pis reliable is when they either don't write much or are running a read-only disk most of the time. We've a network audio player using piCorePlayer[1] on a Pi running for years and never had an issue, it's running tiny core linux and only makes the disk r/w when you're upgrading or changing settings.

I'm tempted to move my MQTT server to a Pi using tiny core as that'd keep messaging up while I'm rebooting or doing some other task on my single server. Something like http://akeil.net/posts/mosquitto-mqtt-on-tinycore.html

[1]: https://www.picoreplayer.org/


I have my PI running off a USB-SSD instead. It works very well, though initial set up can be a bit of a hassle.


I used to boot my fileserver (not a Pi) like that and it worked fine for a number of years until the USB-SATA adapter died. Not sure if you meant an actual purpose-built external SSD but I don't know that I'd trust a home-brewed solution in the long term.


If you dont mind, do you have some link to hand that you used to set that up?

Edit: - sorry, nevermind, I should have read the rest of the comments, there is a link below this comment (at time of writing)


I don’t see a link, so here’s the post I used: https://jamesachambers.com/new-raspberry-pi-4-bootloader-usb...

Make sure you use the right adapter, I got an enclosure at first that wasn’t on the list, and it ended up not working. I switched to the recommended StarTech 2.5″ and everything worked.


Thank you


Be sure to move /var/log and other write-heavy directories to a tmpfs so they're not constantly chewing up writes.

The long-term solution for this (if you're up for it) is to PXE boot from your fileserver, so you don't need a SD card at all.


I have a TV PI that seems to so far be running just fine after about 6 months. But I also have it reboot once a day so maybe that may be some magic.

I have PiHole running myself, my original plan was to use a Pi but the last thing I wanted for that thing to die and my internet stop working. An easy enough fix, but a frustrating one.

Mine is also running on the my media server. Which... is fun. When I reboot it I have to start things VM's in a certain order or things get really unhappy.

I agree that a warning like that should be in place, I am surprised though that a new card worked for you. I have a drawer of Pi's that I never managed to salvage.


Mix of things mean I haven't changed it (yet) - As you point out having on a shared server isn't great. I do want a separate device for DNS, I don't want the network down because the 'everything server' needs a reboot. - aand when it breaks I don't tend to be in the mood to fix it. Usually late in the evening when watching telly. It usually needs a reboot or `pihole-FTL.db` has gotten to several GB in size and needs deleting. But I'm sure it's getting closer to being unrecoverable.

I've also got it doing DHCP so every device gets a <hostname>.<network>.uk domain, plus it handles some static records as well. Means it's not just a quick swapout, need to find and migrate the custom stuff I've done to it. Most of this should be in a git repo but unsure if all of it is.

The joys of overcomplicating home networking!


It might be the Pi wearing out the SD card. The Raspberry Pi Compute Module 4 [1] actually has a PCIe Gen 2 x1 socket.

Jeff Geerling (who's active on HN) has actually gotten SATA working [2] through the Compute Module 4 and the Compute Module 4 IO Board [3].

If you go his route you could potentially set up a Pi with more durable storage. Although, if you watch Jeff's video its a PITA getting SATA working as he had to recompile the kernel with SATA support. Also its pretty hard to get the Compute Module 4 and the IO board at the moment.

[1]: https://www.raspberrypi.com/products/compute-module-4-io-boa...

[2]: https://www.youtube.com/watch?v=ZSx1BRwz1bs

[3]: https://www.raspberrypi.com/products/compute-module-4/


Alternatively you go PXE boot and network storage but then that assumes that you've got something else running to provide it. It's a nice solution when you've got half a dozen Pis around though (we use it in labs for our hardware test setups).


The new Home Assistant Yellow board even has a built-in M.2 M-key slot for NVMe storage; there are some other boards out there with built-in slots too (I especially like the BitPiRat I recently tested: https://pipci.jeffgeerling.com/boards_cm/mirkos-bitpirat-com...


I've got "TV Pis" that idle LibreELEC/Kodi most of the time and have been running for 4+ years on the same SD cards (updated them a couple times in that time, not recently).

My "server Pi" is >3yo old, only turns off when the power fails, and doesn't do a lot with its SD card but the OS, but has never had an issue.

What kind of power are you using? I've got these on little 2.5a wall warts; the "server" has a scrounged 20 year old PSU pulled from a Cisco 2500 router running it and some other stuff. No UPS tho and we get power outages and weirdness as usual for a rural area.


Maybe the power supply is the issue. Every time I have setup I pi I would get the Canakit sets so maybe it is just not suitable?


Make sure to check the USB cable you use. I have a few which has ~1 Ohm resistance, and given that the Pi can use 1-1.5A under load that translates to a 1-1.5V cable drop.

This can cause the Pi to shut down, and SD cards are not happy losing power while writing AFAIK.

I've had multiple Pi's run for years off the same SD card without issue. My Home Assistant install has a 3GB database with updates every few seconds due to some chatty Z-Wave modules. Been running just fine since 2018.

I also had a few with issues, and all of them were down to cables with too high resistance. Some were sold as charging cables, yet were rubbish.

I got a USB cable tester from AliExpress, alternatively buy some known good ones.

For SD cards, make sure they're class A1 or A2.

[1]: https://www.aliexpress.com/item/32973869742.html


Not only are SD cards not happy with losing power during writing, but they are very sensitive to "brownout" undervoltage conditions. In this case writes may appear to succeed but actually fail to commit, which is obviously problematic for the integrity of your data.

(if people were using a checksumming filesystem like ZFS, this of course would be immediately apparent when it was occurring!)

Samsung sells "high endurance" SD cards - I would strongly recommend these for RPi usage, and they are also very useful for dash cams since those are always continuously writing as well. Sandisk sells high-endurance cards as well but frankly Samsung is a cut above the rest of the SD card market - my SD card failures have essentially gone away since I stopped buying other brands. I think I have had one SD card failure since then and it wasn't related to write endurance, just didn't use it for a couple years and it was dead when I tried it again.

But yes, in general, power quality is a massive problem for RPis, and people don't really consider it because it's one of those "it works 99.9% of the time" situations. It's like a race condition that you only rarely ever hit, it looks correct and people will die on the hill of "it's worked perfectly fine for months now, the power can't be a problem" and then you hit a weak flash cell when the CPU is heavily loaded and the voltage is starting to droop and it happens to be a critical file rather than just some log or a chunk in an audiovisual file somewhere, and then you notice it.

I'd say >95% of all Pi failures come down to either power problems or SD card wearout. They're certainly not otherwise flawless, it's a janky cheapass SOC in general, but that is the overwhelming cause of Pi system failures.

If you can swing it, network booting from a fileserver is a much more reliable option in the long run. I haven't really experimented with it, and performance will probably be worse, but it gets the SD card out of the equation entirely, which mitigates both of these problems. You're not writing to flash, so brownout doesn't matter in terms of the potential for failed writes, and you aren't writing to a physical SD card so there's no wear.


On the Pi, run

  vcgencmd get_throttled
You're looking for a 0x0 result (not now and never under-volted nor throttled). The result is a bitfield. A script to turn them into human-readable format is here but I just look at the bits: https://gist.github.com/aallan/0b03f5dcc65756dde6045c6e96c26...


My wall warts are mostly from canakit sets, i can't complain about them.


For this kind of application, my own experience and others using home assistant seems to be your much better of plugging an SSD into the pi’s USB 3 and using that. It’s also really important to use a good power supply.


Bingo. Booting from an SSD is much better. Yeah it is a dongle dangling off the side of the Pi but it is much more reliable.


Pis are horrendously unreliable. Even if you pull out all the stops to make them work reliably (like disabling SD card writes), they don't.

The broadcom chips they use are complete garbage. I was hopeful I could use the watchdog timer to make a pi more reliable (by restarting it when it inevitably crashed). Guess what? The internal watchdog timer doesn't f*cking work! You'll notice that every project using pi hardware that needs a WDT uses an external one.

Total junk! I don't use them for anything anymore, and I used to have like 6 automating various things.


I played around with Pis a lot in the OG Pi 1B era and yeah, I got tired of fixing it every couple months (I attribute this to power quality and SD card failures) and just moved to using various x86 based systems. I used surplus SFF optiplexes from surplus sales (paid as little as $5 for some), AM1-based mITX (mobo+CPU for $50!), or Atom-based NUCs (used to get "surplus" J5005 NUCs with the plastic still on for $125).

I'm looking to get back into it with some Pi4s for a few things - but I'm planning to PXE boot this time around to try and sidestep the SD card/power problems. Basically just stuff like LibreElec to free up some of my J5005 NUCs for actual stuff.


I've used the internal watchdog without any issue. I mean the one you enable from systemd with RuntimeWatchdogSec=10 (where 10 iirc is a number less than 14 which is the number of seconds where the timer overflows). Not really much to configure or customize but it works reliably.


Interesting. Perhaps they fixed the driver/hardware since I last looked at this a couple years ago. At the time, no one had got it working successfully (the special device was there; it just didn't seem to do anything).


Modern Pis have effectively zero (pun intended) relationship to the original ones. The kernel issues were fixed, and as long as you keep them cool, you can go a long way even on SD cards.


I’ve had good luck running pi’s for years between (power fail) reboots.

One thing though - I don’t think any of my pi’s run x windows, I think they’re all console mode. I get the feeling that they do fewer writes in general this way, but I don’t really know. Anecdotally, I had a pi that ran x that I was experimenting with, and after a couple of months found it locked up/dead to the network. A reboot brought it back fine, but I unplugged it a few days after that and haven’t been using it.


I ran 20 pi's at work for years and had one failure. I've run my irrigation system off a pi for 4 years without a problem. I may be the anomaly and I don't live in Death Valley.

When you have an image that you're happy with, back it up. Using a USB<->SD card reader on a linux machine, run gparted to slim the image down to the minimum, then run something like this

    sudo dd if=/dev/sda of=my-pi-v1.img bs=1M count=7000 status=progress

Where `/dev/sda` is the sd card and `7000 `is the number of MB the pi disk takes after you gparted it down to the minimum size.

Next, flash the image on a new disk and make sure it works with the pi.


The only time I've bricked a Pi ever was when I shorted 5V and 3.3V rails in a 3B+. A friend always talks about one bricked with an apt upgrade by a broken firmware or something, never seen anything like that. Saw plenty of dead or corrupted sdcards but that can be fixed with a new one, which doesn't seem to be your case. Maybe a bad power supply? Pi is a bit picky, you need one with 5.1V to prevent low voltage warnings.


You have bad luck or are doing something wrong. I've had a Pi2 running for years and a Pi4 running since they were released in 2019. I had to replace a SD card once (and now am using a SATA SSD on a USB bridge instead). Otherwise, no hardware failures.

> I can't get it to boot even off of a new sd card.

Best guess: power adapter problems. Either the power adapter itself is dead or it misbehaved, killing the Pi.


I have 2 and they've been running for years on the same SD cards. Maybe power or cooling is an issue? Mine use reputable USB-C adapters (the official Raspberry Pi one just because it's small, but alternatively I'd go for an Apple or Anker one) and cases with a little heatsink you can stick onto the processor.


I'm with the others who have been running pi's for years with no issue. I did however go back into the office awhile back and stumbled across a pi display setup that had gone into read only at some point - most likely an sd card failure.

I would think if you want to take it up a step, you could look at something like an Intel NUC.


Yeah it's better to spend $80 or so on an off lease small form factor desktop. They don't really use that much more energy than a Pi but are much faster and more stable with real SATA storage.


It's super doable, especially if you store your root in a HDD partition. Using an USB flash drive would be the same as relying on a MicroSD, not the ideal for 24/7/365 usage




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: