5 ms·
I wouldn't bother with this. There is an excellent project named Buildroot for the exact purpose. There is also Yocto but it generates bigger images in their re
by serguzest 11y ago
I wouldn't bother with this. There is an excellent project named Buildroot for the exact purpose. There is also Yocto but it generates bigger images in their recommended configuration but you can always tweak it.
- eatonphil 11y agoSupermin[0] is another really cool tool that might be interesting. Though I still can't exactly tell if it's relevant. [0] http://people.redhat.com/~rjones/supermin http://people.redhat.com/~rjones/supermin
- voltagex_ 11y agoThese kinds of tools are very relevant when creating Docker base images - not all of us can afford to download 1.6GB just for Ruby. See the official Ruby baseimage vs Alpine + ruby package for example
- hoodoof 11y agoSupermin seems quite old. Perhaps an idea that has passed?
- rwmj 11y agoSupermin is actively developed. The last commit was 2 days ago. https://github.com/libguestfs/supermin/commits/master https://github.com/libguestfs/supermin/commits/master Having said that, it's not relevant to what the OP wants to do. libguestfs, however, is very relevant.
- rwmj 11y agoSupermin solves a narrow case: how to distribute an appliance [Linux-based OS disk image] as a very small download (typically 100K - 1MB). It works by observing that the end user already has the files they need as part of their host Linux OS (eg. /bin/bash, /lib/libc.so), and the distribution is just a skeleton of the disk image, which is "filled in" on the end user's machine by copying the host files in at the last second. So it's not really applicable here, although I understand people use supermin to build chroots for Docker (as the author of supermin, I wouldn't necessarily recommend doing that unless you understand the limitations). What is actually needed here is libguestfs, which is a pure userspace tool for building disk images that doesn't require root access and is built for scripting/automation and security. We have a tool built on top of libguestfs called virt-builder which specifically churns out minimal Linux distros very quickly. Sadly virt-builder can't build TinyCore Linux yet, although it probably should be extended to do that. It would be a lot simpler to use virt-builder, than to go through the tedious and dangerous steps outlined in the article. http://libguestfs.org/ http://libguestfs.org/ http://libguestfs.org/virt-builder.1.html http://libguestfs.org/virt-builder.1.html
- i336_ 11y agoUnrelated(ish), but thanks for mentioning libguestfs! I've been passively looking for the solution to the non-root filesystem access problem for a while. Also, PSA: this project has a program that can read and write Windows registry hives.
- voltagex_ 11y agoBuildroot can be quite intimidating to the newcomer - I had to ask many questions on IRC to get my build tree down to something I could share [1] [1]: https://github.com/voltagex/serial-vm-buildroot https://github.com/voltagex/serial-vm-buildroot
- homarp 11y agoA nice Yocto tutorial: http://free-electrons.com/doc/training/yocto/ http://free-electrons.com/doc/training/yocto/ A nice buildroot tutorial: http://free-electrons.com/doc/training/buildroot/ http://free-electrons.com/doc/training/buildroot/