Hi, guys.
I have implemented some changes that I think others may benefit from,
especially those running the initrd in RAM rather than disk-backed. They
reduce the size if the initrd.
1) Only kernel modules that are either
- In /etc/modprobe.conf
- Currently loaded
get copied into the initrd. I think this probably a reasonable
sub-selection of kernel modules to get the system up and running,
especially since all that is required to boot-strap the OSR will be
loaded by the time an OSR volume is prepared. This gets my compressed
initrd image from 50MB down to 40MB (uncompressed ~130MB).
2) Added a feature to the rpms.initrd.d parser. Now 2 filter parameters
are available. The new format is:
package +filter -filter
As such, it is fully backwards compatible with the existing rpm list
files. If only -filter is used, +filter should be "." (a single dot).
The reason for this is that grep's regex engine doesn't appear to have
support for negating an expression with !. Now the list is filtered through:
grep -e "+filter" | grep -v "-filter"
The latter is set to ^$ if it is not set, so it doesn't affect operation
when -filter is not specified.
This is useful because it means that additional control can be applied
to remove things like /usr/share/doc or /usr/share/man from the initrd,
which otherwise wouldn't be possible.
The net benefits are about 20-25MB of RAM (or disk space) used and
proportionately reduced initrd build time.
Attached are patches for:
/opt/atix/comoonics-bootimage/create-gfs-initrd-generic.sh
/opt/atix/comoonics-bootimage/boot-scripts/etc/chroot-lib.sh
The patches are against the comoonics-bootimage-1.3-28 release in the
yum repository.
These modifications have passed my "it works for me" testing (yes, I did
remember to wipe out /var/commonics/chroot before I tried the new
initrd), but peer review would be good. :-)
Is there any point in forwarding my modified
/etc/comoonics/rpms.initrd.d/* files? I didn't think so, but let me know
if anyone disagrees.
I hope this is useful.
Thanks for all your support, and for making this great product. :-)
Gordan
|