SD card wear - remove the SD card?

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?

What am I missing?

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.

1 Like

I’m sure it has been mentioned previously.


Network booting is available on Raspberry Pi 3B, 3B+, and 2B v1.2 only.


highfive thumbsup

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

  tmpfs       /var/www/html tmpfs   nodev,nosuid,noexec,nodiratime,size=24M   0 0

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?

No, you started by asking about non SD Card booting - Net booting is quite a different thing.

Newer builds have moved that location

If you want to and know how to, yes.

Many thanks. Will do.

I’m not sure why you want to troll me with remarks like this, but I see you’re obviously right, no mention of net booting in my original post at all :stuck_out_tongue:

Thanks for the info.

Well I’d think that it’s simpler to move a data partition than move the root filesystem.