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

Sadly it doesn’t seem to be able to fix the several SD cards killed by the raspberry pis I have.


Pro tip: Use a read only rootfs and use overlayfs to write any changes to ram instead of the SD. Then you just gotta put your state on a USB drive, network etc.


You can also mount /var/log as a tmpfs. Worked for the Debian based OS but not so well with Fedora (on an eMMC volume).


Likely worn out sectors. Sadly such products are easy in that they don't have a read only file system, but for the majority of users that would help. Maybe there should be a simple script called "finalize" that turns it read only


Didn't there use to be a physical read lock on SD cards?

I know "modern" cards have no space, but if it's important to you, you can still use the full size adapters which should (all?) have the physical lock. Super glue that in place...


There's a flag you can set electronically, to make the card read only, but if the OS isn't set up to support running from a read-only filesystem, setting the card to read only will make the OS crash. If the OS is set up for a read-only filesystem, it won't try to write to it, regardless of the flag.

Setting up Linux to run from a read only filesystem only takes a handful of commands, but having a tool to automate it would be nice.


Fun fact: SD write lock is just a switch wired to host controller, it doesn't actually prevent writing to the card.


The latest Pi OS writes all logs to RAM, which might change your experience.


SD cards do not make good SSDs. For Plan 9 I only put the kernel on the SD card and pull root from another source e.g. a file server via tcp/tls.




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

Search: