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


Groups > linux.debian.user > #236804 > unrolled thread

removing modules

Started bymick crane <mick.crane@gmail.com>
First post2021-07-03 18:10 +0200
Last post2021-07-03 18:30 +0200
Articles 6 on this page of 26 — 13 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#236866

FromBrad Rogers <brad@fineby.me.uk>
Date2021-07-04 21:20 +0200
Message-ID<CxfON-5MF-5@gated-at.bofh.it>
In reply to#236865

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

On Sun, 4 Jul 2021 19:42:26 +0100
Brian <ad44@cityscape.co.uk> wrote:

Hello Brian,

>I did specify "as time goes on". Suppose one boots successfully a 100
>times with the new kernel. What need is there for a second kernel on
>the system?

Clearly, you haven't understood what Tixy wrote.

-- 
 Regards  _
         / )      "The blindingly obvious is never immediately apparent"
        / _)rad   "Is it only me that has a working delete key?"
Cocaine, heroin, I never use speed, I never put the needle in
Keep it Clean - The Vibrators

[toc] | [prev] | [next] | [standalone]


#236869

FromBrian <ad44@cityscape.co.uk>
Date2021-07-04 22:20 +0200
Message-ID<CxgKS-6qd-5@gated-at.bofh.it>
In reply to#236866
On Sun 04 Jul 2021 at 20:16:25 +0100, Brad Rogers wrote:

> On Sun, 4 Jul 2021 19:42:26 +0100
> Brian <ad44@cityscape.co.uk> wrote:
> 
> Hello Brian,
> 
> >I did specify "as time goes on". Suppose one boots successfully a 100
> >times with the new kernel. What need is there for a second kernel on
> >the system?
> 
> Clearly, you haven't understood what Tixy wrote.

Maybe I didn't. But your comment doesn't clarfify anything.
Care to add anything worthewhile?

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#236888

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-07-05 07:00 +0200
Message-ID<CxoS5-30K-3@gated-at.bofh.it>
In reply to#236869
On Sun 04 Jul 2021 at 21:12:10 (+0100), Brian wrote:
> On Sun 04 Jul 2021 at 20:16:25 +0100, Brad Rogers wrote:
> > On Sun, 4 Jul 2021 19:42:26 +0100 Brian wrote:
> > >I did specify "as time goes on". Suppose one boots successfully a 100
> > >times with the new kernel. What need is there for a second kernel on
> > >the system?
> > 
> > Clearly, you haven't understood what Tixy wrote.
> 
> Maybe I didn't. But your comment doesn't clarfify anything.
> Care to add anything worthwhile?

I think the point that's being made is illustrated by recent upgrades
to amd64 buster.

linux-image-4.19.0-16-amd64_4.19.181-1_amd64.deb was issued Mar27,
then linux-image-4.19.0-17-amd64_4.19.194-1_amd64.deb Jun19.

So if by Jun22 one was happy with the latter, then you're suggesting
one remove the former.

Now on Jun23, linux-image-4.19.0-17-amd64_4.19.194-2_amd64.deb becomes
available. When you run upgrade, this kernel will overwrite the Jun19
version. If Jun23 hits a snag when booting, you've got no version 16
to fall back on.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#236895

FromBrian <ad44@cityscape.co.uk>
Date2021-07-05 12:10 +0200
Message-ID<CxtI6-6ki-3@gated-at.bofh.it>
In reply to#236888
On Sun 04 Jul 2021 at 23:53:15 -0500, David Wright wrote:

> On Sun 04 Jul 2021 at 21:12:10 (+0100), Brian wrote:
> > On Sun 04 Jul 2021 at 20:16:25 +0100, Brad Rogers wrote:
> > > On Sun, 4 Jul 2021 19:42:26 +0100 Brian wrote:
> > > >I did specify "as time goes on". Suppose one boots successfully a 100
> > > >times with the new kernel. What need is there for a second kernel on
> > > >the system?
> > > 
> > > Clearly, you haven't understood what Tixy wrote.
> > 
> > Maybe I didn't. But your comment doesn't clarfify anything.
> > Care to add anything worthwhile?
> 
> I think the point that's being made is illustrated by recent upgrades
> to amd64 buster.
> 
> linux-image-4.19.0-16-amd64_4.19.181-1_amd64.deb was issued Mar27,
> then linux-image-4.19.0-17-amd64_4.19.194-1_amd64.deb Jun19.
> 
> So if by Jun22 one was happy with the latter, then you're suggesting
> one remove the former.
> 
> Now on Jun23, linux-image-4.19.0-17-amd64_4.19.194-2_amd64.deb becomes
> available. When you run upgrade, this kernel will overwrite the Jun19
> version. If Jun23 hits a snag when booting, you've got no version 16
> to fall back on.

Thanks. The illustration did the trick.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#236814

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-07-03 19:40 +0200
Message-ID<CwRMu-7g9-9@gated-at.bofh.it>
In reply to#236806
On Sat 03 Jul 2021 at 17:50:44 (+0100), mick crane wrote:
> On 2021-07-03 17:29, The Wanderer wrote:
> > On 2021-07-03 at 12:06, mick crane wrote:
> > 
> > > hello,
> > > If I type "lsmod" there is a big list of modules with many
> > > followed by a
> > > "0"
> > > which I guess means they are not needed in the kernel ?
> > 
> > That depends what you mean by "needed".
> > 
> > As I understand matters, what that number being nonzero means is that
> > there's something else the kernel knows about (usually another module)
> > which won't work if this module isn't loaded. In order to unload this
> > module, you'll want to unload the other one first.
> > 
> > If the module is zero, that means that the kernel doesn't know of
> > anything other than that module which won't work unless the module is
> > present.
> > 
> > That doesn't mean that the module itself isn't needed, however. There
> > might be some functionality which you need which is provided
> > directly by
> > that module, rather than by something which the kernel knows about and
> > considers to be "something else", but which won't work if the module
> > isn't loaded.
> > 
> > For example, if the driver for your network card is contained in a
> > module, then even if no other modules depend on that one, unloading the
> > module would mean your network card would stop functioning. If you need
> > your network to be functioning, that would mean that you still need the
> > module, even though there aren't any other modules (etc.) which depends
> > on it.
> > 
> > > Does lsmod know about all installed software and if a module is
> > > needed or does software have to be run first ?
> > 
> > As Reco suggested, you'll have to clarify this. Most of the time,
> > software does not require loading modules; it's most often
> > hardware that
> > requires that.
> > 
> > > If I don't need them can somebody remind me how I can remove modules
> > > ?
> > 
> > The command to run is 'modprobe -r MODULE_NAME'.
> > 
> > You can also do it with 'rmmod MODULE_NAME', but that's not usually the
> > best way; IIRC, modprobe includes smarts which rmmod doesn't.
> > 
> > Both of those commands need to be run as root in order to work.
> 
> 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".
> 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 was thinking then to remove the unwanted modules to make the kernels
> smaller.
> 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.
> 
> If remove modules from kernel are the gone or are they still on disk
> and could be put back ?

OK, you're short of space in /boot. Here's mine.

$ ls -GlG /boot/
total 109828
-rw-r--r-- 1 root  3421023 Mar 19 09:29 System.map-4.19.0-16-amd64
-rw-r--r-- 1 root  3421235 Jun 21 03:46 System.map-4.19.0-17-amd64
-rw-r--r-- 1 root   206242 Mar 19 09:29 config-4.19.0-16-amd64
-rw-r--r-- 1 root   206214 Jun 21 03:46 config-4.19.0-17-amd64
drwx------ 3 root     4096 Dec 31  1969 efi
drwxr-xr-x 5 root     4096 Jun 23 13:47 grub
-rw-r--r-- 1 root 31149360 Mar 27 13:03 initrd.img-4.19.0-16-amd64
-rw-r--r-- 1 root 32309222 Jun 26 18:28 initrd.img-4.19.0-17-amd64
-rw-r--r-- 1 root 31156713 Jun 23 13:47 initrd.img-4.19.0-17-amd64.bak
-rw-r--r-- 1 root  5287168 Mar 19 09:29 vmlinuz-4.19.0-16-amd64
-rw-r--r-- 1 root  5283072 Jun 21 03:46 vmlinuz-4.19.0-17-amd64
$ 

So it's obvious that you need to concentrate your attention on the
initrd files. You could remove any .bak file, and even not generate
any by setting
  backup_initramfs=no
in /etc/initramfs-tools/update-initramfs.conf, but you could also
save space by not storing all the modules in your initrd files.
Do this by setting
  MODULES=dep
in /etc/initramfs-tools/initramfs.conf
and rebuilding it with update-initramfs.

MODULES=dep will mean that if you change your booting method,
there's a chance it could fail. In which case, you'd first boot
with the old method and rebuild an initrd with MODULES=most.

When you make these changes, just check for any parameters set in
files in /etc/initramfs-tools/conf.d because they take priority.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#236807

FromIL Ka <kazakevichilya@gmail.com>
Date2021-07-03 18:30 +0200
Message-ID<CwQGJ-6Bk-5@gated-at.bofh.it>
In reply to#236804

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

>
>
> hello,
> If I type "lsmod" there is a big list of modules with many followed by a
> "0"
> which I guess means they are not needed in the kernel ?
>

That means no module depends on it.
But it doesn't mean this particular module isn't required.


Does lsmod know about all installed software and if a module is needed
> or does software have to be run first ?
>
lsmod doesn't care about software.

It only reports modules and their dependencies.



> If I don't need them can somebody remind me how I can remove modules ?
>

rmmod(8), but in most cases you shouldn't remove modules.
Many modules are loaded by ``udev`` to support your hardware, so be sure
not to unload your NIC driver by accident)

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.debian.user


csiph-web