Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236808

Re: removing modules

From The Wanderer <wanderer@fastmail.fm>
Newsgroups linux.debian.user
Subject Re: removing modules
Date 2021-07-03 19:10 +0200
Message-ID <CwRjs-74O-1@gated-at.bofh.it> (permalink)
References <CwQnn-6tT-3@gated-at.bofh.it> <CwQnn-6tT-1@gated-at.bofh.it> <CwQGJ-6Bk-3@gated-at.bofh.it> <CwRjs-74O-3@gated-at.bofh.it>
Organization This space intentionally left blank.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 2021-07-03 at 12:50, mick crane wrote:

> I did think that modules are for the kernel to interact with
> hardware. There is for example "dell_smm_hwmon" followed "0" which
> you'd think was to be used by software for monitoring the PC
> hardware.
> 
> I never used anything like that and wondered if there was some
> software that was installed that needed that module but I never used
> so it is "0" but if I used it it would change to "1".

No - the "0" means that there is nothing else which the kernel currently
knows A: is running and B: would fail if that module were not loaded.

The most likely reason for it to be installed is because you have
hardware which is capable of being managed by that module, and won't
work without that module. If you don't need to use the hardware, you
don't need the module and can probably safely remove it - but it's hard
to know which hardware components the various software you're running
may or may not be making use of.

> 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.

I hope you removed them by uninstalling their kernel packages, not by
just deleting the files from under /boot directly.

> I was thinking then to remove the unwanted modules to make the
> kernels smaller.

Kernel modules aren't actually stored inside the kernel on-disk. They're
normally found in a kernel-specific subdirectory underneath
/lib/modules/; the subdirectory name is the string which the kernel in
question would print if you ran the command 'uname -r'.

That said, if you have an initrd or initramfs stored under /boot, some
of the modules will probably be included in that. This isn't strictly
part of the kernel, but it does take up space on /boot, so it'd be
relevant to your considerations.

> There is for example a few filesystem modules like msdos which would
> be needed if I wanted to mount an msdos filesystem. Seem to remember
> "insmod" a module if and when needed.

Typically, for modules like that, they will be loaded on demand. They
don't generally get loaded during the boot process unless one of the
filesystems which the boot process needs is of that type, so they will
not always be included in the initrd / initramfs; as a result, leaving
them out will not necessarily reduce the space those files consume.

> If remove modules from kernel are the gone or are they still on disk
> and could be put back ?

If you remove them by 'modprobe -r' or 'rmmod', you mean? Yes - all that
does is tell the kernel to unload the module; it's loaded on demand from
the disk (by 'modprobe', 'insmod', or similar), from that location
underneath /lib/modules/, every time you boot and do something that
needs it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

removing modules mick crane <mick.crane@gmail.com> - 2021-07-03 18:10 +0200
  Re: removing modules Reco <recoverym4n@enotuniq.net> - 2021-07-03 18:20 +0200
  Re: removing modules The Wanderer <wanderer@fastmail.fm> - 2021-07-03 18:30 +0200
    Re: removing modules The Wanderer <wanderer@fastmail.fm> - 2021-07-03 19:10 +0200
      Re: removing modules The Wanderer <wanderer@fastmail.fm> - 2021-07-03 19:40 +0200
      Re: removing modules The Wanderer <wanderer@fastmail.fm> - 2021-07-03 19:40 +0200
    Re: removing modules IL Ka <kazakevichilya@gmail.com> - 2021-07-03 19:10 +0200
      Re: removing modules Hans <hans.ullrich@loop.de> - 2021-07-03 20:10 +0200
        Re: removing modules Sven Hartge <sven@svenhartge.de> - 2021-07-03 20:50 +0200
    Re: removing modules Reco <recoverym4n@enotuniq.net> - 2021-07-03 19:10 +0200
    Re: removing modules Greg Wooledge <greg@wooledge.org> - 2021-07-03 19:20 +0200
      Re: removing modules Greg Wooledge <greg@wooledge.org> - 2021-07-03 20:10 +0200
        Re: removing modules Stefan Monnier <monnier@iro.umontreal.ca> - 2021-07-03 20:30 +0200
          Re: removing modules Stefan Monnier <monnier@iro.umontreal.ca> - 2021-07-03 22:40 +0200
          Re: removing modules David Wright <deblis@lionunicorn.co.uk> - 2021-07-04 17:30 +0200
      Re: removing modules Brian <ad44@cityscape.co.uk> - 2021-07-03 21:10 +0200
        Re: removing modules Tom Dial <tddial@comcast.net> - 2021-07-04 05:10 +0200
          Re: removing modules Brian <ad44@cityscape.co.uk> - 2021-07-04 11:10 +0200
            Re: removing modules Tixy <tixy@yxit.co.uk> - 2021-07-04 14:50 +0200
              Re: removing modules Brian <ad44@cityscape.co.uk> - 2021-07-04 20:50 +0200
                Re: removing modules Brad Rogers <brad@fineby.me.uk> - 2021-07-04 21:20 +0200
                Re: removing modules Brian <ad44@cityscape.co.uk> - 2021-07-04 22:20 +0200
                Re: removing modules David Wright <deblis@lionunicorn.co.uk> - 2021-07-05 07:00 +0200
                Re: removing modules Brian <ad44@cityscape.co.uk> - 2021-07-05 12:10 +0200
    Re: removing modules David Wright <deblis@lionunicorn.co.uk> - 2021-07-03 19:40 +0200
  Re: removing modules IL Ka <kazakevichilya@gmail.com> - 2021-07-03 18:30 +0200

csiph-web