LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-12-2007, 03:45 AM   #1
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Rep: Reputation: 30
Kernel compilation problems


i have made a fresh install (full) of slackware 12 and i decided to upgrade the default huge-smp kernel. i downloaded the kernel 2.6.23 from kernel.org and compiled it as posted in some threads in this forum. i had no errors while compiling and all went smoothly, finally i made make all and make install and copied the bzimage to /boot as vmlinuz and system.map to /boot and run /sbin/lilo and rebooted the system. now the system works fine but when i run uname -r it shows the previous default kernel name 2.6.21.5-smp instead of the new 2.6.23 kernel. i would like to know wheather the kernel is installed or not ad what to do to make the new kernel to be displayed in uname -r.
 
Old 12-12-2007, 05:08 AM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi, you should check /boot in your slackware system and the entries in lilo.conf to make sure that you're loading the rigth kernel.

For what it seems, you're actually loading the vmlinuz-generic-smp-2.6.21.5-smp or vmlinuz-huge-smp-2.6.21.5-smp.

Now, lilo makes a 'vmlinuz' symlink to vmlinuz-huge-smp-2.6.21.5-smp by default (AFAIK), so what could be happening is that you cp bzImage as 'vmlinuz' and then it gets replaced by lilo during configuration. You could try, if that's the case, just cp the bzImage with other name, like, 'my-kernel-2.6.23' or whatever. After lilo configuration, check the lilo.conf or, if you want to, remake the 'vmlinuz' symlink to point to your new kernel 2.6.23.




Regards
 
Old 12-12-2007, 05:32 AM   #3
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Original Poster
Rep: Reputation: 30
i had actually copied bzimage as vmlinuz-2.6.23 and made a symlink to vmlinuz. but i forgot to copy the .config file. is it required to re-do all the things from beginning?
 
Old 12-12-2007, 05:58 AM   #4
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
No, is not necessary to do it all over again (I mean, recompile the kernel)

As for the config, actually, isn't required, you can just use the bzImage and forget about the "cp .config /boot/config...." stuff.



Regards
 
Old 12-12-2007, 06:53 AM   #5
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Not much need to copy the System.map either afaik .

Just copy the bzImage (rename it to vmlinuz23 etc.)
add a entry to lilo with vmlinuz23 in it and run lilo ... thats all.
 
Old 12-12-2007, 11:01 AM   #6
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Original Poster
Rep: Reputation: 30
finally got the new kernel working thanks for all
 
Old 12-13-2007, 10:55 PM   #7
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Original Poster
Rep: Reputation: 30
Had to re-install due to mistake in re-compilation to make sound drivers work. did a full install and tried to compile kernel 2.6.23 again but this time i'm getting problem in making oldconfig. when i made "make oldconfig" the screen went scrolling for few lines and prompted me to choose some configurations, i answered it all with the default option and made menu config there i saw the processor was wrongly chosen in the default config, i chose pentium-4 and enabled smp support and the extra processsor option as pc-compatible saved configuration and made "make all", "make module_install", "make install" and copied the bzImage, System.map, .config to /boot and renamed them as usual and edited /etc/lilo.conf and run /sbin/lilo. when i re-booted the system the kernel booted fine but went to kernel panic wnen mounting root file system with message "unable to mount root file system" i could not figure out what had gone wrong. my root file system is ext2 so there should be no problem as it is the defalut linux file system. i guess the make oldconfig should be the problem becoz when i did the kernel upgrade last time the make oldconfig ran for several seconds absorbing all options from old kernel and didn't prompt for any thing and when i did menuconfig a saw all options perfectly choosen for the system and the kernel installed perfectly and booted with out any problem. now i booted with the default slack 12 huge-smp kernel and tried to re-compile the kernel but again it is prompting for options to choose, it is driving me nuts. pls guide me how to make perfect configuratiopn for kernel. i had even tried with config.gz file in /proc but no success.
 
Old 12-13-2007, 11:18 PM   #8
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi, again


Well, I don't really have a background of the kernel you used before, I could make assumptions like, this time, for whatever reasons, there was no .config to read so make oldconfig wasn't able to define better defaults.

Anyway, you should use only make menuconfig (or make xconfig or make kconfig or whatever you like) and set things right, regarding to the kernel panic, even when you're assuming that the make oldconfig compile the ext2 fs in the kernel, maybe that's not the case, it could for intance compile the fs as a module and you should see the same error...

If the error is something like 'Unable to mount root fs, unknown block (x,x)' (x being numbers of course), then the kernel was compiled without support for ata or sata drives, or some options regarding to this devices were left out.

Particulary, I will use make mrproper and then make menuconfig to set a new .config file that will work as I spected to, yeah, is more work going for all that options, checking this and that, but at least you'll end up with a .config that you'll be sure will work as a good base for make oldconfig in the future.



Regards
 
Old 12-13-2007, 11:57 PM   #9
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Original Poster
Rep: Reputation: 30
i think i messed up with sata drivers as both my hdd are sata. i'm using the default huge-smp-2.6.21.5-smp kernel. but last time i tried compiling the default kernel first and re-booted and compiled the new kernel with config file from old kernel and it was success becoz when i made make menuconfig it shows the processor and all drivers intact for my hardware, but now it shows all changed i had to select the processor, drivers and lots so i had made mistake some where and got into trouble. i think it will be better to re-compile the current kernel as it runs smoothly and proceed with compiling new kernel.
 
Old 12-14-2007, 09:03 AM   #10
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Yup, that will be better, after that, if it is successfull, you could use make oldconfig whenever you want



Regards
 
Old 12-14-2007, 11:24 PM   #11
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Original Poster
Rep: Reputation: 30
yes i made it first compiled the default kernel enabling all required options and used the config file to compile new kernel and it works now all devices are working and it's amazingly fast.
 
Old 12-15-2007, 07:06 AM   #12
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
kudos ^^


Regards
 
Old 12-15-2007, 09:15 AM   #13
gopi.d
Member
 
Registered: Feb 2006
Location: India
Distribution: Slackware 12, Fedora 7, Kubuntu-7.04
Posts: 172

Original Poster
Rep: Reputation: 30
now again in trouble but with different problem. when i tried to compile a package from source i get a error

root@gopi:/usr/src/kompile-0.3-beta3# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
root@gopi:/usr/src/kompile-0.3-beta3#

i'm confused what todo as i'm not expert in linux, i tried re-installing gcc, gcc-c++, libstd++ but getting same error. please tell me what todo as i need to compile lots of package from source.
 
Old 12-15-2007, 09:57 AM   #14
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Since you've already made a new post about that subject, you should continue in that post because you won't get any answers in here since the title of the post is regarding to kernel compilations problems and not the kde4 compilation problems

But, if it helps you, you should check ./configure --help to see the options that can be passed to gcc, the problem could be that kde is looking for headers and libraries in a different prefix that your system has.

Any other question about that problem, do them in the new post.



Regards
 
  


Reply



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
Kernel compilation problems, distorted video and kernel panic shamrock_uk Linux - Laptop and Netbook 5 08-12-2005 10:53 PM
Kernel 2.4.22 compilation problems Arcosanti Slackware 3 04-17-2004 12:19 AM
Kernel Compilation Problems jironimo Linux - Software 6 03-27-2004 08:58 AM
kernel compilation problems aqoliveira Linux - Hardware 3 09-20-2002 11:46 AM
Kernel compilation problems nikhiljosh Linux - General 3 07-29-2001 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:51 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
Open Source Consulting | Domain Registration