LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-25-2004, 02:09 PM   #1
meinzorn
Member
 
Registered: Jan 2004
Posts: 44

Rep: Reputation: 15
Kernel Compile


I've done a lot of reading and such with kernel compiling and I've made a few attempts at doing so and I've failed every one of them.. I think one time I actually got the system to boot but I definatly did something wrong because it was really sketchy.

anyways, the main thing that I want to ask is does anyone know of a place where I can find a good step by step guide to compiling a kernel and making it work properly. I'm using Slackware Linux 10. Any help would be greatly appreciated.

just for background information, I wouldn't be messing with this, but I want to get going with the 2.6 kernel because I want to use Dropline Gnome, i've heard some good things about it and want to give it a try, but it claims that I need to have the 2.6 kernel for it to work.
 
Old 10-25-2004, 02:32 PM   #2
WhiteChedda
Member
 
Registered: Aug 2003
Location: Florida
Distribution: Mandrake 9.1 for now
Posts: 205

Rep: Reputation: 30
Re: Kernel Compile

Quote:
Originally posted by meinzorn
I've done a lot of reading and such with kernel compiling and I've made a few attempts at doing so and I've failed every one of them.. I think one time I actually got the system to boot but I definatly did something wrong because it was really sketchy.

anyways, the main thing that I want to ask is does anyone know of a place where I can find a good step by step guide to compiling a kernel and making it work properly. I'm using Slackware Linux 10. Any help would be greatly appreciated.

just for background information, I wouldn't be messing with this, but I want to get going with the 2.6 kernel because I want to use Dropline Gnome, i've heard some good things about it and want to give it a try, but it claims that I need to have the 2.6 kernel for it to work.

Believe it or not the README file that comes with the source is quite good.

However, if that will not suffice for you, check the slackware distro forum, there are a few.

That said,

I'll assume you are compiling 2.6.9 for slackware 10?

If so try this.

Assuming you have a clean install of slack 10

extract the source file to a path in your home/username path.

cd to it and issue the following BOLD commands

cp /usr/src/linux/.config ./.config
copy old config to current working path

make oldconfig
this will get your current config file and adapt it to the new kernel, it helps if you are not 100% up to speed on the various hardware/software features the kernel can support.

make menuconfig
look through and only change things you are 100% positive on. IE you may know you want ext2, ext3, ntfs and vfat file system support only, so turn them on and turn the others off, but be careful, if you are not sure whether you need an option or not, leave it as it is until you become more familiar with linux. You can always compile another kernel witha new config.

see that wasn't so hard right?
Now to finnish it up.

make bzImage

you can actually use any name in place of bzImage you like, even unclefucker if you're some rabid southpark fan. The common names are bzImage, zImage, and vmlinuz, but a kernel by any other name, will run the same. You just need to remember to tell the boot loader which kernel name to boot is all.

su
you need root access to finnish this up. If you are logged in as root you are a brave [or foolish] man. You do not need to su if you are already root, consequently you will not need to exit the su environmetn at the end.

make modules_install install

making the modules and installing whats needed, now we have to copy the image to the boot partition and configure lilo. But furst we need to rename the old kernel just in case. I will assume
you have a default name of vmlinuz, do a ls of the /boot partition and try to determine your kernel's name if its not vmlinuz.

mv /boot/vmlinux /boot/vmlinux.old
cp ./linux/arch/i386/boot/bzImage /boot/vmlinuz

Note if you changed directores from where you extracted the tar source to, then change back BEFORE you try to copy the compiled new kernel to the /boot partition.

vim /etc/lilo.conf
Edit your lilo.conf file you should just need to copy the exact entry for linux, and then change the title to linux.old and the image= to vmlinuz.old.
Then exit the editor, also note you don't have to use vim, I prefer jed myself, you can use any text editor you like

lilo
YOU MUST run lilo after editing lilo.conf or it will not use the new info and you will fail at this task.

reboot

if you have other stuff to do, don't issue this command, issue exit to get out of su instead if you went into su, otherwise, carry on. When you reboot you should see a new option on lilo, select linux not linux.old and watch the sparks fly.

You will very likley see some errors appear, especially if you moved some thigns from being modules [like the NIC card] to being embedded in the kernel becasue your rc.d config may still be trying to load the kernel. You can safely ignore them for the moment. If you can log in, and everything seems to actually run, you suceeded. Gather a list of any concerning errors you can not undestand and fix yourself and post a help request in the slackware distro forum.

My only errors were where rc.local was loading a module and running dhcpcd, from when they were modules, in the new kernel my NIC was driver embedded and DHCP was started elsewhere for it. Removing 2 lines from the rc.local config and I was all set.

Good luck.

Last edited by WhiteChedda; 10-25-2004 at 07:43 PM.
 
Old 10-25-2004, 02:33 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in Slackware, and has been moved accordingly to help your thread/question get the exposure it deserves.

That said, there's two pretty exhaustive threads,
one on 2.4, and one on 2.6 kernels right here
in the Slackware-forum... Sticky, even.


Cheers,
Tink
 
  


Reply



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
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
I want to compile 2.6 kernel and keep everything from 2.4 intact (dual kernel system) sina_kish Linux - Software 7 02-02-2005 09:01 AM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

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

All times are GMT -5. The time now is 12:48 PM.

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