Red Hat Bugzilla – Bug 162687
adds gzip support if kernel modules are compressed by gzip
Last modified: 2008-02-11 20:17:09 EST
Description of problem:
one (like IPCop and www.efw.it) like to compress the kernel modules to save
space. this patch decompresses the modules during installing them in the initrd,
if the kernel modules are gzip'd.
previously i would like to copy them as they are and put gzip on the initrd, but
that is not possibly because it is not static linked.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
patch was needed for www.efw.it rc6 and has been developed by www.endian.it
Created attachment 116484 [details]
patch which adds gzip support
I'd love to see this implemented. On my FC5 installation it saves 74 MB per
flavour on the root disk and it even boots a little bit faster too (less than a
I did't know about Peter's patch so I'm posting mine too. (It only works if the
extension is left as '.ko', not '.ko.gz')
--- mkinitrd.orig 2006-04-24 11:25:55.000000000 +0200
+++ mkinitrd 2006-04-24 11:32:27.000000000 +0200
@@ -798,11 +798,14 @@
ln -s /sbin/nash $MNTIMAGE/sbin/modprobe
for MODULE in $MODULES; do
- if [ -x /usr/bin/strip ]; then
- /usr/bin/strip -g $verbose $MODULE -o $MNTIMAGE/lib/$(basename $MODULE)
+ if [ -x /usr/bin/gzip ] && /usr/bin/gzip -t $MODULE 2> /dev/null ; then
+ /usr/bin/gzip $verbose -d -c $MODULE > $MNTIMAGE/lib/$(basename $MODULE)
cp $verbose -a $MODULE $MNTIMAGE/lib
+ if [ -x /usr/bin/strip ]; then
+ /usr/bin/strip -g $verbose $MNTIMAGE/lib/$(basename $MODULE)
# mknod'ing the devices instead of copying them works both with and
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.
Fedora Core 3 is not maintained anymore.
Setting status to "INSUFFICIENT_DATA". If you can reproduce this bug in the
current Fedora release, please reopen this bug and assign it to the
corresponding Fedora version.