archinstall icon indicating copy to clipboard operation
archinstall copied to clipboard

Add Linux Headers as part of base OS install

Open ghost opened this issue 1 year ago • 4 comments

Hey can you add a linux-headers package as a part of base OS install ? Linux headers are required when building a kernel modules with DKMS Lot of people are not avare that they need this package when compiling modules for apps like virtualbox or hardware drivers like nvidia linux-headers are not listed in most Arch Linux installation tuorials (Arch Wiki) https://archlinux.org/packages/core/x86_64/linux-headers/

DKMS optional dependency for linux-headers but can be installed later

ghost avatar Sep 16 '24 16:09 ghost

I don't think it is necessary, this will bloat the installations :( Also, I think if you select nvidia the installer pulls the necessary dkms packages, not sure tough....

spsf64 avatar Sep 17 '24 13:09 spsf64

dont think that kernel headers are something that will bloat system rather its something usefull on debian based distributions are kernel headers part of basic system install
of course it may not be needed everywhere but still having it installed with system wont hurt anyone

Nvidia drivers can be installed from two packages : nvidia (https://archlinux.org/packages/extra/x86_64/nvidia/) or nvidia-dkms (https://archlinux.org/packages/extra/x86_64/nvidia-dkms/) nvidia drivers will install but wont load and work without kernel headers dkms will complain about missing kernel headers and refuse to build kernel modules nvidia optimus requires also a special module to switch between graphics

ghost avatar Sep 17 '24 16:09 ghost

This would actually be a nice change, and no, installing nvida-dkms does not install linux-headers, rather the dkms installation will fail during mkinitcpio kernel modules build. If rebooted at this time, users will also end up with a broken install(in certain scenarios during a linux kernel upgrade).

With this in mind, the following command:

sudo pacman -Syyu nvidia-dkms

will fail without linux-headers present, and its possible that if a linux kernel upgrade is attempted during the initramfs generation, it will fail the build. To unaware users, the next reboot will end up borking the install. This is because during a kernel upgrade pacman will remove the previous initramfs from /boot.

At any rate, adding an essential like linux-headers would be a welcoming change in my opinion.

timmypidashev avatar Mar 26 '25 19:03 timmypidashev

The idea of Arch in general, is that simplicity is the winning strategy. And I don't believe we should install linux-headers preventively. Users who need the headers, know they need the headers. If not, they missed a very key instruction to whatever thing they're building.

We should only add this package when needed, for instance if we merge https://github.com/archlinux/archinstall/pull/3302

Torxed avatar Mar 29 '25 18:03 Torxed