LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-10-2008, 05:42 AM   #1
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Rep: Reputation: 31
I need help compiling my kernel =(


ok so i tryed to recompile my kernel, simple remove pcmcia and isa support. i use /dev/sda1 as my root partition. my motherboard doesnt support sata, so i have a pata boot drive with lilo to tell my machine to boot the sata drive.

/usr/src/linux kernel recompile frys my machine upon first try. i am informed of incomplete kernel headers. next, i will try /usr/src/$ rm linux
/usr/src/$ ln -s kernel2.6.26.5 linux
will this also fry my machine? any notes on how to retard proof kernel compilation for my specific machine? like to retard proof remove trash drivers that i do not need? like to foolproof insuring installing the drivers i am using for my hardware? all i know is that my system freaks out over 4 apps running at the same time, and would like to be able to watch some divx video, and not feel so over loaded slow. THX =D

Last edited by XavierP; 09-10-2008 at 03:00 PM. Reason: also fixed words
 
Old 09-10-2008, 07:28 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
First, did you copy the old config into /usr/src/linux-2.6.26.5 ?

if not, do:
cd /usr/src/linux-2.6.26.5
make mrproper
zcat /proc/config.gz > .config
make oldconfig (usually default answer is ok for the config questions)

Then you can add or remove features in kernel
make xconfig
(do it slowly, make sure you read the help, and ask question here if you don't know about kernel option in config)

Last edited by keefaz; 09-10-2008 at 07:30 AM. Reason: added make mrproper, just in case
 
Old 09-10-2008, 09:23 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Hope I'm not stepping on any toes, but I recommend you build under
the normal user's home directory. Your concern is only one good
reason, but good enough in itself. I've built custom kernels for
Slackware for over 5 years, and have never touched /usr/src.

Here's my simple kernel rebuild guide.

I know it works because I copy and paste from it. The only thing
I do that's not in the guide is the choices I make after issuing
"make xconfig".
 
Old 09-10-2008, 09:45 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I use /home/build/kernels instead of /usr/src for my part, but the OP used /usr/src and I think Alien Bob's kernel compilation tutorial uses this directory too, so...
 
Old 09-10-2008, 09:52 AM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
I too hope I'm not treading on any toes here. This is a quote from Linus Torvalds.The full mail is available here

This is the relevant bit ..
Quote:
I would suggest that people who compile new kernels should:

* NOT do so in /usr/src. Leave whatever kernel (probably only the header files) that the distribution came with there, but don't touch it.

* compile the kernel in their own home directory, as their very own selves. No need to be root to compile the kernel. You need to be root to install the kernel, but that's different.
Admittedly sometimes I have gone against his advice when it's given me some odd problems but that's only been through my own stupidity and wanting a quick fix to my predicament.

It seems the man would like it done this way, (in ~/), though..

edit: Thankfully I haven't had a need to compile my kernel for some time as the stock generic works great for me.

Last edited by bgeddy; 09-10-2008 at 09:54 AM.
 
Old 09-10-2008, 11:49 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Here's a good guide on how to build kernels:
http://alien.slackbook.org/dokuwiki/...kernelbuilding

I also personally build kernels in my home directory as a regular user, mostly because it's easier and less dangerous.
 
Old 09-10-2008, 12:02 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Yes, and no additional trick required to make xconfig as regular user
But YMMV of course
 
Old 09-10-2008, 12:08 PM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

I also like to create '/home/build' directory to utilize for open builds of a kernel. I've done it this way for a long time. I leave my tree intact.
 
Old 09-10-2008, 04:16 PM   #9
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
thanks for all of the responses. i learned my lesson about using /usr/src the first time =) sucks i lost 1000 gigs of data in the process. now the deal with the boot drive, should i move my boot images to the ide drive that boots the computer, or even install the kernels to that drive??? should i install the kernel to both drives?
 
Old 09-10-2008, 04:25 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You want a lilo chainloader I think, the lilo from pata boot drive loads the lilo from the sata drive which loads the kernel also on the sata drive, dunno if I am clear
I am not a lilo user, hopefully someone more qualified would chime in

[edit]
It is somewhat not clear to me what you call the 'pata boot', if you mean your /boot partition of Slackware system is on the pata drive, you don't need a chainloader

Last edited by keefaz; 09-10-2008 at 04:30 PM.
 
Old 09-11-2008, 03:46 PM   #11
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
i mean i have a full blown 10gb slackware 12.1 drive on the ide channel. i just setup the lilo on that drive to point to /dev/sda1 as its root. when the lilo comes up its the lilo from the pata drive, and never shows the lilo setup on the sata drive. im not 100% positive but i believe it is using the huge-smp kernel from the ide drive, NOT the sata.

the important parts of lilo are here

Code:
boot = /dev/hda
default ="tbLinux"

image = /boot/vmlinuz
  root = /dev/hda1
  label = Linux
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda1
  label = tbLinux
  read-only
# Linux bootable partition config ends
 
Old 09-11-2008, 03:56 PM   #12
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
When you finished doing whatever you did to LiLO,
did you issue "lilo" as root? If not, you have
not re-installed the bootloader.
 
Old 09-11-2008, 11:50 PM   #13
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
yes i have re run lilo, im asking what drive i should have the new kernel on.
 
Old 09-12-2008, 12:56 AM   #14
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
cd /usr/src/linux-2.6.26.5
make mrproper
zcat /proc/config.gz > .config
make silentoldconfig

silentoldconfig was just as loud as oldconfig.

what i seek is a script that automatically generates a "all.config" file to automate cutting out the kernel options that i do not need, and to easily get my kernel very fast with out having to reconfigure the kernel 50 thousand times.

i was under the impression that the zcat line would do that, and it might. oh well, im installing this kernel i just compiled.
 
Old 09-12-2008, 02:38 AM   #15
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
http://wiki.linuxquestions.org/wiki/...g_linux_kernel

=D

i am getting ideas, such as booting into the ide drive, setting it to mount the sata drive, and soft linking to the new kernel. this huge smp kernel is quite a drag on my 850mhz system, the 500mhz system was unacceptable. the 500 could not write a cd it was so freaked out from the overloaded kernel.

it would be nice for the distros to just include such things and run them upon initial install so that the kernel could be less crazy for newbies first installs. huge smp is no problemo on a dual core, not so on the 500.

im starting to get the idea to make an all module kernel to run these scripts since it does nothing to compiled in modules.

i would take a 500k script over a 4mb bloated turtle kernel any day.
 
  


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
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 01:45 AM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 02:29 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration