David W Noon wrote:
> I have a working initramfs layout, but currently it is too large
> (>32MiB) for my /boot partition. The problem package is e2fsprogs, as
> it requires dynamic linkage and, consequently, a full-sized glibc.
> This sucks, so I need to patch the Makefile(s) to build a more sensible
> set of executables for an initramfs.
>
> All of the code I have written myself compiles and links statically,
> typically using klibc, so my finished code is tiny.
>
> I haven't been working on this for a couple of months now, because the
> need for it is not really pressing. The assertion that udev would
> require /usr and /var (plus the kitchen sink) really soon is unfounded,
> at least for those of us who run more elderly hardware.
>
> Anyhow, when I'm finished there will be a zsh script that will build an
> initramfs image, and even install it to /boot, with a single command.
When I made my own initramfs I was operating under the "RAM and disk space
are cheap" assumption and did it the easiest way possible:
I included the *entirety* of /etc, /bin, /lib{32,64} and /sbin
Then I wrote a small bash script for /init
Throw the kernel and initramfs on a USB stick, install GRUB on said USB
stick and call it a day. If anything breaks, well I've got all the command
like repair tools included so it's no big deal to fix as long as the bash
script sends me to a command line if it has any problems.