On Sat, 2013-02-09 at 21:10 -0500, Will Woods wrote:
Since dracut dropped its slightly-too-clever trick to save a copy of
itself at /run/initramfs, we need to locate or save a copy of initramfs
so we can switch back into it and shut down properly.
So: first, check to see if we're running off media; if so, we can just
use the initramfs from the media. Easy!
Otherwise we need to save a copy. The anaconda initramfs (for current
F18-ish images on x86_64) uses about 96M RAM when unpacked, which is a
bit wasteful.
To save RAM we can filter out some stuff we don't need for shutdown:
* kernel modules: ~39M
* firmware: ~9M
* python: ~8M
* ssl certs: ~1M
* fsck binaries: ~1M
which leaves us with 38M of data. We can reduce this to 18M by gzipping
it, but that delays startup for 3s on my test system.
(Using xz would save 4.5M, but it takes 15s (!) and uses 100M RAM (!!).)
Using gzip -1 drops this to just over 1 second; RAM use goes up by 1M,
but that seems like a reasonable tradeoff.
If `pigz` is available, that gets used instead, which makes the delay
basically negligible on any modern multicore system.
These all look good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic