matthewbauer / nixiosk

Declarative Kiosk systems built with NixOS
MIT License
141 stars 12 forks source link

Feature Idea: netboot stage-2 for less SD card wear? #3

Open colemickens opened 4 years ago

colemickens commented 4 years ago

I'm happy to have found this. It replaces some of my recent work and removes a lot of what I had remaining to do.

One thing I was trying to work on was having a tiny bootloader SD card that downloaded and booted a stage-2 from the Internet.

Do you see value in this, and/or have any interest in including such a feature in this project?

matthewbauer commented 4 years ago

netboot could definitely be useful! I thought U-Boot might support some IPXE type thing.

I think there's also a lot of benefit in limiting the writes in other ways like:

On the other hand, I'm not completely convinced that reducing writes is all that necessary. My application is cheap, disposable systems, so having to replace the SD card every 3 years or so isn't terrible. Having everything in a git repo means you can mostly just get a new card and start over (of course losing any state on the SD card).

Another option would be to boot straight from a flash drive, which can probably handle more writes.

matthewbauer commented 3 years ago

I've added support for PXE via pixiecore. This uses x86_64 by default, and I'm not 100% sure how raspberry pi / ARM PXE works. But we can probably make some tweaks to let it send an RPI system as well.