3 ms·
Does anything like this exist?: - A program to build a bootable Linux image from a config file, like NixOS - The image is tiny, like Alpine Linux - Support f
by mleonhard 6y ago
Does anything like this exist?:
- A program to build a bootable Linux image from a config file, like NixOS
- The image is tiny, like Alpine Linux
- Support for x86, Raspberry Pi, DigitalOcean, and EC2
There is a project to build bootable NixOOS images for Raspberry Pi [1], but it produces 2GB+ images. The iteration time to build + copy + boot is about 10 minutes. And the images are too large to easily distribute.
Packer [2] has some of these things, but it has to run on an actual EC2/DigitalOcean VM to produce images for them. That's a lot of extra config, potential for cost overruns from failed VM shutdowns, more secrets to manage, and more ACLs to maintain.
[1] https://github.com/Robertof/nixos-docker-sd-image-builder https://github.com/Robertof/nixos-docker-sd-image-builder
[2] https://www.packer.io https://www.packer.io
- ChiefOBrien 6y agoYou shold try out buildroot[1]. It's used for building a complete linux image for embedded systems so the result is quite small, efficient. There are several guides online on how to build for Raspberry Pi, might support cloud as well. [1] https://buildroot.org/ https://buildroot.org/
- mleonhard 6y agoThanks. Buildroot looks useful. The docs say to use a graphical program to configure it. The program edits a .config file which presumably could be code reviewed and checked into source control. Do you know of any open source projects that check in their buildroot .config file? Reviewing a generated config file has downsides. The file does not show the context associated with changes. Comments are either unsupported or easily destroyed by the editor. The file format may be confusing or may destroy blame info by putting many options on one line. The file format and how to use the graphical tool are extra chunks of knowledge that engineers must load and maintain. Buildroot is designed for folks making custom kernels. I don't need that. I want everything related to the hardware to just work. This includes automatically mounting attached network block devices on DigitalOcean & EC2 and configuring wifi on Raspberry Pi.