Bug 788462

Summary: dracut creates unnecessarily large initramfs files
Product: Red Hat Enterprise Linux 6 Reporter: Trevor Hemsley <trevor.hemsley>
Component: dracutAssignee: dracut-maint
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: harald, pasteur
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-08 17:05:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Trevor Hemsley 2012-02-08 09:14:01 UTC
Description of problem:
Since the replacement of mkinitrd with dracut in 6.2, initramfs files created automatically seem to have tripled in size for the same hardware. In RHEL5 and previous releases, mkinitrd built an initrd that was customised for this particular machine. In 6.x it seems the opposite approach has been taken and the initramfs that is built contains modules for hardware that is not present.

Version-Release number of selected component (if applicable):
dracut-004-256.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install a new kernel, examine the initramfs created
2. Change /etc/dracut.conf to hostonly="yes"
3. Reinstall same kernel
4. See newly created initramfs is now approximately 1/3rd the size it was before but still functions perfectly for this hardware
  
Actual results:
On a Dell m610 blade, the initramfs created by default install is 23MB. With hostonly="yes" this drops to 5.5MB.

Expected results:
Smaller files, faster kernel install times, faster boot times.

Additional info:
This not only uses extra disk space in /boot - so 23MB + 4MB for the kernel and 2MB for the System map is close to 30MB per kernel and with a default installonly limit of 5 that takes us to 150MB used. It also means that a kernel install takes much longer than it ought because this huge file has to be created, written and compressed and also the inverse, during boot it has to be read, uncompressed and written out thus extending boot times unnecessarily.

Suggestion: hostonly="yes" should be made default to better emulate RHEL5 and previous releases. Those sysadmins that require to generate a multi-machine initramfs are better qualified to change the default from hostonly="yes" to no than the majority of users. In addition... why is it /etc/dracut.conf and not /etc/sysconfig/dracut to fit in with existing standard file locations?

Comment 3 Harald Hoyer 2012-02-08 17:05:54 UTC
Suggestion rejected for RHEL-6. It should be the way it is now.
If you set hostonly="yes", you opt out of hardware compatibility and it is your own risk, if you change devices, which need other drivers for the boot process.