kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* difference between /usr/lib/modules and /lib/modules
@ 2020-03-20 10:24 Fabien R
  2020-03-20 10:56 ` Bernd Petrovitsch
  0 siblings, 1 reply; 6+ messages in thread
From: Fabien R @ 2020-03-20 10:24 UTC (permalink / raw)
  To: kernelnewbies

Hello,

Being used to cross-compile my kernel on a faster machine, I noticed the existence of both directories
after installing it with update-grub.
Since 'du' showed that they have the same size, it's a waste of space.
Is it possible to use only one of them ?
Is it inherent to grub ?

--
Fabien

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: difference between /usr/lib/modules and /lib/modules
  2020-03-20 10:24 difference between /usr/lib/modules and /lib/modules Fabien R
@ 2020-03-20 10:56 ` Bernd Petrovitsch
  2020-03-20 11:11   ` Valentin Vidić
  2020-03-20 11:14   ` Fabien R
  0 siblings, 2 replies; 6+ messages in thread
From: Bernd Petrovitsch @ 2020-03-20 10:56 UTC (permalink / raw)
  To: Fabien R, kernelnewbies

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

Hi!


On 20/03/2020 10:24, Fabien R wrote:
[...]
> Being used to cross-compile my kernel on a faster machine, I noticed the existence of both directories
> after installing it with update-grub.
> Since 'du' showed that they have the same size, it's a waste of space.
> Is it possible to use only one of them ?

/usr/lib/modules doesn't exist on Ubuntu (and TTBOMK it
doesn't exit in the Fedora/RedHat-world - can't check right now).

Are you sure they are actually different (and don't have e.g.
the same inode number)?

MfG,
	Bernd
-- 
"I dislike type abstraction if it has no real reason. And saving
on typing is not a good reason - if your typing speed is the main
issue when you're coding, you're doing something seriously wrong."
    - Linus Torvalds

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2513 bytes --]

[-- Attachment #3: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: difference between /usr/lib/modules and /lib/modules
  2020-03-20 10:56 ` Bernd Petrovitsch
@ 2020-03-20 11:11   ` Valentin Vidić
  2020-03-20 11:23     ` Fabien R
  2020-03-22  3:36     ` Valdis Klētnieks
  2020-03-20 11:14   ` Fabien R
  1 sibling, 2 replies; 6+ messages in thread
From: Valentin Vidić @ 2020-03-20 11:11 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Mar 20, 2020 at 10:56:15AM +0000, Bernd Petrovitsch wrote:
> Are you sure they are actually different (and don't have e.g.
> the same inode number)?

Looks like that to me (on Debian):

$ ls -lid /usr/lib/modules /lib/modules
9804 drwxr-xr-x 4 root root 4096 Feb 15 11:31 /lib/modules
9804 drwxr-xr-x 4 root root 4096 Feb 15 11:31 /usr/lib/modules

$ ls -lid /usr/lib /lib
29 lrwxrwxrwx  1 root root    7 Jul 27  2019 /lib -> usr/lib
30 drwxr-xr-x 79 root root 4096 Feb 15 11:27 /usr/lib

-- 
Valentin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: difference between /usr/lib/modules and /lib/modules
  2020-03-20 10:56 ` Bernd Petrovitsch
  2020-03-20 11:11   ` Valentin Vidić
@ 2020-03-20 11:14   ` Fabien R
  1 sibling, 0 replies; 6+ messages in thread
From: Fabien R @ 2020-03-20 11:14 UTC (permalink / raw)
  To: kernelnewbies

On 20/03/2020 11:56, Bernd Petrovitsch wrote:
> /usr/lib/modules doesn't exist on Ubuntu (and TTBOMK it
> doesn't exit in the Fedora/RedHat-world - can't check right now).
> 
I forgot to mention that I was on debian/stable.
> Are you sure they are actually different (and don't have e.g.
> the same inode number)?
> 
Yes, they are. I would have expected one be a link to the other.
--
Fabien

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: difference between /usr/lib/modules and /lib/modules
  2020-03-20 11:11   ` Valentin Vidić
@ 2020-03-20 11:23     ` Fabien R
  2020-03-22  3:36     ` Valdis Klētnieks
  1 sibling, 0 replies; 6+ messages in thread
From: Fabien R @ 2020-03-20 11:23 UTC (permalink / raw)
  To: kernelnewbies

On 20/03/2020 12:11, Valentin Vidić wrote:
> $ ls -lid /usr/lib /lib
> 29 lrwxrwxrwx  1 root root    7 Jul 27  2019 /lib -> usr/lib
> 30 drwxr-xr-x 79 root root 4096 Feb 15 11:27 /usr/lib
Ok. It seems that I have to correct my setup.
Thanks for the info.
--
Fabien



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: difference between /usr/lib/modules and /lib/modules
  2020-03-20 11:11   ` Valentin Vidić
  2020-03-20 11:23     ` Fabien R
@ 2020-03-22  3:36     ` Valdis Klētnieks
  1 sibling, 0 replies; 6+ messages in thread
From: Valdis Klētnieks @ 2020-03-22  3:36 UTC (permalink / raw)
  Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 788 bytes --]

On Fri, 20 Mar 2020 12:11:52 +0100, Valentin VidiD <vvidic@valentin-vidic.from.hr> said:
> On Fri, Mar 20, 2020 at 10:56:15AM +0000, Bernd Petrovitsch wrote:
> > Are you sure they are actually different (and don't have e.g.
> > the same inode number)?
>
> Looks like that to me (on Debian):
>
> $ ls -lid /usr/lib/modules /lib/modules
> 9804 drwxr-xr-x 4 root root 4096 Feb 15 11:31 /lib/modules
> 9804 drwxr-xr-x 4 root root 4096 Feb 15 11:31 /usr/lib/modules
>
> $ ls -lid /usr/lib /lib
> 29 lrwxrwxrwx  1 root root    7 Jul 27  2019 /lib -> usr/lib
> 30 drwxr-xr-x 79 root root 4096 Feb 15 11:27 /usr/lib

So /lib is a symlink to /usr/lib.  Fairly common on many distros.

(Try 'ls -Lid' instead - the -L option makes it show the target of a symlink
rather than the symlink itself...)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-22  3:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 10:24 difference between /usr/lib/modules and /lib/modules Fabien R
2020-03-20 10:56 ` Bernd Petrovitsch
2020-03-20 11:11   ` Valentin Vidić
2020-03-20 11:23     ` Fabien R
2020-03-22  3:36     ` Valdis Klētnieks
2020-03-20 11:14   ` Fabien R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).