Bug 162687 - adds gzip support if kernel modules are compressed by gzip
adds gzip support if kernel modules are compressed by gzip
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-07 13:24 EDT by Peter Warasin
Modified: 2008-02-11 20:17 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-11 20:17:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch which adds gzip support (2.48 KB, patch)
2005-07-07 13:24 EDT, Peter Warasin
no flags Details | Diff

  None (edit)
Description Peter Warasin 2005-07-07 13:24:14 EDT
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 13:24:14 EDT
Created attachment 116484 [details]
patch which adds gzip support
Comment 2 Martin Blom 2006-04-24 06:57:06 EDT
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 19:25:30 EDT
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-11 20:17:09 EST
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.

Note You need to log in before you can comment on or make changes to this bug.