Editing the Kernel to make hardware work

Posted on 2004-09-26
Last Modified: 2010-04-20
Im haveing bother getting my modeom and sound to work in my new Mandrake installation. MY first time working with Linux so im not really sure what needs done. My modem is a Zyxel 630-11 and my soundcrad is an Audigy 2 ZS. I have found drivers for both but im just not sure how to get them installed.



Both talk about editing the Kernel and recompling it. The instructions say "type this or type that",but where should I be typing these commands? How can I open the Kernel to edit it and how do I compile it again?
Question by:me1191
  • 3
  • 3
LVL 11

Expert Comment

ID: 12155615
Heres how to compile your kernel. If you havent got the kernel source on your pc get from the cd you installed mandrake from.

ok you have to be root, you then have to go to the directory where your source is. It is usually something like - /usr/src/linux-2.x.x etc when your in that directory you type make menuconfig this loads a console GUI that allows you to select options and modules. The site: shows a rudimentary version of the type of menu you'll see ie this bit

"Code maturity level options  --->
     [ * ] Prompt for development and/or incomplete code/drivers
 Loadable module support  --->
     [ * ] Enable loadable module support
     [ * ]   Module unloading
 Device Drivers  --->
     Networking support  --->
         Networking options  --->
             < M > Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)
                 < M >   RFC1483/2684 Bridged protocols
             < M > PPP (point-to-point protocol) support
                 < M >   PPP support for async serial ports
                 < M >   PPP support for sync tty ports
                 < M >   PPP Deflate compression          
     USB support  --->
     < M > Support for USB
     [ * ]   USB device filesystem
     < M >   EHCI HCD (USB 2.0)
     < M >   OHCI HCD support
     < M >   UHCI HCD support
 Library routines  --->
     < M > CRC32 functions"

your menu should have the same options to these shown above, on your menu tick what is ticked above and then save your changes keep the default name which will be something like .config.

The you compile the kernel by doing the following commads

 make ; make modules ; make modules_install

once done you have to copy your new bzImage to the /boot I think from within your current directory assuming your in the source dir the path is arch/i386/boot

now cp bzImage /boot


Then edit your /etc/lilo.conf

and add the entry

image = /boot/bzImage
root = /dev/hda1 <- or whatever your /boot partition is on
label = "New Kernel"

save these changes then exit your editor and type lilo to update lilo

Then resume from step 4 at

Expert Comment

ID: 12159354
I haven't looked at the sites, and I don't know this hardware, but dont do this unless you have to. Check:

1) What is the module (driver) called? i.e. what is it that you would either 'modprobe' or 'insmod'? does it already exist on you system?

2) If you're only compiling a new module, you dont have to recompile the whole kernel; just put the source files in place (if they aren't already), and 'make modules modules_install'

3) Most distros configure their kernel so that they have support for pretty much all recent hardware, even if they may not detect them automagically. Try to run adsl-setup first and see what happens.

Author Comment

ID: 12174831
If I run the adsl set up it only finds the nvidia LAN built into my motherboard. So im assuming that it has no idea the modem is connected (usb).

Im having problems acually finding the kernel source code. However I have found a website that allows you to download any kernel version (in my case 2.6.3). The trouble with this is that im not sure what to download as there are five files under this particular kernel version...

linux-2.6.3.tar.bz2        17-Feb-2004 20:35   33M  
linux-2.6.3.tar.bz2.sign   17-Feb-2004 20:35  248  
linux-2.6.3.tar.gz         17-Feb-2004 20:35   41M  
linux-2.6.3.tar.gz.sign    17-Feb-2004 20:35  248  
linux-2.6.3.tar.sign       17-Feb-2004 20:35  248

This is the URL:-

Also, through trying some screensavers I can see that my graphics card driver has either not been install, or not installed properly during setup. So ive found the driver on ATI's website and im stuck with it too.

How do I run Is there an easier way to find which Xfree86 version im running?

Thankyou for your time.

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.


Author Comment

ID: 12179165
I was looking under "Hardware" and I can see my modem listed under scanners. Its listed there along with my LCD screen (matrix orbital). For the modem it says "Port libusb:002:002". So I assume it knows my modem is there, so how can I make it work? If I click the "run config tool" button then it says "alcatel telecom dynamite modem is nt in the scanner database, configure it manually?" (then I will get a list of scanners).

There is no section for modems in Hardware. All I have in there is a section called "Ethernet Card".

Expert Comment

ID: 12181271
Which distribution are you using? e.g. RedHat, SuSE, Lindows...?

Chances are your distro is using a kernel with patches that haven't made it into the official 'vanilla' kernel tree yet, so I wouldn't go messing about with that.

once I knows which distribution you're using, it becomes a lot easier to give specific directions.


Author Comment

ID: 12182505
I mentioned the distro in the first line of my original post. However, Mandrake 10. Kernel version 2.6.3

Accepted Solution

EinarTh earned 500 total points
ID: 12188943
Right, sorry, I missed that. Don't use mandrake myself, so bear with me...

In that case, you should use their software installation tool (which I dont know what's called) install the package 'kernel-source-???' where ??? matched your kernel version (which you can find by typing 'uname -r' at a command prompt (you can get one by e.g. pressing Alt+F2 and typing 'konsole' there).

Now, still using the command prompt do, 'su - ' to become root (you'll need your root passwd there), then 'cd /usr/src/', then do a 'ls -l'. You should see at least a directory called 'linux-???', where ??? is,again, the kernel version. There should also be a symbolic link called just linux, which points to the linux-??? directory. E.g. on my suse box:
einarth@dude:~ > ls -l /usr/src
lrwxrwxrwx   1 root root  17 2004-09-02 11:09 linux -> linux-2.6.5-7.108
drwxr-xr-x  21 root root 800 2004-09-03 16:47 linux-2.6.5-7.108

if that link isn't there, create it with 'ln -s linux-??? linux'.

Next, 'cd linux' and 'make oldconfig', then 'make menuconfig'. This will start the kernel configuration process. This is where you follow the instructions on the web sites, and in the first comment of this thread to configure support for your hardware.

Once that is done, you compile the kernel with 'make bzImage', then you compile the modules/drivers with 'make modules'. Next you install the modules with 'make modules_install'. This takes time, and requires you to have the development tools installed as well, i.e. gcc, glibc-devel etc.

Now, make sure you have a rescue or a bootable cd ready in case something bad happens (I recommend knoppix), because if the next steps fail for some reason, you propably wont be able to boot.

What you do next is to copy your newly compiled kernel into the boot dir, like so 'cp arch/i386/boot/bzImage /boot/linux-????' (again the ???? means.. you know).

Last thing on the list is to tell your bootloader about the new kernel. I dont know if mandrake uses lilo or grub ( you can 'rpm -qa | egrep -i "lilo|grub"' to find out), but in case of lilo, see comment 2 in this thread. In case of grub, open grub's config file (called either grub.conf or menu.lst and is somewhere under the /boot directory) with a editor (pico or nano or something else). Look for something like this:

title Linux
    kernel (hd0,1)/boot/vmlinuz root=/dev/hda2
    initrd (hd0,1)/boot/initrd

(this is from suse, your will be different, but similar)

Make another entry exactly like the one you found, but give it a different title, and make the kernel argument match your freshly compiled kernel.

Reboot, cross fingers, and once the boot screen comes up, select the new title to boot.



Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How yum repo uses sqlite3 to keep metadata about the repository? 2 53
number in printf 13 42
Certificate Request CentOS/Apache 1 16
Linux 3 31
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question