←back to thread

518 points LorenDB | 1 comments | | HN request time: 0.262s | source
Show context
hiAndrewQuinn ◴[] No.46177153[source]
Tiny Core Linux has a version for Raspberry Pis called piCore [0] that I wish more people would look at, because it loads itself entirely into RAM and does not touch the SD card at all after that until and unless you explicitly tell it to.

Phenomenal for those low powered servers you just want to leave on and running some tiny batch of cronjobs [1] or something for months or years at a time without worrying too much about wear on the SD card itself rendering the whole installation moot.

This is actually how I have powered the backend data collection and processing for [2], as I wrote about in [3]. The end result is a static site built in Hugo but I was careful to pick parts I could safely leave to wheedle on their own for a long time.

[1]: https://til.andrew-quinn.me/posts/consider-the-cronslave/

[2]: https://hiandrewquinn.github.io/selkouutiset-archive/

[3]: https://til.andrew-quinn.me/posts/lessons-learned-from-2-yea...

replies(4): >>46177389 #>>46177624 #>>46177929 #>>46179999 #
1vuio0pswjnm7 ◴[] No.46177929[source]
"Tiny Core Linux has a version for Raspberry Pis called piCore [0] that I wish more people would look at, because it loads itself entirely into RAM and does not touch the SD card at all after that until and unless you explicitly tell it to."

Before RPI existed, I always made filesystem images for USB sticks in NetBSD so that writes never touched "disk" ("diskless"). This allows me to remove the USB stick after boot, freeing up the slot for something else

BSD "install images" work this way

I have been using the RPi with a diskless NetBSD image since around 2012; there are no SD card writes, the userland is extracted into RAM

I can pull out the SD card after boot and use the slot for something else

If I want data storage, I connect an external drive

It's been wild to read endless online complaints from so-called "technical" RPi users for the last 13 years about SD card wear and tear

To me, it's another example of how it's possible to have a solution that is as old as the hills and have it be completely ignored in favor of a "modern" approach that is fatally-flawed

replies(9): >>46178337 #>>46179450 #>>46179514 #>>46179756 #>>46179956 #>>46180002 #>>46180615 #>>46182584 #>>46184641 #
marttt ◴[] No.46179514[source]
What's the size of your "diskless" NetBSD installation, and how fast does it boot?

As compared to TC, the "out of the box" NetBSD images contain many things I wouldn't need, so customizing it has been a recurring thought, but oh well. The documentation and careful modularity is, obviously, a huge bonus of NetBSD in that regard (even an end-user like me could do some interesting modifications of the kernel solely by reading the manual). TC seems much more ad-hoc, but I assume this, too, is intentional, by design.

replies(2): >>46183182 #>>46188558 #
1. 1vuio0pswjnm7 ◴[] No.46188558[source]
In 2011, TCL was 10MB

Around that time the NetBSD kernels with embedded rootfs filesystem I was making were around 17MB

Today, TCL is 23MB

The NetBSD kernels with embedded rootfs I'm using today are around 33MB

That size can be reduced of course

I don't monitor the boot process on RPi with serial console, I only connect after tinysshd is running, so I don't pay close attention to boot speed. It's fast enough

TCL appears to be aimed at users that prefer a binary distribution; also it provides GUI by default

I prefer to compile from source and I only use textmode hence NetBSD is more suitable for me than TCL

For someone who does not want to compile anything from source, it is possible to "customise" (replace) the rootfs of a NetBSD install image with another rootfs. It is not documented anywhere that I'm aware of but I have done it many times

I use a very minimal userland. I guarantee few if any HN readers would be satisfied with it. If I need additional programs I either (a) mount an external drive and run the programs from external storage, e.g., via chroot, or (b) copy them from an external drive into mfs or tmpfs

It depends on how much RAM I have