Bug 516230

Summary: too big!
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: clumens, harald, hdegoede, pjones, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-15 10:05:01 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 473303    

Description Bill Nottingham 2009-08-07 11:10:55 EDT
[notting@nostromo: ~]$ ls -l /boot/initrd-*generic*
-rw-r--r--. 1 root root 21203693 2009-08-03 13:13 /boot/initrd-generic-2.6.31-0.122.rc5.git2.fc12.x86_64.img
-rw-r--r--. 1 root root 21205726 2009-08-04 03:13 /boot/initrd-generic-2.6.31-0.125.rc5.git2.fc12.x86_64.img

And this is smaller than some I've seen reports of.

Just doing the math...

Any particular 'kernel' in total will be:

- 3MB (kernel)
- 2MB (System.map)
- 22MB (initrd-generic)
- 2MB (?) (initrd-custom-bits)

Round it off to a minimum of 30MB per kernel entry. We default to 3 kernels kept; since install happens before remove, we have to budget for the space for four kernels. That's 120MB.

Throw in the requirements of preupgrade; that's a new kernel, initrd, and stage2 image. Estimate about 150MB.

So, that's a total of 270MB for any /boot partition going forwards. That's a *minimum*, and yet it's higher than the current default, and the defaults we've had people install with that they'll be trying to upgrade.

How can we make things smaller to avoid this problem?
Comment 1 Harald Hoyer 2009-08-11 06:48:46 EDT
dracut-0.8 can produce the following variants:

- 18MB all
- 11MB non-network image
- 9.6MB non-network, no-plymouth

We could also try to limit the kernel modules.

What is the limit for the images?
Comment 2 Bill Nottingham 2009-08-11 11:03:33 EDT
I would suspect that a network/no-network split would be the simplest.
Comment 3 Harald Hoyer 2009-08-14 07:30:49 EDT
Ok, if I do the math:

4 kernels = ( 5MB + x ) * 4
preupgrade = 120 MB + ( 5MB + x )

total = 120MB + ( 5MB + x ) * 5 = 145MB + 5x

with a 200MB boot partition we have left:

200MB - 145MB = 55MB

that's 11MB maximum for the image.
Comment 4 Harald Hoyer 2009-08-14 07:32:38 EDT
I am now down to 16MB per generic image. So either we need:

145MB + 16MB * 5 = 220MB for /boot

or go with a non-network image.
Comment 5 Hans de Goede 2009-08-14 07:49:20 EDT
I vote for just making /boot bigger. Software grows over time, if we try to stay within the 200MB now, we will face problems in 1 - 3 releases anyways.
Comment 6 Harald Hoyer 2009-08-14 08:10:32 EDT
why is preupgrade == 120 MB???
Comment 7 Harald Hoyer 2009-08-14 09:26:00 EDT
on a sidenote /lib/udev/console_init is the only tool which needs libglib, which pulls in the ~1MB big library in the initrd.
Comment 8 Chris Lumens 2009-08-14 10:03:23 EDT
(In reply to comment #6)
> why is preupgrade == 120 MB???  

Because it's got to put the entire install.img onto the disk.  That's the stage2 environment for anaconda, which is pretty weighty.
Comment 9 Harald Hoyer 2009-09-15 10:05:01 EDT
we are down to 10MB-11MB per image, if dracut-network is not installed.