Slackware This Forum is for the discussion of Slackware Linux.
|
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-08-2006, 06:38 PM
|
#1
|
|
Member
Registered: Nov 2005
Location: Mansfield, PA
Distribution: Slackware
Posts: 97
Rep:
|
2.6 compiling for a complete idiot
hey guys, me again. every compile guide I look at seems to be different, and some of them have more info than others. after completely messing up my system a few times, I was hoping to find a complete guide, front to back, from getting the new kernel source, to booting the new kernel. All the info between, configuring, installing, LILO adjustments and so on.
Thanks in advance, Paul
|
|
|
|
01-08-2006, 07:29 PM
|
#2
|
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
Here is a guide I wrote that will work (I use the same method all the time):
http://www.matt-darby.com/go.php?id=Blog&post=39
|
|
|
|
01-08-2006, 07:40 PM
|
#3
|
|
Senior Member
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132
Rep:
|
Quote:
|
Originally Posted by Twister512
I was hoping to find a complete guide, front to back, from getting the new kernel source, to booting the new kernel. All the info between, configuring, installing, LILO adjustments and so on.
|
Good luck.
1) The kernel is a "moving target"
2) Many configuration options are system specific or user preference specific
The best guides can only give generalizations. To clarify, you are more than likely making the wrong configuration selections. Everyone does when they first learn (even after they learn  ). It is the only section that isn't "cut 'n paste" simple.
The best advice is to read the guides that you find. Read the kernel documentation. Try to understand the "why" of the guides. Start with a config that you know to work (at least boots). Tweak from there. The config selections are the only really important thing that tends to change.
***EDIT***
mdarby's guide is good.
Last edited by shilo; 01-08-2006 at 07:41 PM.
|
|
|
|
01-08-2006, 07:43 PM
|
#4
|
|
Member
Registered: Nov 2005
Location: Mansfield, PA
Distribution: Slackware
Posts: 97
Original Poster
Rep:
|
if I remember, isn't there some extra things to do if I am using reiserFS? like an initrd or something like that?
Thanks again for the information 
|
|
|
|
01-08-2006, 07:48 PM
|
#5
|
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
Nope, just make sure to compile in support for ReiserFS.
|
|
|
|
01-08-2006, 07:58 PM
|
#6
|
|
Member
Registered: Aug 2005
Location: China
Distribution: redhat(Fedora Core)->Debian Sid->Slackware
Posts: 91
Rep:
|
In fact it's really simple and good to compile kernel by yourself, what I did just followed the following:
Code:
#tar xvfj linux-xxx.tar.bz2 -C /usr/src/
#rm -f /usr/src/linux && ln -s /usr/src/linux-xxx linux
#cd /usr/src/linux
#make menuconfig
... choose what you need especially for your hardware ...
#make
#make modules_install
#cp arch/i386/boot/bzImage /boot/kernel-xxx
#cp System.map /boot/System.map-xxx
#cp .config /boot/config-xxx
...Then modify your /etc/lilo.conf and add the following...
/etc/lilo.conf
... ...
image = /boot/kernel-xxx
root = /dev/hdxy
label = slkxxx
read-only
... ...
... At last execute the command: ...
#lilo
... Ok ,reboot for the new kernel ...
#reboot
|
|
|
|
01-08-2006, 11:16 PM
|
#7
|
|
Member
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918
Rep:
|
The kernel compilation is really no big deal, what you need to be certain of is your hardware setup so that you can configure the kernel properly. After that is done the hard work is already over.
|
|
|
|
01-09-2006, 02:57 PM
|
#8
|
|
Member
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 610
Rep: 
|
Quote:
|
Originally Posted by zhy2111314
Code:
#tar xvfj linux-xxx.tar.bz2 -C /usr/src/
#rm -f /usr/src/linux && ln -s /usr/src/linux-xxx linux
#cd /usr/src/linux
|
I would not do these steps. Per the kernel readme and as said by Linus himself, you should compile the kernel in your home directory, not in /usr/src. Leave the symlink alone.
Linus' own words:
http://linuxmafia.com/faq/Kernel/usr...x-symlink.html
And the kernel official readme:
"INSTALLING the kernel:
- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
unpack it:
gzip -cd linux-2.6.XX.tar.gz | tar xvf -
Replace "XX" with the version number of the latest kernel.
Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be."
|
|
|
|
01-09-2006, 03:58 PM
|
#9
|
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,756
|
That has got to be the most widely ignored suggestion in the history of Linux. Particularly since things compiled against the kernel source (like drivers) expect the source to be in /usr/src/linux-kernelversion and will fail miserably if it isn't there. OK, you can always point to the kernel sources if they are elsewhere, but it seems as if the community expects them in /usr/src.
Heck, that is where the Slackware package puts it.
|
|
|
|
01-09-2006, 05:23 PM
|
#10
|
|
Member
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 610
Rep: 
|
Quote:
|
Originally Posted by Hangdog42
That has got to be the most widely ignored suggestion in the history of Linux. Particularly since things compiled against the kernel source (like drivers) expect the source to be in /usr/src/linux-kernelversion and will fail miserably if it isn't there.
|
Hmmm... I have never, ever had a problem with a module or driver compiling after building my kernel in my home directory. If there is a package out there that does not compile when the kernel has been built according to the official instructions as set forth by the kernel team, then it's the problem of the maintainer of that package not the kernel team. Perhaps if more people used the correct procedure then whatever problems you have apparently encountered would be eliminated.
|
|
|
|
01-09-2006, 08:21 PM
|
#11
|
|
Member
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918
Rep:
|
Pat puts it in /usr/src. Good enough for me. 
|
|
|
|
01-09-2006, 08:59 PM
|
#12
|
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
I've always put it in /usr/src. I haven't had a symlinked /usr/src/linux in years with no issues.
|
|
|
|
01-10-2006, 05:01 AM
|
#13
|
|
Member
Registered: Nov 2002
Location: Yorkshire,England
Distribution: Slackware, Slamd64
Posts: 47
Rep:
|
I use my home dir and have never changed the symlink
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:45 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|