You are not logged in.
I'm trying to stripping kernel modules crazily (more than INSTALL_MOD_STRIP=1 does).
Because time to load them and time to boot is reduced a few second (even only for modules in initramfs with slow PCIE SSD).
Currently, I'm choosing sections to strip with amateur thoughts as below:
strip --strip-unneeded -R __bpf_raw_tp_map -R .BTF -R *trace* -R *printk* -R .orc_* -R *__mcount_loc* -R __ksymtab_gpl -R *__dyndbg -R __bug_table -R .note.* -R .comment /tmp/${modulename}.ko
readelf -SW /tmp/${modulename}.ko
#test
doas modprobe -r ${modulename};doas modprobe /tmp/${modulename}.koHowever, replacing system modules stripped by amateur is very deagerous, and stripping sometimes fail for some section for some modules unpredictable. Moreover, it breaks sign of modules, and prevent to boot with kernel lockdown mode.
The most safe method may building kernel without debugging with suitable configuration. But it needs knowledge for kernel.
Can we build debug data of kernel modules as a separated file such as btrfs.ko.debug.zst (in the very distant future) and reduce boot time keeping sign of modules and debug feature?
Last edited by oech3 (2025-04-09 11:59:09)
Offline
if I not import my zfs pool, disable network and only take the time from selecting the entry in grub to my system is fully up ready to login there's hardly any time to improve on
overall a modern computer is no game boy or c64 which ready in an instace
how many seconds are we talking about?
Offline
About 0.4 s down almost in (userspace) of systemd-analyze by replacing system modules with SSD TS0128F with environment 98 modules loaded at boot. It may worth for HDD,USB Drive or eMMC machine.
Currently, I use
--strip-unneeded -R .orc_* -R .note.* -R .comment.
Offline
The next release of pacman will enable this.
Offline
Oh, I didn't know CONFIG_DEBUG_INFO_SPLIT=y and I tested it. It does not seems split kernel specific section debug.
Where is the website about
The next release of pacman will enable this.
Offline
@Allan
https://gitlab.archlinux.org/archlinux/ … requests/3 seems splitting debug symbols from modules and compressing modules by makepkg.
Will size of modules be same with INSTALL_MOD_STRIP=--strip-unneeded instead of classical INSTALL_MOD_STRIP=1 without breaking sign?
Last edited by oech3 (2025-04-08 12:33:28)
Offline
Where is the website about
Allan wrote:The next release of pacman will enable this.
Upstream pacman development is at https://gitlab.archlinux.org/pacman/pacman
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I just wait until https://gitlab.archlinux.org/archlinux/ … requests/3 merged.
I close this. Thank you.
Offline