Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does anyone know of a good place to find a "step by step" manual on how to install Kernel-source and all other developent pkgs needed to install drivers etc? I also am booting from floppy b-cuz I can't seem to get lilo to work right. I've tried the following but:
# Debian links
Installing Debian GNU/Linux 3.0 For Intel x86
The Very Verbose Debian 3.0 Installation Walkthrough
Debian Package Management HOWTO Version 1.1
# Compiling/installing kernel modules
You will need to have installed:
1. The developmental packages (compiler)
2. The kernel source code that matches your running kernel
3. The module source or install code
Check out your system and look under the hood and see if you installed the stuff you need to do the job. Open an x terminal and type in this sequence of commands to see what kernel we are running and see if you have the kernel source installed:
code:--------------------------------------------------------------------------------[fancy@tinwhistle fancy]$ su -
Password:
[root@tinwhistle root]# uname -r
2.4.18-3--------------------------------------------------------------------------------
I am running kernel version 2.4.18-3. Do I have the proper source code?
code:--------------------------------------------------------------------------------[root@tinwhistle root]# cd /usr/src
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x 4 root root 136 Jun 12 14:53 .
drwxr-xr-x 16 root root 424 Jun 4 12:04 ..
lrwxrwxrwx 1 root root 14 Jun 4 12:11 linux-2.4 -> linux-2.4.18-3
drwxr-xr-x 16 root root 584 Jun 4 12:11 linux-2.4.18-3
drwxr-xr-x 7 root root 168 Jun 4 12:08 redhat
[root@tinwhistle src]# --------------------------------------------------------------------------------
I do have the same kernel version source code installed in the directory /usr/src/linux-2.4.18-3 and there is a symbolic link named linux-2.4 pointing to it.
If you don't see something similiar to this (but in color), you will need to install the kernel source.
WHEN I GET HERE THE DIRECTORY IS EMPTY, I DID APT-GET INSTALL KERNEL-SOURCE-2.4.18 AND IT PUT THE TAR FILE HERE. THEN i UNTARRED IT WITH TAR -XVJF AND IT UNPACKED IT TO A DIRECTORY IN HERE. THEN, i DID MAKE OLDCONFIG THEN MAKE DEP THAT IS AS FAR AS i GET. i DONT KNOW WHAT TO DO NEXT (MUCH LESS IF I DID THAT RIGHT)
NOTE: I noticed that Red Hat didn't make the symbolic link /usr/src/linux that all of the INSTALL files that I have read mentioned that I need, so I may as well make one now to save editing the files in the source code to install.So, I'll make it just now:
code:--------------------------------------------------------------------------------[root@tinwhistle src]# ln -s linux-2.4.18-3 linux
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x 4 root root 160 Jun 12 15:46 .
drwxr-xr-x 16 root root 424 Jun 4 12:04 ..
lrwxrwxrwx 1 root root 14 Jun 12 15:46 linux -> linux-2.4.18-3
lrwxrwxrwx 1 root root 14 Jun 4 12:11 linux-2.4 -> linux-2.4.18-3
drwxr-xr-x 16 root root 584 Jun 4 12:11 linux-2.4.18-3
drwxr-xr-x 7 root root 168 Jun 4 12:08 redhat
[root@tinwhistle src]# --------------------------------------------------------------------------------
Ah, there it is, so that's done.
Next, did I install the compiler?
code:--------------------------------------------------------------------------------[root@tinwhistle src]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
[root@tinwhistle src]# --------------------------------------------------------------------------------
Yes, I have a compiler installed.
If you don't have those two things installed, you have to install them first off your install CD.
If they are installed, download the source and happy comiling. Make sure you carefully read the README and INSTALL files after extracting and before compiling/installing.
kernel-source is expected to be found in the directory /usr/src/linux-<kernel version number here>
Extract the tarball to /usr/src or move the directory /where/you/extracted/tarball/linux-<kernel version number here> to the proper place. Then as a result, you should have a directory /usr/src/linux-<kernel version number here> and you can do ln -s /usr/src/linux-<kernel version number here> /usr/src/linux
I would have thought that the command:
apt-get install kernel-source
should do all this stuff automatically.
It will in Red Hat.
Last edited by fancypiper; 08-28-2003 at 04:33 PM.
I'm having problems with this also... definitely a linux (redhat) newbie. So far I just installed basically all the defaults on the install CDs and installed the /usr/local/ directory CD given to me by my department sysadmin (I'm a grad student).
Here's what uname -a gives me:
Linux dhcppc2 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
Anyway, I want to install my sound card -- an Aureal au8830 -- but the "make install" command keeps giving me compiler errors, the first few lines of which are:
gcc -D__KERNEL__ -DMODULE -DAU8830 -O -Wall -pipe -m486 -I/lib/modules/2.4.18-3/build/include -O2 -fomit-frame-pointer -c -o vortex.o vortex.c
In file included from vortex.c:45:
/lib/modules/2.4.18-3/build/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
In file included from vortex.c:57:
/lib/modules/2.4.18-3/build/include/linux/string.h:8:2: warning: #warning Using kernel header
[root@dhcppc2 au88xx-1.0.5]# gcc -o vortex.o vortex.c
In file included from vortex.c:45:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
In file included from /usr/include/linux/timex.h:152,
from /usr/include/linux/sched.h:14,
from vortex.c:59:
/usr/include/asm/timex.h:10:21: asm/msr.h: No such file or directory
In file included from vortex.c:60:
/usr/include/linux/delay.h:13:23: asm/delay.h: No such file or directory
vortex.c:68:25: asm/uaccess.h: No such file or directory
[root@dhcppc2 au88xx-1.0.5]# make install
cc -D__KERNEL__ -DMODULE -DAU8830 -O -Wall -pipe -m486 -I/lib/modules/2.4.18-3/build/include -O2 -fomit-frame-pointer -c -o vortex.o vortex.c
In file included from vortex.c:45:
/lib/modules/2.4.18-3/build/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
In file included from vortex.c:57:
/lib/modules/2.4.18-3/build/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from vortex.c:53:
/lib/modules/2.4.18-3/build/include/linux/module.h:61: parse error before `atomic_t'
Anyway, /usr/src/ only had the directory redhat/ in it, which didn't seem that useful, so I made directories/links from /usr/src/linux/include and /usr/src/linux-2.4.18-3/include to /usr/include/ because that was the only place I found any include files.
From reading a bit around here, though, it seems that I shouldn't have had to make those directories (e.g. /usr/src/linus-2.4.18-3/) myself. So how do I get linux to install the kernel source and utils and whatever else I need?
Sorry, I'm just a complete newbie at this and would really appreciate the help.
Originally posted by vrooje I'm having problems with this also... definitely a linux (redhat) newbie. So far I just installed basically all the defaults on the install CDs and installed the /usr/local/ directory CD given to me by my department sysadmin (I'm a grad student).
<snip>
So how do I get linux to install the kernel source and utils and whatever else I need?
Have you tried the package management tool?
redhat-config-packages
If you can't figure it out with that, I recommend installing apt4rpm and then commanding:
apt-get install kernel-source
Or, install Red Carpet, subscribe to the Red Hat channel and install through that.
# Red Hat 7.3 down configuration commands setup leads to several configuration tools
# Red Hat 7.3 up configuration commands
Configure soundcard: redhat-config-soundcard
Configure X server: redhat-config-xfree86
Configure network: redhat-config-network
Manage software: redhat-config-packages
I'm running KDE, so I went into the Package Manager (KPackage) and searched for "kernel" and found one match, the Linux Kernel, under Kernel/Kernel, which is installed. I searched for "source" and found nothing. I searched for just "kern" and also found glibc-kernheaders, which is also installed.
So I downloaded apt4rpm and ran ./configure, then make, then make install. I got one error during "make" which involved my not having installed "help2man," but it didn't look critical:
Making all in server
make[1]: Entering directory `/usr/local/apt4rpm-0.65.1/server'
Making all in methods
make[2]: Entering directory `/usr/local/apt4rpm-0.65.1/server/methods'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/apt4rpm-0.65.1/server/methods'
make[2]: Entering directory `/usr/local/apt4rpm-0.65.1/server'
/bin/sh /usr/local/apt4rpm-0.65.1/missing --run help2man -I aptate.x -N -s 8 ./aptate > aptate.8
/usr/local/apt4rpm-0.65.1/missing: help2man: command not found
WARNING: `help2man' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
`Help2man' package in order for those modifications to take
effect. You can get `Help2man' from any GNU archive site.
make[2]: *** [aptate.8] Error 1
make[2]: Leaving directory `/usr/local/apt4rpm-0.65.1/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/apt4rpm-0.65.1/server'
make: *** [all-recursive] Error 1
Then again, what do I know? After installing, typing apt-get install kernel-source doesn't work; Linux can't find the command.
If I then go into the apt4rpm-##/client/ directory and just type apt, well, it pauses for a moment and then brings me back to the prompt. I then typed
apt -get install kernel-source
and it brought me back to the prompt, but then a minute or so later, I got the message
apt: apt-get: command not found
I can't find a straight command called apt-get anywhere in the directories installed when I "installed" apt4rpm.
It's just a freeking soundcard I want to install. Ach!
I wouldn't pick out source code until you get the stuff needed to handle it installed.
It would be much easier for you to download the two rpms for your Red Hat release version and install those.
Click the download link, and scroll down to:
Binary packages for RedHat can be found here (look for the called section: "How do I use the repository (RedHat 6.2 instructions)?")
Find 2 rpms for your release and put into /home/<user>/rpms,
Open an x terminal and type
su -
<give root password and press enter>
cd /home/<user>/rpms
rpm -Uvh *.rpm
apt-get install synaptic
Now you should have a pointy-clicky (GUI interface) to apt-get. Use that (it should show up on a menu somewhere, otherwise type synaptic in the x terminal)
or type
atp-get install kernel-source
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.