You are not logged in.
Hi,
I am genuinely curious as to why this happens. I use a custom kernel alongside the official linux package. Somehow, my custom kernel's initramfs images are 2 times bigger than the official kernel ones despite the custom one being smaller in every way. Does anyone know why this is the case? For the record, I use the same mkinitcpio configuration for both kernels.
Last edited by fire100265 (2020-12-26 11:53:42)
Offline
despite the custom one being smaller in every way
Is it?
Did you compare the size of the kernel modules you add to the initramfs?
Online
Yes I did. I checked /lib/modules and the official one is much bigger.
Offline
That doesn't really answer the question, neither your initramfs nor the official kernels initramfs should include all modules but just the ones necessary for booting.
Offline
I know about that. The custom kernel's initramfs is very close to the size of its fallback image. About 3MB off. I don't know why this is the case.
Last edited by fire100265 (2020-12-26 11:27:22)
Offline
Did you compare the size of the kernel modules you add to the initramfs?
Hint: debug symbols…
Last edited by seth (2020-12-26 11:32:38)
Online
Now that you mention it, I found these lines in .config:
CONFIG_DEBUG_KERNEL=y
CONFIG_UNUSED_SYMBOLS=yIs this the reason?
Offline
Maybe. Maybe not.
Did you compare the size of the kernel modules you add to the initramfs?
Online
I think I got the answer. The problem was those 2 lines in my previous reply and the module sizes. The modules are bigger in my custom kernel than in the Arch one. Am I right?
Offline
If the modules are bigger that that's the most likely cause of your bigger initramfs and the most likely cause for that is that you've debugging enabled.
You should™ have gotten a prompt for this during the configuration, though…
https://cateee.net/lkddb/web-lkddb/DEBUG_KERNEL.html
https://cateee.net/lkddb/web-lkddb/UNUSED_SYMBOLS.html
Now you need to decide which options you want/need.
Online
Thank you. I didn't get a prompt for disabling symbols and debugging when making .config. I'll mark the thread as Solved now.
Offline