On Wed, 4 Feb 2015 13:18, Anton Aylward <opensuse@...> wrote:
On 02/04/2015 03:17 AM, Per Jessen wrote:
Anton Aylward wrote:
[snip]
Dracut, if I choose to upgrade to 13.2, which I’m not going to do for a while for a variety of reasons, seems to have the ability to exclude modules. I can't find an easy way to do that with the old mkinitrd.
I'm fairly certain dracut will only build even bigger initrds for you. I haven't been looking at it in any detail, just a gut feeling.
13.1 - desktop initrd ~= 22Mb. 13.2 - server initrd ~= 5.5Mb 10.3 - desktop initrd ~= 4.4Mb 11.4 - server initrd ~= 4.1Mb.
I suspect the enormous desktop initrd is due to graphics drivers.
I don't know.
This is 13.1 and I have 24M Feb 3 09:02 /boot/initrd-3.18.5-1.gf378da4-default 24M Feb 3 09:02 /boot/initrd-3.18.5-1.gf378da4-desktop
So. What's in one and not the other?
# lsinitrd initrd-3.18.5-1.gf378da4-default >/tmp/initrd.server.txt # lsinitrd initrd-3.18.5-1.gf378da4-desktop >/tmp/initrd.desktop.txt
Then, after taking out the '-desktop' and '-default'
# diff /tmp/initrd.desktop.txt /tmp/initrd.server.txt 52a53,56
lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/core lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/core/usbcore.ko lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/common lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/common/usb-common.ko 54a59,62 lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/host/uhci-hcd.ko lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/host/ehci-pci.ko lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/host/ohci-hcd.ko lib/modules/3.18.5-1.gf378da4/kernel/drivers/usb/host/ehci-hcd.ko 81a90 lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/hid-cherry.ko 83a93 lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/hid-belkin.ko 85a96,97 lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/usbhid lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/usbhid/usbhid.ko 88a101,103 lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/hid-microsoft.ko lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/hid-apple.ko lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/hid-generic.ko 89a105 lib/modules/3.18.5-1.gf378da4/kernel/drivers/hid/hid-ezkey.ko
Hmm. It seems that the server actually has more in it! But its back to those HID modules that never do get used.
The "24M" was touring, the actual numbers are
24889235 initrd-3.18.5-1.gf378da4-default 24609273 initrd-3.18.5-1.gf378da4-desktop
The tool "lsinitrd" has the "-l" option that behaves similar to "ls -l" do the same test with "lsinitrd -l <initrd-file>" again and have a look at the file sizes, or even sort them for size with "sort -k5 -n <infile >outfile" for me on 12.3 (hello upgrade), the big fishes aka top 20 in size are: lib64/libreadline.so.6.2 usr/lib64/libcups.so.2 usr/lib64/libpcre.so.1.0.1 lib/modules/3.7.10-1.45-default/kernel/drivers/usb/core/usbcore.ko usr/sbin/btrfs usr/sbin/btrfschk lib64/libssl.so.1.0.0 lib/modules/3.7.10-1.40-default/kernel/drivers/gpu/drm/drm.ko usr/lib64/libgcrypt.so.11.8.3 bin/bash etc/services usr/lib64/libkrb5.so.3.3 usr/lib64/libstdc++.so.6.0.17 usr/lib64/libglib-2.0.so.0.3400.3 lib64/libm-2.17.so usr/lib64/libdirectfb-1.6.so.0.2.0 lib/modules/3.7.10-1.45-default/kernel/fs/btrfs/btrfs.ko lib/modules/3.7.10-1.45-default/kernel/drivers/gpu/drm/nouveau/nouveau.ko lib64/libcrypto.so.1.0.0 lib64/libc-2.17.so these are 17.207.907 bytes of 27.108.864 bytes (10.940.523 gziped) I'm asking myself, why the hell is cups (and thus kerberos) in there? How do I remove that unused ssl/crypto/gcrypt stuff? The whole hid stuff is mere dust on the road compared to that rockfall. This is why I spoke of windmills with the hid stuff, the real meat is elsewhere, and much more useless for the boot prior mounting the disks. Yes, that was handled better in the past. OSS 11.4 hat neither btrfs (3.716.221 bytes in 12.3) cups/krb/ssl (1.959.768 bytes in 12.3) So, just these two causes are resp. for nearly 5MB unpacked initrd, compared to earlier OSS releases. For my next install / upgrade I'm thinking about dropping btrfs for ext4. It makes no speed/cpu usage diff on my system, and I do not need snapshots. At the issue of cups in initrd, have a look at yours, and if it is there, too, maybe rise a bug, that should NOT be in the initrd. - Yamaban.