You are not logged in.

#1 2006-08-03 09:37:13

bademeister
Member
From: PB, Germany
Registered: 2006-07-28
Posts: 9

[Solved] Basic research for arch beginner - kernel

Hello,

if i want to compile my own new kernel so i create a directory to
"/usr/src/" like "linux-2.6.17.7". So i have in some cases more like one kernel directory.

Other distributions set a symlink to the actual kernel directory with
the name "linux", because in the system is "linux" the reference.
So it easy to change the link to the actualy kernel-directory.

I have seen, that Archlinux don't use a symlink to the kernel-directory.

How can i change the reference in the system for a new kernel-directory,
because i think if i compile some modules, the system will got every time
the "old" modules directory and not the new one ?

Thank you and

best regards

bademeister

Offline

#2 2006-08-03 10:29:47

djpharoah
Member
From: SoCal
Registered: 2006-06-18
Posts: 185

Re: [Solved] Basic research for arch beginner - kernel

The wiki is your friend => Kernel Compilation from Source

Thing is the stock kernels dont keep their sources in /usr/src but rather the headers.


IBM T41p - 2373-xXx - kernel26thinkpad

Offline

#3 2006-08-03 11:56:31

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [Solved] Basic research for arch beginner - kernel

bademeister wrote:

Other distributions set a symlink to the actual kernel directory with
the name "linux", because in the system is "linux" the reference.
So it easy to change the link to the actualy kernel-directory.

I have seen, that Archlinux don't use a symlink to the kernel-directory.

How can i change the reference in the system for a new kernel-directory,
because i think if i compile some modules, the system will got every time
the "old" modules directory and not the new one ?

What does "the actual kernel-directory" mean? There is absolutely no part of the system that looks for /usr/src/linux.
You only need the source (or at least part of it) to compile external modules. The necessary headers are located via the /lib/modules/$(uname -r)/build/ directory.

As said above, you should use abs for kernel compilation so that pacman can keep track of the files.
The best solution for 99% of the users is using the stock kernel anyway, as it is slim and modular, supports all you need and there are tons of precompiled kernel modules for it in the repos.

Offline

#4 2006-08-03 17:52:11

bademeister
Member
From: PB, Germany
Registered: 2006-07-28
Posts: 9

Re: [Solved] Basic research for arch beginner - kernel

brain0 wrote:

What does "the actual kernel-directory" mean? There is absolutely no part of the system that looks for /usr/src/linux.
You only need the source (or at least part of it) to compile external modules. The necessary headers are located via the /lib/modules/$(uname -r)/build/ directory.

As said above, you should use abs for kernel compilation so that pacman can keep track of the files.
The best solution for 99% of the users is using the stock kernel anyway, as it is slim and modular, supports all you need and there are tons of precompiled kernel modules for it in the repos.

Hi brain0,

"the actual kernel-directory" means, which directory is now use by the system.

For example, if i download the kernel and place it to /usr/src/linux-2.6.17.7, so i have two directories. With the old kernel before (linux-2.6.17-ARCH) and my new one.

"uname -r" show me the reference directory, now with "2.6.17-ARCH", also
all modules will loaded from: /lib/modules/2.6.17-ARCH/.

Now i compile the new kernel (linux-2.6.17.7-NEW) and during the compilation, all modules will be copied to the new module directory:
/lib/modules/2.6.17-NEW/.

If i look to the reference directory with "uname -r", so i get
2.6.17-ARCH again. All kind of modules will be loaded from the old directory.

So i'm looking for a solution to switch the reference directory, that
all modules will be loaded from "/lib/modules/2.6.17-NEW/".

Regards

bademeister

Offline

#5 2006-08-03 18:07:23

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: [Solved] Basic research for arch beginner - kernel

bademeister wrote:

"uname -r" show me the reference directory, now with "2.6.17-ARCH", also
all modules will loaded from: /lib/modules/2.6.17-ARCH/.

Now i compile the new kernel (linux-2.6.17.7-NEW) and during the compilation, all modules will be copied to the new module directory:
/lib/modules/2.6.17-NEW/.

If i look to the reference directory with "uname -r", so i get
2.6.17-ARCH again. All kind of modules will be loaded from the old directory.

No problem here. If you are running the new kernel, 'uname -r' will return 2.6.17-NEW and the modules will be loaded from the right directory.

Offline

#6 2006-08-03 20:45:12

bademeister
Member
From: PB, Germany
Registered: 2006-07-28
Posts: 9

Re: [Solved] Basic research for arch beginner - kernel

sh__ wrote:
bademeister wrote:

"uname -r" show me the reference directory, now with "2.6.17-ARCH", also
all modules will loaded from: /lib/modules/2.6.17-ARCH/.

Now i compile the new kernel (linux-2.6.17.7-NEW) and during the compilation, all modules will be copied to the new module directory:
/lib/modules/2.6.17-NEW/.

If i look to the reference directory with "uname -r", so i get
2.6.17-ARCH again. All kind of modules will be loaded from the old directory.

No problem here. If you are running the new kernel, 'uname -r' will return 2.6.17-NEW and the modules will be loaded from the right directory.

Thank you,

sometimes is the easiest way so close and as well as far away.

Best regards

bademeister

Offline

Board footer

Powered by FluxBB