Linux Format

DRIVER FOOTPRINTS

-

Space (at least the space taken up by the kernel) on modern hardware shouldn’t be a concern. The compressed kernel image /boot/vmlinuz on our Pop!_OS system occupies a mere 11MB. And the accompanyi­ng modules, found in /lib/modules/5.15…/ occupies around 425MB. Any other Ubuntu-based system will have similar statistics (unless you’ve been tweaking things already). If half a gigabyte is important to you (which it might be on old hardware) then recompilin­g a leaner kernel (with only the required drivers) would be one way to achieve that. Naturally, that comes with the downside that if you ever acquire different hardware, it won’t work with the slimline kernel.

Further investigat­ing in the modules/ directory reveals that the network, media and GPU device drivers together occupy the most space (165MB). If you examine further you’ll see that AMDGPU is the largest graphics driver at around 20MB. Nouveau, the FOSS driver for Nvidia cards is by comparison a tiny 3.4MB. So axing whichever of these you don’t need is a start to slimming down your kernel.

Drivers on Linux are small, you might have noticed. Even AMDGPU is tiny compared to the equivalent massive (~450MB) download on Windows. The difference is that very little of that Windows package is ‘driver’. Most of it is firmware, oh and shiny but useless (if not outright annoying) gameware applicatio­ns. So in reality removing drivers one by one is a fairly thankless exercise (the kernel configurat­ion interface doesn’t make this easy either). It’s unlikely to liberate more than a couple of hundred megabytes. Of course, there’s plenty else to remove too, but again each component is small and sometimes much more critical than it sounds. So blindly removing swathes of them is likely to end you up with a broken, (but undeniably leaner) kernel.

 ?? ?? The kernel sources directory gets big once you start compiling. Here the Intel graphics bits are occupying half a gigabyte.
The kernel sources directory gets big once you start compiling. Here the Intel graphics bits are occupying half a gigabyte.

Newspapers in English

Newspapers from Australia