Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Installing Kernel Source
eastmanuk
post Oct 24 2005, 06:59 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 19-October 05
Member No.: 5,649



Hi, I've recently installed a new kernel from Linuxant to get ndiswrapper working, though when installing it, it asks for the source of the kernel, which isn't in /usr/src/

I installed the kernel using rpm -i kernel.rpm, was that correct? I also downloaded the .src file from that site, but when trying to run the rpm for that file, it tells me that module-init-tools doesn't work with source rpms (or something like that). Can anyone tell me how I'm meant to get the source files?
Go to the top of the page
 
+Quote Post
as2100
post Oct 24 2005, 10:30 PM
Post #2


Grub-er
**

Group: Members
Posts: 26
Joined: 27-January 05
Member No.: 4,595



If you installed the kernel via RPM, you simply received a binary package of your kernel. This won't include the source of the kernel. You probably want to visit http://kernel.org to get the source distribution.

Untar the source package in /usr/src, and make a symlink named '/usr/src/linux' to point to your new '/usr/src/linux-<version>.tar.gz'

Head into /usr/src/linux and type 'make menuconfig' as root.
This nifty little configuration menu might be a little intimidating at first, but there are plenty of tutorials out there for helping you choose the devices you want enabled.

Once you're done, save the configuration file in the default location (/usr/src/linux/.config).
It should do this automatically, just hit ESC a couple times. wink.gif

Before continuing, type:
# grep NET_RADIO /usr/src/linux/.config
and be sure this "CONFIG_NET_RADIO" option has "=y" directly after it.

Now, with the saved kernel config, type 'make && make modules_install' (2.6.* only) as root.
This will compile your kernel image and modules, and install your modules in '/lib/modules/<new-kernel>'.

From '/usr/src/linux', just copy over a couple files to your bootable partition:
# mkdir /boot/newkernel
# cp {.config,System.map,arch/<your-arch>/boot/bzImage} /boot/newkernel/

Now just edit your bootloader configuration file accordingly, and reboot.

If you are simply wanting to install ndiswrapper, there shouldn't be any further kernel complications (pray to the module loading gods for that wish, however).

Ndiswrapper has a pretty fancy installation wiki, check it out and good luck. smile.gif
Go to the top of the page
 
+Quote Post
DS2K3
post Oct 25 2005, 01:07 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



Most distributions have modified kernel-sources, in which case the "vanilla" sources (from kernel.org) wont help. If you installed one of the kernels from linuxant, then you will need to get the appropriate kernel-source RPM. Which distribution are you using?

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
eastmanuk
post Oct 26 2005, 08:18 AM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 19-October 05
Member No.: 5,649



I'm using Fedora Core 4, which I'm pretty sure uses a modified kernel... The sources for that kernel are in the /usr/src/kernels folder, so would making a copy of that folder, making the changes, then basically following the rest of as2100's instructions work?

Oh, and two quick questions... He says about a symlink, what is that and how does it work? And what is the part about 'arch', and how would I find out what arch I'm using?

Thanks for the replys guys smile.gif
Go to the top of the page
 
+Quote Post
eastmanuk
post Oct 27 2005, 06:31 AM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 19-October 05
Member No.: 5,649



Heres what I've done so far (I'm using Fedora Core 4):

Copied my old kernel source, renamed it, put it back into the /usr/src/kernels folder.

Made a symlink to it, using ln -s newkernel linux
Went into the /usr/src/kernels/linux folder.

Used make menuconfig, changed one thing (disable use 4k stacks instead of 8k), esc out of that and saved.

Typed make && make modules_install which starts, but after less than a minute, I'm given this:
CODE
make[1]: *** No rule to make target 'init/main.o', needed by 'init/built-in.o'.
Stop.
make: *** [init] Error 2


Anyone know why?
Go to the top of the page
 
+Quote Post
DS2K3
post Oct 27 2005, 01:47 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



If you installed a kernel from Linuxant, them i'm a bit confused as to why you are compiling another one... Apparently, those Linuxant kernels are the same as teh Fedora stcok kernels, just with the stack change. So, installing the stock kernel-source package for the kernel you are using (type "uname -r" to find out the currently running kernel version) should do.

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
eastmanuk
post Oct 27 2005, 03:12 PM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 19-October 05
Member No.: 5,649



Heh, seems I was being a bit stupid... I installed the kernel from linuxant, which was only the binary, and I needed the source... And I couldn't figure out what to do with the .src.rpm file, heh.

Well, now I've figured out all that, installed it all, and now I just gotta test it... But to do that, I need to edit Grub to boot it... Can anyone tell me what to do with the .config, bzImage, and System.map files, and what to type into the Grub config file? Thanks!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 03:38 PM