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.
I have asked in other forums, i have asked to other more experienced linux users, i have followed wrong or inacurate instructions found on the web and NO ONE, absolutely NO ONE seems to give me a simple answer:
How the hell do i compile and/or install a kernel?
I have numerous (as always with ANY linux) hardware detection and configuration problems and everytime i try to solve them the answer is invariably the same: "You have to compile the kernel, bla bla bla".
So once and for all could somebody tell me or indicate me a website that tells me IN DETAIL how to install and compile a kernel?
For what it's worth i'm now using MEPIS Linux (it's based on Debian)
I have installed my first kernel (the 2.4.23) 2 weeks ago I think and this howto really helped me. One important thing: never forget to use the "lilo -v" command when you are finished or you won't be able to boot your system anymore (I know that because I screwed it up the first time)
I suppose the described method still works for 2.6.0 but I will only try it on monday when I have more time...
anybody has already installed 2.6.0 the debian way?
This howto is based on 2.6.0
1 download the src from http://www.kernel.org/pub/linux/kern...x-2.6.0.tar.gz
2 move the src to /usr/src/ "su passwd mv /home/user.name/linux-2.6.0.tar.gz /usr/src/linux-2.6.0.tar.gz"
3 move to /usr/src/ "cd usr/src/"
4 ungzip src "gzip -d linux-2.6.0.tar.gz
5 untar src "tar -xvf linux-2.6.0.tar.gz"
6 link src "ln -s linux /usr/src/linux"
7 move to /usr/src/linux "cd /usr/src/linux"
8 configure src "make menu config"
9 build kernel "make bzImage"
10 move kernel to /boot "mv /usr/src/linux/arch/i386/boot/bzImage /boot"
ask me for a lilo howto if you need one
by the way, i just tried eniawix's instructions. they don't work.
i do exactly as he says in the previous post but when i get to the part "make menu config" there's an error message saying there is no such file or directory or something like that.
I tried "make menuconfig", "make config" and "make xconfig"
navarre9,
make sure you have installed all the necessary packages (check the howto in one of the previous messages)
maybe you don't have installed the kernel-package?
I don't know if your debian-based distro has apt-get, if so just try apt-get install kernel-package
and check the other necessary software in the howto (http://www.osnews.com/story.php?news_id=2949)
eniawix's instructions has bugs in steps 5 and 7. His instructions have you first unzip, then untar however the file he has you untarring in step 5 is the .gz file (zipped). You can combine steps 4 and 5 with a single command:
tar -zxvf linux-2.6.0.tar.gz
That will both unzip and untar the file. Once you've done that, check to make sure that you have a directory called linux-2.6.0 (or something similar). Now for step 7, he's having you create a symlink named linux to the directory that was created in steps 4/5. To correctly do that you need to execute the following command:
ln -s /usr/src/linux-2.6.0 linux
Again, check to make sure that the symlink has been created (ls -l).
Then drop down into your new linux directory (cd linux) and do a quick ls to make sure there are files there. If there aren't, you haven't done something right. And yes, it should be make menuconfig or make xconfig if you are running from a console in X.
And if you haven't already, have a read in the Slackware forum for DaOne's kernel guide for the
Would someone please explain to me why it's necessary to have
a the symlink link->linux-2.6.0 ? I don't understand the purpose of it.
Thank you.
edit:
wait. i thought of a purpose. it's so that other programs
that need the kernel source can use, right?
it's not needed for creating the new kernel image though, is it?
You're right, you don't need it to create the new kernel. In fact the kernel tree doesn't have to be in /usr/src. However, this is convention, so following it may avoid problems later on.
eniawix's instructions has bugs in steps 5 and 7. His instructions have you first unzip, then untar however the file he has you untarring in step 5 is the .gz file (zipped). You can combine steps 4 and 5 with a single command: tar -zxvf linux-2.6.0.tar.gz
navarre9 was incorrect about step 7
step 6 is broken i had 6 link src "ln -s linux /usr/src/linux"
step 6 should be "ln -s /usr/src/linux-2.6.0 /usr/src/linux"
Step 4 would result in a file named linux-2.6.0.tar so therefore step 5 needs to be tar -xvf linux-2.6.0.tar. Since you have tar -xvf on a .tar.gz file, it ain't gonna work. However, tar -zxvf would.
Quote:
step 6 should be "ln -s /usr/src/linux-2.6.0 /usr/src/linux"
that is why make menuconfig did not work.
In a word, no. You do NOT need the symlink for make menuconfig to work. You only need to be in directory created by unpacking the linux-2.6.0 tarball. I've successfully compiled many a kernel in directories that are not symlinked.
You're right, you don't need it to create the new kernel. In fact the kernel tree doesn't have to be in /usr/src. However, this is convention, so following it may avoid problems later on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.