I know we’ve discussed techniques such as log2ram and issues like logrotate to death here, and all with the goal of reducing writes to the SD card in order to keep it working for longer.
So I was a bit surprised when I came across this yesterday:
which was posted over three years ago! I’m surprised nobody has mentioned it as a possible solution. If there’s no SD card, then it can’t wear out, right?
The article is about setting up a Pi to perform a network boot via the wired Ethernet port.
A boot server and a wired LAN connection are needed to be able to boot via this method.
The LAN connection is not an option for many users, and setting up a TFTP boot
server can be a hassle. Plus it’s another point of failure. If it dies, the Pi is unable to boot.
Yes, but my emonBase connects via wired Ethernet and there are PCs on the network. I can’t imagine I’m the only one in that situation. In fact I’d expect it to be very common, probably the majority?
Instead of going to the trouble of configuring a TFTP boot server, the downward trend in SSD cost
together with the fact the reliability is in multiple Terabytes written, makes an booting from
an SSD the way to go. (IMHO) No moving parts. Low heat output. Low power draw.
That sounds like a great solution. Are there any instructions for building an emonSD onto an SSD for RaspPi - I had a quick look but may have missed it? Possibly the SD part of emonSD is a clue so should I just start with Raspbian and load emoncms?
Actually, I think the way to go is to boot from an SD but have the rootfs on the SSD. I’ve just done this for a fresh Home Assistant setup based on DietPi (that has a tool for moving the rootfs). I then put the boot partition onto a smaller SD Card and recycled the 16GB one.
Probably the best way. Look for tutorials on moving the rootfs to the HDD/SSD.
though I am not sure how you have emoncms setup-- could you not do what openwrt does to reduce to utmost minimum ( one reason I like openwrt so much) . everything about the OS that has any form of writes is done on ramdrive - ie - /tmp and /var – the database is persistent… with openwrt at reboot it simply recreates /tmp ( empty) and /var ( rewrites the basic static files required) and other stuff via overlay of non essential data --very little writes to the SD or eMMC ever.
when I set up my kodi box on ubuntu I did the same to it ( or as close as I could). first i installed Zram-config to compress my ram so i have more of it . And since it has relative high volumes of writes to the html folder for weewx numerous files rewritten constantly… recreating the website over and over continuously … I set aside 24 megs of my ram just for websites
and whenever my device reboots it simply recreates the website into ram. reducing my SD writes to very very little only the persistent writes to the database . and every thing else is recreated at the next cycle pulling persistent data from database and recreating incidentals ( *.xml *.json , images … etc )
I know I started this topic by asking about net booting, but thinking about it now that seems pretty much irrelevant, no?
The point of considering it is to reduce the number of writes to the SD card (by eliminating the SD card in the net boot proposal), but actually almost the only writes should be to /home/pi/data, which is a separate partition, so isn’t the simplest solution just to assign that filesystem to a partition on an SSD or to an NFS-filesystem or whatever floats your boat?