Re: removing modules
On Sat, Jul 03, 2021 at 05:50:44PM +0100, mick crane wrote:
> I looked because "apt upgrade" failed to install things in /boot
> because no room left. I deleted the oldest kernel stuff of the 3 there
> and "apt upgrade" worked.
Kernel is here:
$ du -sxh /boot/vmlinuz-5.10.0-0.bpo.7-amd64
6.5M /boot/vmlinuz-5.10.0-0.bpo.7-amd64
Modules are here:
$ du -sxh /lib/modules/5.10.0-0.bpo.7-amd64/
290M /lib/modules/5.10.0-0.bpo.7-amd64/
You must mean initrd, which contains selected kernel modules and is used
in the boot process:
$ du -sxh /boot/initrd.img-5.10.0-0.bpo.7-amd64
36M /boot/initrd.img-5.10.0-0.bpo.7-amd64
> I was thinking then to remove the unwanted modules to make the kernels smaller.
It does not work like this, no amount of modprobing or removing *ko
files would make an installed kernel smaller.
You could build your own kernel, of course, then things would be
different.
> If remove modules from kernel are the gone or are they still on disk and could be put back ?
Modprobe, insmod and rmmod merely change the state of the running
kernel (i.e. - in-memory).
What you probably want described at initramfs.conf(5), MODULES section.
Reco
Reply to: