LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-08-2007, 07:50 AM   #1
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Rep: Reputation: 16
kernel config


Hi

I am quite new to Linux world, and here is my problem:

I have a dell inspiron 1501 with AMD Turion TL-56 processor, 1 gig RAM, ATI video card, SATA harddisk.

I am using slackware, I have installed version 12 just some months ago. It is working, but there are several signs that I have a problem with my kernel.

These are:
My computer never booted with hugeSMP, it just hangs in the middle of boot (last screen entry says something about switching on a high resolution timer and then it just stops) So I was using huge.s for installing Slackware.

With huge.s (or with the kernel I have since built) during boot, after lilo disappears, I have to wait for more than a minute for something called "checking the bios" (and I guess for loading the kernel), in the meantime I see dots appearing. I have googled this problem, and the suggestions were to rebuild the kernel.

I was using huge.s as a starting configuration for building a new kernel. I was able to delete some stuff (like NVIDIA support) and build my own kernel, but I am not skilled enough for building my own kernel, that would possibly load quickly and would use both cores of my processor.

I would like to ask for some hints what to include/leave out from my kernel config, if you know of any documentations (the ones I found say the steps, but do not say anything about what to include/exclude). If any of you have a similar set of hardware I would be very grateful to see an example kernel config file.

Also I would appreciate any suggestions how I should proceed when playing with the settings. Do you start from a bare kernel and add stuff as you see the requirement (how do you check what is missing if the computer refuses to boot?) or you start with huge and strip it down (is there a way to see what is being used in a working kernel?)

Thanks a lot for any replies!!!
Jozsi

Last edited by bjdodo; 11-08-2007 at 07:51 AM.
 
Old 11-08-2007, 03:14 PM   #2
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Mint, Arch, Debian7
Posts: 194

Rep: Reputation: 23
The problem with building a self compiled kernel is that you need to know your own hardware implicitly.
Any distribution (slackware included) has to work with as many different combinations of hardware and software as possible. As such distribution kernels are heavily modularized, look in /lib/modules/<kernel-version> to see for yourself.

The catch here, is that if you compile support for your root filesystem as a module, your system will not start, (unless you create a ramdisk or ramfs first).

You can see the modules of a working kernel by typing
lsmod

... but you wont see the static modules compiled into the kernel.

Your distribution will have a kernel config stored somewhere , look in /usr/src first (I last used slackware on Version 9) You can start with your distros kernel config as a template.

As you have already built your own kernel, its a matter of systamatically working through the kernel config and making only very few changes each time.
If for example you have no use for ISDN, then you can answer N to the question in the kernel config and this will not add unneccary ballast to your kernel.

http://www.digitalhermit.com/linux/K...ild-HOWTO.html

HTH
 
Old 11-09-2007, 04:03 AM   #3
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Original Poster
Rep: Reputation: 16
Hi

Thank you very much for your answer!!! and for the link; this link is really helpful.

Just for curiosity: if you proceed in building the kernel like that (you begin with a working kernel, change it a bit and then build & test), can I ask what is the use of the "bare" kernels in Slackware? My guess would be that most of the computers would not run properly with them, so they are not useful for running a computer and for building an own kernel. What is the use then?

Thanks again!

Jozsi
 
Old 11-09-2007, 04:59 AM   #4
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
Why not simply use one of the stock modularised kernels available all over the internet and from http://www.kernel.org/

Better still, find a slackware package.

Why are you creating your own kernel? I thought those days were gone and reside only in the anals of embedded systems and alike ... not desktops!
 
Old 11-09-2007, 05:37 AM   #5
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Original Poster
Rep: Reputation: 16
Hi,

Believe me I also wanted to avoid this :-)

This is the reason:
http://www.linuxquestions.org/questi...cripts-525364/

Q:
"It gets really slow in the early booting process, when it is "Checking BIOS integrity" and then the dots '.............................................' appear really really really slow."

Ans:
"Have you recompiled your kernel selecting specific options to reflect your hardware? "

"The fact that it is hangin on boot.......... shows there is something wrong on your kernel compilation. Seriously, stay away from huge26.s!!! I use it only when I want to find out what modules I need for specific hardware. Just recompile kernel (it hardly takes 15-20 mins) and it will save you many many hours if you configure it correctly.
If you don't want to recompile the kernel, use 2.6.18 kernel packages from the DVD/testing."

But thanks for the advice, I'll try to download a latest kernel for my Slackware, and see if that would solve my problems.

Thanks,
Jozsi
 
Old 11-09-2007, 07:19 AM   #6
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
I would urge restraint here.

Linux kernel tweaking is not an overly difficult task however first, it may be prudent to provide a history lesson in laymen terms.

In the "old days" hardware was lean, mean and expensive. It was wise to "trim" a kernel right down to the bones and only to include support for your system. This meant smaller kernels through reduction of kernel space hardware support and modules, thus maximising use of what was then limited resource, particulary RAM and cumbling CPUs.

Nowadays, even a "measly" 512MB RAM and a petty Pentium-III is sufficient to retain and execute the most bloated of kernel without much paging activity. Add to this the fact that newer kernels are modularised: The kernel contains a sekelton of static hooks for which there is a corresponding module (a .ko file). These modules are typically only loaded if needed. New kernels are quite intelligent like this

Your specific symptoms do not lead me to believe that you need to tweak the kernel.

I suspect if you downloaded the latest kernel and used the "yaird" tools (synaptic) to make an initrd image, then via GRUB you should be able to boot both quickly and successfully.

Generally learning kernel compilation is a reasonably good feat of engineering and wil stand you well, however, I would propose you "play" with kernels once you have your system working. And..always, ALWAYS, keep a good working kernel available at boot time (in GRUB) - never delete it either from /boot or grub's menu.lst !!!!

Last edited by keratos; 11-09-2007 at 07:21 AM.
 
Old 11-09-2007, 07:50 AM   #7
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
p.s.

The current stable stock kernel is 2.6.23.1

If you are using 2.4 then you are pre-historic !!

2.5 would be a "50/50" hit !!

2.6 is for new dudes!!
 
Old 11-12-2007, 12:01 PM   #8
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Original Poster
Rep: Reputation: 16
Hi All,

Thank you guys for the help.

This is the other reason for I want to build a new kernel:
http://lkml.org/lkml/2007/8/3/129

I also installed a 32 bit system and the kernel shipped with slackware has a bug for my machine + configuration.

I am still collection information, but I have an idea now about how to do this kernel configuration, to me it seems really painful, but probably rewarding in the end :-)

I have some new questions again:

Keratos has written: "Add to this the fact that newer kernels are modularised: The kernel contains a sekelton of static hooks for which there is a corresponding module (a .ko file). These modules are typically only loaded if needed. New kernels are quite intelligent like this" Does this mean that if I cannot decide if a given stuff should be included in the kernel, I should make it a module-> the system can load it if it wants. If this is so, just a theoretical question: if I select everything to be a module except for the SATA drivers (which should be static otherwise my system wont start without further configuration) then only the necessary modules will be loaded, so kernel build time and hard disk space is big, but the load time is minimum?

Keratos has suggested to use the "yaird" tools. I have never heard of this, so I have google-d it. If I am not mistaken, the initrd image is created by slackware when I run 'make install' and 'make modules_install' (probably with the yaird tools, I have no idea). I hope it is so and I dont have to learn to use the yaird tools as well, because things are complicated enough by now anyway :-)

Is there a way to find out whether the bug described in http://lkml.org/lkml/2007/8/3/129 (clock problems on Turion with 32-bit kernel) is solved in the current kernels? Probably then I could use the original config file for the default hugesmp kernel with 2.6.23.1 and all my troubles would be gone :-)

Thank you for all your help!!!

Jozsi
 
Old 11-13-2007, 03:59 AM   #9
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
Hi again.

First things first..

In my humble view, you have chosen perhaps one of, if not THE, more difficult linux distro - slackware. Given your experience - no disrespect - I would urge you to consider something like ubuntu (x64) or MEPIS or mandriva (x64) or PClinux (which is 32bit). All are user friendly and this sort of kernel update is trivial, boot times are quick, and they offer an excellent introduction to linux. I really do feel that slackware is not for you yet, kind of running before you've learnt to walk.

Incidentally boot times for most linux systems are nowadays relatively speedy and this can be further reduced by disabling services that are started at boot, which are not really required.

Your struggling seems to reinforce my view.


Anyway, to answer your questions:

Does this mean that if I cannot decide if a given stuff should be included in the kernel, I should make it a module-> the system can load it if it wants. If this is so, just a theoretical question: if I select everything to be a module except for the SATA drivers (which should be static otherwise my system wont start without further configuration) then only the necessary modules will be loaded, so kernel build time and hard disk space is big, but the load time is minimum?
These days very few kernel drivers are built-in. Usually the drivers that are built in are to support the booting process, so typically that might be, for example, IDE, CDROM, SATA etc. With these loaded, the kernel can find and load the additional driver modules required. So "YES" sort of, is the answer to your question.

Keratos has suggested to use the "yaird" tools. I have never heard of this, so I have google-d it. If I am not mistaken, the initrd image is created by slackware when I run 'make install' and 'make modules_install' (probably with the yaird tools, I have no idea)
Not sure about slackware, but as I stated here, you might be better off working with a distro that offers a wide community base, for example, this article is superb, for ubuntu: https://help.ubuntu.com/community/Kernel/Compile

I hope it is so and I dont have to learn to use the yaird tools as well, because things are complicated enough by now anyway :-)
My point precisely, about using Slackware. Upgrading to the latest development kernel in ubuntu, pclinux, mandriva etc. is a simple case of running synpatic (a package manger) and installing it with a few mouse clicks.

Is there a way to find out whether the bug described in http://lkml.org/lkml/2007/8/3/129 (clock problems on Turion with 32-bit kernel) is solved in the current kernels?
Yep! have a look at http://www.kernel.org/pub/linux/kern...1/announce.txt and search for "clock events". I think its in there.

The "easy" option for now is to simply use 2.6.20 is it not?

Even easier, just install ubuntu and download the kernel, modules and initrd, all from synaptic.

Last edited by keratos; 11-13-2007 at 04:01 AM.
 
Old 11-13-2007, 08:39 AM   #10
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Original Poster
Rep: Reputation: 16
Hi Keratos,

Thank you very much for your detailed answer and help!!! Now I have a strategy that I can try to follow.

"The "easy" option for now is to simply use 2.6.20 is it not?"
Yes, you are right. When I began this whole thing, I hardly knew anything about the kernel, so I was not sure if I can use an older version than what the installer was made with. I think I will try to use 2.6.20 version, and play around with the configuration, just for curiosity. If I fail to configure a kernel that works well, I will use the default SMP config file for Slackware and build 2.6.20 with that.

Thanks!!!
Jozsi

PS: I think for this specific problem Ubuntu would cause the same headache. Building the kernel is not a big deal on Slackware: http://www.linuxelectrons.com/featur...-compile-howto Configuring it is, but I think that is distribution-independent :-)
 
Old 11-14-2007, 01:39 AM   #11
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
Hi Jozsi

Yes you are correct - building a kernel can be thought of as a generic process, it is just that some distros provide toolsets and problem resolution tools - in case things dont go to plan

And Yes, you are again correct that a default install kernel can be substituted by an older kernel from a package download or as you are engaged in, a manual compile. Indeed, some distros purposely include older kernels, at a particular revision where systems appears quite stable. So there's nothing wrong in principle with using 2.6.20. In practice, lets hope all your hardware is compatible, lets face it - 2.6.20 is not too far back in our history. 2.4.x kernels, well that would be another thing - lol.

One thing to remember/check, after installing/self-building a new kernel, is that the /boot/grub/menu.lst file is updated (automatically or manually if self-building) to allow you to boot the "new"(aka old!) kernel at power-up. **assumes you use GRUB not lilo !

Slackware is a great distro, quite responsive and clean and traditional by all accounts - you probably could not have chosen a more suitable distro for learning about the inners of linux. I have to say, for a n00b, your impressing.

Good luck - tell us how you get on.

Last edited by keratos; 11-14-2007 at 01:49 AM.
 
Old 11-19-2007, 06:29 AM   #12
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Original Poster
Rep: Reputation: 16
Hi Keratos,

I am happily writing that during the weekend I was able to up(down? :-))grade my kernel. I have tested the latest 2.6.22 (2.6.22.9) and it was failing the same way as the 2.6.21 that was included in Slackware 12. But 2.6.20.19 seems to work very well, and my Linux is using now both cores of my processor in 32 bit. I have turned many options into modules and have also left out some things. I was not brave enough to leave out everything that could probably be left out, but I was trying to mark everything to be a module if that was possible.

As you expected, the new kernel did not shorten the time BIOS checking is performed - it still takes more than a minute. I will try to dig into this again... at least I have given it a try :-)

Thanks for all your help!!!

Jozsi

PS: If a beginner guy like me finds this page :-) I'll put some links:

To me this was the most useful book:
http://www.digitalhermit.com/linux/K...GURATION-INTRO
But the web address is not accessible at the moment, so I found the same book here:
http://www.kernel.org/pub/linux/kern...h/lkn/lkn_pdf/

A detailed description about menuconfig:
http://howto.wikia.com/wiki/Howto_co...e_Linux_kernel

good detailed howto (no config stuff, but the troubleshooting chapter seems very useful):
http://www.faqs.org/docs/Linux-HOWTO/Kernel-HOWTO.html

this is a document that is for ubuntu, but the "Kernel Config Options" chapter contains some useful suggestions:
http://timia.net/agios/index.php?page=UbuntuKernel

someone who has a laptop that is similar to mine has written an article about his kernel config:
http://red.caek.org/ubuntu-dv6258se.html#k_processor

If you make a mistake with lilo (e.g. forget to call lilo after building the kernel) and your computer does not boot, there is a way to run lilo after booting with the help of the cd:
http://slackwiki.org/Lilo

Last edited by bjdodo; 11-22-2007 at 03:09 AM. Reason: I have added the lilo link that might as well useful
 
Old 11-20-2007, 02:16 PM   #13
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
Well done Jozsi.

Could this be a BIOS issue? Have you tried:
- updating the BIOS firmware?
- reducing the HDD detect time?
- turning off devices and channels/controllers and ports (serial etc) not in use.
- Is memory testing off ("quick boot")?
- Turn of APIC/APM (power management).
- Turn off wake-up for devices (LAN, modem, ports etc).

Well done anyway and top points for posting the links for anyone who should stumble across this thread. Nice 1 !!
 
Old 11-26-2007, 06:46 AM   #14
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Original Poster
Rep: Reputation: 16
Hi Keratos,

I was struggling with this BIOS check thing, and this is what I found:

http://en.wikipedia.org/wiki/Vmlinuz

"The stub decompresses the kernel code, on some systems printing dots to the console to indicate progress, and then continues the boot process."

I think this is what takes me too long, after I select Linux in lilo I see the dots appear and at the end it says something like BIOS check successful, but apparently this has nothing to do with checking the bios. The default huge vmlinuz file in Slackware12 is 3.9 MB, buy configuring + rebuilding I was able to reduce it back to 2.9 MB, and now the number of dots that appear got around 20 percent smaller. So all in all I think the solution of this problem also requires a kernel rebuild and a smart way of configuration (I was false in saying that the time did not get shorter - it was just that I removed too few options).

Jozsi
 
Old 11-26-2007, 08:23 AM   #15
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by bjdodo View Post
Hi Keratos,

I was struggling with this BIOS check thing, and this is what I found:

http://en.wikipedia.org/wiki/Vmlinuz

"The stub decompresses the kernel code, on some systems printing dots to the console to indicate progress, and then continues the boot process."

I think this is what takes me too long, after I select Linux in lilo I see the dots appear and at the end it says something like BIOS check successful, but apparently this has nothing to do with checking the bios. The default huge vmlinuz file in Slackware12 is 3.9 MB, buy configuring + rebuilding I was able to reduce it back to 2.9 MB, and now the number of dots that appear got around 20 percent smaller. So all in all I think the solution of this problem also requires a kernel rebuild and a smart way of configuration (I was false in saying that the time did not get shorter - it was just that I removed too few options).

Jozsi
As you have found out, things happen in the shadows and you need to shed some light on them to truly find out what is happening.

The 'kernel' load time will be reduced slightly(negligible) by decreasing the size of the kernel. As an experiment, create a intrd. You should read the '/boot/README.initrd' to see how. You should see some difference in the load time of your file system.

As for the trimming of your kernel for the 'Dell Inspiron 1501', I would do a 'lspci -vv' from the cli to see what your hardware is therefore knowing what to include in your new kernel. The 'lspci -vv' will be a good indication of what your system hardware needs are for the new kernel.

As for Slackware 12, You should read the CHANGES_AND_HINTS.TXT, RELEASE_NOTES and UPGRADE.TXT to get some helpful information. As PV states, you should try to use one of the smp kernels if possible.

Code:
excerpt from CHANGES_AND_HINTS.TXT ;

It is recommended that you use one of the generic kernels (either the plain
  kernel-generic or kernel-generic-smp) for daily use.  For most systems,
  you should use the generic SMP kernel if it will run, even if your system
  is not SMP-capable.  Some newer hardware needs the local APIC enabled in
  the SMP kernel, and theoretically there should not be a performance penalty
  with using the SMP-capable kernel on a uniprocessor machine, as the SMP
  kernel tests for this and makes necessary adjustments.  Furthermore, the
  kernel sources shipped with Slackware 12.0 are configured for SMP usage,
  so you won't have to modify those to build external out-of-tree modules
  (such as NVidia or ATI proprietary drivers) if you use the SMP kernel.

If you are using one of the non-SMP kernels (huge.s or generic.s) and need
  to compile third-party modules (such as the proprietary NVidia driver),
  have a look in /extra/linux-2.6.21.5-nosmp-sdk/ for information on what
  is needed to build them.

As stated earlier, it is recommended that you use one of the generic kernels
  rather than the huge kernels; the huge kernel is primarily intended as 
  an "installer" and "emergency" kernel in case you forget to make an initrd.
  However, if you do use one of the huge kernels, you will likely encounter 
  errors like this:
    kobject_add failed for uhci_hcd with -EEXIST, don't try to register
  These occur because the respective drivers are compiled statically into the
  huge kernels but udev tries to load them anyway.  These errors should be safe
  to ignore, but if you really don't want them to appear, you can blacklist the
  modules that try to load in /etc/modprobe.d/blacklist.  However, make sure you
  remove them from the blacklist if you ever decide to use the (recommended)
  generic kernels.
I' ve read the thread with interest. You have worked hard to get to the point that you are at. Might I suggest that you read 'SlackwareŽ Essentials'. The SlackBook is a great place to get some background.

If you want to know a little more about the kernel then read the; 'Linux Kernel in a Nutshell' link which was referenced in 'Slackware-Links' formerly 'Slackware LQ Suggestions Links!' for other good online reference.

If you look at the Slackware-Links you will find links that will assist you further in your adventures with Slackware or Linux for that matter.

BTW, Welcome to Slackware! You should get evolved with the Slackware Forum to get additional information/help.
 
  


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
understanding kernel .config file (for kernel compilation) sudhirkumar Linux - General 2 09-07-2007 06:55 PM
Can't run kernel config after APT kernel install rollo Debian 9 04-12-2006 05:06 PM
INFO: creating a special secured kernel (grsecurity kernel patch) w sysctl config markus1982 Linux - Security 0 05-25-2003 05:29 AM
I lost rmed my kernel config file. Anyway to create one from the kernel? severedhead Linux - Software 3 07-12-2002 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:25 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