LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-08-2006, 06:38 PM   #1
Twister512
Member
 
Registered: Nov 2005
Location: Mansfield, PA
Distribution: Slackware
Posts: 97

Rep: Reputation: 15
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
 
Old 01-08-2006, 07:29 PM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
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
 
Old 01-08-2006, 07:40 PM   #3
shilo
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: Reputation: 49
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.
 
Old 01-08-2006, 07:43 PM   #4
Twister512
Member
 
Registered: Nov 2005
Location: Mansfield, PA
Distribution: Slackware
Posts: 97

Original Poster
Rep: Reputation: 15
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
 
Old 01-08-2006, 07:48 PM   #5
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Nope, just make sure to compile in support for ReiserFS.
 
Old 01-08-2006, 07:58 PM   #6
zhy2111314
Member
 
Registered: Aug 2005
Location: China
Distribution: redhat(Fedora Core)->Debian Sid->Slackware
Posts: 91

Rep: Reputation: 15
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
 
Old 01-08-2006, 11:16 PM   #7
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 31
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.
 
Old 01-09-2006, 02:57 PM   #8
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 728

Rep: Reputation: 168Reputation: 168
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."
 
Old 01-09-2006, 03:58 PM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
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.
 
Old 01-09-2006, 05:23 PM   #10
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 728

Rep: Reputation: 168Reputation: 168
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.
 
Old 01-09-2006, 08:21 PM   #11
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 31
Pat puts it in /usr/src. Good enough for me.
 
Old 01-09-2006, 08:59 PM   #12
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
I've always put it in /usr/src. I haven't had a symlinked /usr/src/linux in years with no issues.
 
Old 01-10-2006, 05:01 AM   #13
ramen
Member
 
Registered: Nov 2002
Location: Yorkshire,England
Distribution: Slackware, Slamd64
Posts: 47

Rep: Reputation: 15
I use my home dir and have never changed the symlink
 
Old 01-10-2006, 02:49 PM   #14
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slack`er-current
Posts: 845

Rep: Reputation: 31
I wrote a guide that might help you out. It works well for me every time. http://www.linuxbox420.com/guides/kernelguide.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Partitions + recovery + FAT + ReiserFS + a complete idiot wini_g Linux - General 2 10-12-2007 06:02 PM
rm -Rf = I am an idiot RySk8er30 Linux - Software 48 01-17-2006 05:17 PM
complete newbie to compiling kerns speel Slackware 3 02-09-2005 10:44 PM
Complete idiot questions Darkstripes Linux - Newbie 1 07-20-2003 06:49 PM
Complete idiot, need advice installing Nvidia driver! usp8riot Linux - Software 16 05-03-2003 09:55 AM


All times are GMT -5. The time now is 11:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration