I've just had an update 3.18.5-1.gf378da4 from kernel_stable http://download.opensuse.org/repositories/Kernel:/stable/standard/ In there I find $ sudo lsinitrd /boot/initrd-3.18.5-1.gf378da4-default | grep hid lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-cherry.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat-isku.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat-arvo.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-belkin.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat-common.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-samsung.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/usbhid lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/usbhid/usbhid.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-ortek.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-logitech-dj.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-microsoft.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-apple.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-generic.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-holtek-kbd.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-ezkey.ko see What's with this "hid" stuff? When I run "lsmod" on the currently running kernel I don't see any of them. Have they somehow disappeared in the pivot? I've googled and read some stuff about Human Interface Devices, but its clear that they are not actually in my running kernel. So why do I need them in my (already bloated) initrd? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 3 Feb 2015 15:34, Anton Aylward <opensuse@...> wrote:
I've just had an update 3.18.5-1.gf378da4 from kernel_stable http://download.opensuse.org/repositories/Kernel:/stable/standard/
In there I find $ sudo lsinitrd /boot/initrd-3.18.5-1.gf378da4-default | grep hid lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-cherry.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat-isku.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat-arvo.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-belkin.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat-common.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-samsung.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/usbhid lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/usbhid/usbhid.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-roccat.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-ortek.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-logitech-dj.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-microsoft.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-apple.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-generic.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-holtek-kbd.ko lib/modules/3.18.5-1.gf378da4-default/kernel/drivers/hid/hid-ezkey.ko see
What's with this "hid" stuff? When I run "lsmod" on the currently running kernel I don't see any of them. Have they somehow disappeared in the pivot?
I've googled and read some stuff about Human Interface Devices, but its clear that they are not actually in my running kernel. So why do I need them in my (already bloated) initrd?
A keyboard or a mouse is a HID device. You NEED at least some of these drivers to use ANY keyboard or mouse at all: 1. the "hid/usbhid/usbhid.ko" to use a USB device, and 2. one of the "hid/hid-*.ko", accordingly to the model you have. But which one? At boot the kernel loads the ones it needs, and only these. During some point after the 2.6.x -> 3.x.x change the HID code was fully reorganised. What earlier was hidden else where in the code was now moved into one location and then extended. So, the main diff to earlier times is that you can now SEE what is loaded. But, how would the kernel / initrd know what you have? No, it goes the most secure way, and packs them all into the initrd. How big? Attention, "Backticks"! [code] du /lib/modules/`uname -r`/kernel/drivers/hid [/code] There you have it, most likely in Kilobytes. You want to reduce that? Have fun. Either you delete the un-used modules from your /lib/modules/`uname -r`/kernel/drivers/hid directory, or try to blacklist them (see /etc/modprobe.d/*blacklist.conf) Will that help? May be a 100th of a second, and a Megabyte at most. Look for more efficient methodes to reduce initrd, this one is more or less a "windmill". e.g. replaceing bash, mv, cp, rm, ln, ls, ... with busybox? sudo lsinitrd -l /boot/initrd-3.18.5-1.gf378da4-default |\ sort -k5 -n | grep -E ' (bin|usr/bin)/' - Yamaban. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/03/2015 10:05 AM, Yamaban wrote:
A keyboard or a mouse is a HID device. You NEED at least some of these drivers to use ANY keyboard or mouse at all:
1. the "hid/usbhid/usbhid.ko" to use a USB device, and 2. one of the "hid/hid-*.ko", accordingly to the model you have.
But which one? At boot the kernel loads the ones it needs, and only these.
That seems to contradict
But, how would the kernel / initrd know what you have? No, it goes the most secure way, and packs them all into the initrd.
You seem to be describing a kernel built to run anywhere, any hardware, any machine, and devices plugged in. That's not so. I have specific devices. I know what they are. * IBM SK-8815 keyboard * Logitek MX0510 mouse. Unless and until the break down and die I'll keep using them. I'm happy with them. This is my desktop. I'm not installing this kernel on any other machine, unless and until it breaks down. I keep the distribution kernel around for the situation in which things do break down and i have to boot into an alternative mode. I also have the distribution DVD with "rescue mode", and yes I have rebuilt kernels that way. This isn't about speeding things up by 100ths of a second. Its about bloat and things getting out of control and being forced to use the un-necessary. OK, so Linda takes it to an extreme, but she has a point that I can't argue with. Heck, some of those HID drvers seems just so way out .. I looked up roccat and it seemed to be to do with downloading code into the mouse! There's one for a IR controller, presumably of the kernel is running on a TV. According the kernel driver database, hid_microsoft adds support for Microsoft USB devices that are not compliant with the HID standard. Well Whoopeee! I'm nort running IR keyboard or a wireless keyboard. Why do I need those drivers? 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. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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. -- Per Jessen, Zürich (-2.3°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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 -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward 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?
AFAIK, one important difference between those two is that the desktop kernel has quite a few modules built in. I think I've got a bugreport open that touched on that (as an aside). -- Per Jessen, Zürich (0.1°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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.
participants (3)
-
Anton Aylward
-
Per Jessen
-
Yamaban