LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2006, 04:40 AM   #1
stu_mueller
Member
 
Registered: Aug 2006
Location: England
Distribution: Slackware, Zenwalk
Posts: 114

Rep: Reputation: 15
Location of Kernel to recompile


I'm a relative Newbie to Linux. I've used Slackware since about version 9 but went through a long period of not using slackware at all.

I have compiled kernels before, successfully.

However I have now installed slackware 11 on my Compay Presario. My first install, I got everything working ndiswrapper for my linksys wireless card, my sound worked everything was lovely. I then decided that I wanted to install the bootsplash patch and so I decided to update my kernel to version 2.6.18. I downloaded the source patched it ran make gconfig filed in the options, ran make bzimage make modules etc etc...

I kept my existing vmlinuz in my /boot just incase anything went wrong (good job really) after rebooting I got a kernel panic. I managed to get booted with my old kernel but the sound stopped working and then it would halt at boot up while running rc.hotplug.

I decided to reinstall using the bareacpi.i and again everything works fine. Its put me off going with the 2.6.18 Kernel at the moment, however I would like to recompile the kernel I'm using at the moment, to add support for my Pentium and I believe you need to to get the synaptic touch pad working. So if I go to /usr/src/linux (which points to linux-2.4.33.3) would this be my existing kernel and would the .config file in there correspond to my existing kernel settings? Could I just run make menuconfig and just add the bits I need then do make bzimage make modules and make modules_install, or would I need to do a make mrproper first?

Thanks for you help

Stu
 
Old 12-15-2006, 04:48 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,587

Rep: Reputation: 121Reputation: 121
2.4.33.3 is the right one if you installed bareacpi.i
Not sure about the config file, I guess it's a clean one, not the one your kernel was built with. To be sure you can take the one from your /boot folder and copy it as .config to your kernel's location. All kernel packages on Slackware contain the kernel, the config and System.map file.

If you would like to use another one, for example the one from the precompiled 2.6.18 in /extra or from bare.i just create a temporary folder somewhere and from in it do an "explodepkg /path/to/package/kernel-package-i486-bla.tgz". This will create the kernel's folder structure and unpack the files in it -- so in the now created ./boot folder you will find the kernel config file that was used by Patrick Volkerding for this kernel.
 
Old 12-15-2006, 05:08 AM   #3
stu_mueller
Member
 
Registered: Aug 2006
Location: England
Distribution: Slackware, Zenwalk
Posts: 114

Original Poster
Rep: Reputation: 15
OK thanks for that so if I understand right. the /boot/config file can be copied over to /usr/src/linux/.config to give me the same options as I currently have. or I could do an explodepkg on hte bareacpi.i kernel package to give me the .config file and then copy that to /usr.src/linux/.config

I can then recompile my kernel using that .config and hopefully everything will be the same!

OK a couple more questions:

is there a need to compile things as modules or can everything be compiled in the kernel? i.e sound drivers.

If I try to compile a 2.6 kernel again, I will get the source from the web extract it to /usr/src and create a symlink to linux. If I then copy .config from my old kernel or from hte /boot folder to the 2.6 kernel location in /usr/src will all the settings and what is being compiled as a module or not be retained? What about if there is an option in hte old kernel that isn't in hte new kernel? (or a driver in the old kernel that isn't in hte new kernel)

Cheers

Stu
 
Old 12-15-2006, 05:17 AM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,587

Rep: Reputation: 121Reputation: 121
AFAIK it should be the same files, but to be on the safe side take it from the package (explodepkg ...).

About 2.6: I don't know what happens if a driver has been removed from the kernel. Usually you do an "make oldconfig" and you will be questioned about all stuff that has been added since your old kernel. That is not a good idea I think because between 2.4.33.3 and something like 2.6.18 (too) much has changed. I would rather try the precompiled kernels from /extra (me, I'm running 2.6.17.13, but there is also a 2.6.18.x one) or at least start from their config files. To be on the safe side again, take the config file from huge26.s which has many many devices and options build in, then try to remove what is not needed on your system.
 
Old 12-15-2006, 05:30 AM   #5
stu_mueller
Member
 
Registered: Aug 2006
Location: England
Distribution: Slackware, Zenwalk
Posts: 114

Original Poster
Rep: Reputation: 15
Thanks titopoquito,

I'm sure I used tried to build my machine with the 26huge.s kernel but even after first boot I got errors whengoing into KDE about me not having a sound card. I didn't get those errors with the 2.4.33 kernel.

I would like to upgrade to the 2.6 kernel How could I use one of the precompiled kernels now that I have a system running, or would I need to compile a 2.6 kernel myself with just hte .config file copied?

the line: image = /boot/vmlinuz
in the lilo.conf file points to my current kernel image. (or is a copy of my current kernel) vmlinuz-ide-2.4.33.3

If I create a new 2.6 kernel image and copy it to /boot/vmlinuz-2.6 could I add a section in my lilo.conf that points to: image = /boot/vmlinuz-2.6 and use this to keep both my old kernel and my new kernel?

What about System.map what would that need to point to?

as an alternative could I create a /boot2 directory for my new kernel and leave the old kernel in the /boot directory? then have in my lilo.conf

image = /boot/vmlinuz #original kernel
lable=linux
root=blah

image = /boot2/vmlinuz #2.6 kernel
label=newlinux
root=blah

Thanks for answering all my questions

Stu
 
Old 12-15-2006, 06:02 AM   #6
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,587

Rep: Reputation: 121Reputation: 121
If you installed huge26.s installed you the modules as well? They are not automatically installed, but you have to do it by hand! And I noticed that even after that I had to manually point the symlink /etc/rc.d/rc.modules to the file /etc/rc.d/rc.modules-2.6.17.13 instead of the 2.4.x one. These three steps (huge26.s, install modules manually, correct rc.modules link) were enough for me to get all working.

I think the boot and boot2 solution should work, but I never tried this. I renamed the old config and System.map files, but to be honest I don't know what the System.map is needed for, so maybe I was just lucky that my newly compiled kernels worked nicely.
 
Old 12-15-2006, 06:53 AM   #7
stu_mueller
Member
 
Registered: Aug 2006
Location: England
Distribution: Slackware, Zenwalk
Posts: 114

Original Poster
Rep: Reputation: 15
No when I built using huge6.s I didn't install any modules. When I compiled the 2.6 kernel i did a make modules_install but I didn't change the sym link of the rc.modules

I might actually try again with a 2.6 kernel, using hte /boot2 option incase things go wrong.

I didn't take me long to build anyway!

One last question. How do you know what to compile as modules and what to compile in the kernel? If I have installed slackware using bareacpi.i will I have any modules to load at boot time or will it all be in the kernel?

And if I compile my 2.6 kernel and do a make modules_install will it over write my 2.4 kernel modules?

Thanks for all your time

Stu
 
Old 12-15-2006, 07:15 AM   #8
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,587

Rep: Reputation: 121Reputation: 121
You should take care of all file systems (probably reiserfs at least) and IDE/SATA controllers to be build in IMHO. The rest should be ok as module I think.
No, the modules won't get overwritten. They will be placed in /lib/modules in a seperate folder named after your new kernel's version.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Location of Kernel sall Linux - Wireless Networking 2 04-10-2005 11:46 PM
kernel location phatboyz Fedora 6 11-16-2004 10:55 AM
kernel recompile error (kernel panic) tombaaaaa Linux - Newbie 4 08-04-2004 05:32 PM
kernel recompile Danforth Linux - Newbie 1 04-24-2004 02:31 AM
Recompile the Kernel SkYzOpReNiCk Linux - General 3 07-13-2001 08:06 AM


All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration