difference between /usr/lib/modules and /lib/modules
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
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
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
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...)
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
participants (4)
-
Bernd Petrovitsch -
Fabien R -
Valdis Klētnieks -
Valentin Vidić