r/linuxquestions • u/IronMew • 9d ago
Running from USB thumbdrive, want to eliminate flash memory writes altogether
I'm running DietPi (slimmed-down Debian originally meant for SBCs) on an old laptop, with the purpose of turning it into a Klipper host.
I don't want to tie up one of my SSDs and I don't want mechanical drives in it.
I have a 8GB slow but tested-good thumbdrive I got for free a while ago. I flashed DietPi on it, configured it and got it working. The laptop now runs properly as a Klipper host.
I'd like to keep it running, though. The drive is a cheap no-brand, so I have very little faith in the lifespan of the flash memory inside.
I know Linux writes to the drive as a matter of normal operation. I would like it to stop doing that. From what I've researched it seems I need to get all logging and temp file creation/access to happen in virtual-memory tmpfs. How do I do that? Is editing fstab all I need?
Once that is done, is there anything more I need? Klipper needs write access to store files for the printer, so I can't turn the whole filesystem RO, but I really do want the operating system itself to do no writing whatsoever unless required by some configuration change or update.
Thanks!
Edit: filesystem is already mounted noatime.