Red Hat Bugzilla – Bug 516230
Last modified: 2014-03-16 23:19:47 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?
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?
I would suspect that a network/no-network split would be the simplest.
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.
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.
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.
why is preupgrade == 120 MB???
on a sidenote /lib/udev/console_init is the only tool which needs libglib, which pulls in the ~1MB big library in the initrd.
(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.
we are down to 10MB-11MB per image, if dracut-network is not installed.