As I mentioned before I was looking for a Fedora equivalent of Debian’s debootstrap. The alternatives aren’t really great, so I wrote one instead. Allow me to present febootstrap, a close copy of debootstrap.
One advantage of febootstrap is that it can build new Fedora instances without needing to be root. I use fakeroot and fakechroot to achieve this. These allow you to run commands so that they “think” they’re running as root, when in fact they aren’t. They are frequently used tools in the Debian world, for example, for building and testing packages reproducibly.
$ febootstrap fedora-10 ./f10 $ ls -l ./f10/ total 1096 drwxr-xr-x 2 rjones rjones 4096 2009-03-19 18:38 bin drwxr-xr-x 2 rjones rjones 4096 2008-09-06 11:13 boot drwxr-xr-x 4 rjones rjones 4096 2008-09-06 11:13 dev drwxr-xr-x 14 rjones rjones 4096 2009-03-19 18:38 etc -rw-rw-r-- 1 rjones rjones 231038 2009-03-19 18:38 fakeroot.log [&c .. note the owner/perms will be correct in the initrd.img] $ febootstrap-to-initramfs ./f10 > initrd.img $ febootstrap --groupinstall="Mail Server" fedora-10 ./mailserver $ febootstrap-to-initramfs ./mailserver > initrd.img
The next step is to work on minimizing those filesystems. At the moment, a “minimal” Fedora install, by which I mean only bash and coreutils and their dependencies, is a shocking 233 MB. If I write that to an initrd image, then that means 233 MB of real RAM is consumed before we even start running the kernel or any programs! Particularly for virtualized environments, this is a real problem. I plan a minimization tool which can strip out anything except the binaries, libraries and other files that are really needed.
(Please note if you really try this, you will certainly need to apply the patch to fakechroot, which can be found in the tarball. That patch is not optional).