Bug 162687

Summary: adds gzip support if kernel modules are compressed by gzip
Product: [Fedora] Fedora Reporter: Peter Warasin <peter>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED INSUFFICIENT_DATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: martin, mattdm
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-12 01:17:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch which adds gzip support none

Description Peter Warasin 2005-07-07 17:24:14 UTC
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):
4.1.18

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:

Expected results:


Additional info:
patch was needed for www.efw.it rc6 and has been developed by www.endian.it

Comment 1 Peter Warasin 2005-07-07 17:24:14 UTC
Created attachment 116484 [details]
patch which adds gzip support

Comment 2 Martin Blom 2006-04-24 10:57:06 UTC
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
second, though.)

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)
     else
        cp $verbose -a $MODULE $MNTIMAGE/lib
     fi
+    if [ -x /usr/bin/strip ]; then
+       /usr/bin/strip -g $verbose $MNTIMAGE/lib/$(basename $MODULE)
+    fi
 done

 # mknod'ing the devices instead of copying them works both with and

Comment 3 Matthew Miller 2006-07-10 23:25:30 UTC
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.

Thank you!


Comment 4 petrosyan 2008-02-12 01:17:09 UTC
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.