LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
LinkBack Search this Thread
Old 12-18-2008, 04:17 PM   #1
Runey
LQ Newbie
 
Registered: Sep 2008
Posts: 2

Rep: Reputation: 0
Unhappy Kernel


I have a new Kernel file “Linux-2.6.27.tar.bz2” but I don’t know how to update or replace the old Kernel for openSUSE and Ubuntu and Puppy. Please help. Thank you.
 
Old 12-18-2008, 04:36 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
A kernel typically needs to be compiled for your specific system. Normally, the first thing to try is to get a kernel from the distro repository (using the package manager). If you need a kernel that you cannot get that way, then you should simply get the kernel source code and compile it.

If you post some info on what particular features you need, someone may have more in-depth advice.
 
Old 12-18-2008, 05:18 PM   #3
mastemmer
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
Well, it figures that you have just downloaded a kernel source from kernel.org?
To compile and install a new kernel is not an easy task. My system is nether SuSE nor Ubuntu nor Puppy, so that i will not talk about distribution specific issues.
Generally to compile and install a new kernel you do the following:
1. Extract the .tar.bz2 archive:
tar xjf Linux-2.6.27.tar.bz2

2. Read the README file.

3. Configure the kernel. If you are in a graphic environment and have a Qt development library, you may use
make xconfig
This will ask you MANY questions about which parts you want to embed in the kernel, compile as a module or live out. Wrong answers will likely lead to a kernel that does not work in you system.
I recommend you to start with a configuration already set for your distribution. This can be done from the File->Load menu of xconfig, choosing a config file from /boot directory.

4. Compile the kernel with
make bzImage

5. Compile the modules with
make modules

6. Install the modules
make modules_install

7. The command "make install" is supposed to install the kernel modifying lilo.

I prefer to install the kernel manually to have more control:

Copy the bzImage from arch/i386/boot/bzImage to /boot

Add an entry to /etc/lilo.conf or the grub configuration to
have an option to boot the new kernel. Always keep the original kernel (usually /boot/vmlinuz) in case something goes wrong.

Reinstall lilo or grub.

Last edited by mastemmer; 12-18-2008 at 05:31 PM.
 
Old 12-18-2008, 05:22 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,192

Rep: Reputation: 120Reputation: 120
Generally the best way to get a good starting config is to use the one for the kernel you're running. After you unzip and untar the kernel source, go into the source directory and run the following two commands. The second one will ask you from none to many questions depending on what was changed in the new kernel. Normally you want to take the default answer, unless you know it should be different for your system.

Inside the kernel source directory:
Code:
cp /boot/config-`uname -r`  .config   (NOTE the back quotes.  They are NOT single quotes.)
make oldconfig
 
Old 12-18-2008, 05:51 PM   #5
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64® 14.0
Posts: 981

Rep: Reputation: 88
Quote:
Originally Posted by Quakeboy02 View Post
Generally the best way to get a good starting config is to use the one for the kernel you're running. After you unzip and untar the kernel source, go into the source directory and run the following two commands. The second one will ask you from none to many questions depending on what was changed in the new kernel. Normally you want to take the default answer, unless you know it should be different for your system.

Inside the kernel source directory:
Code:
cp /boot/config-`uname -r`  .config   (NOTE the back quotes.  They are NOT single quotes.)
make oldconfig
The openSuse & Ubombtu kernels are heavily patched so this approach may not work for him, correct?
 
Old 12-18-2008, 06:10 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,192

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by SqdnGuns View Post
The openSuse & Ubombtu kernels are heavily patched so this approach may not work for him, correct?
I didn't address that. All I addressed was how to get a good config. Whether he'll be happy with a vanilla kernel is something else entirely, as I don't run either Suse or Ubuntu. I run Debian, and have never run into any obvious problems with running a vanilla kernel.
 
Old 12-18-2008, 06:27 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,534
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
Quote:
Originally Posted by Quakeboy02 View Post
All I addressed was how to get a good config. (..) I run Debian
Somehow I doubt vanilla installs .config as "/boot/config-`uname -r`.config". At least my vanilla 2.6.27 didn't.
 
Old 12-18-2008, 06:30 PM   #8
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,192

Rep: Reputation: 120Reputation: 120
Runey,

Sorry for the diversion. My presence seems to be an aggravation to others, so I'll leave it to them.

Last edited by Quakeboy02; 12-18-2008 at 06:33 PM.
 
Old 12-18-2008, 06:42 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,192

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by unSpawn View Post
Somehow I doubt vanilla installs .config as "/boot/config-`uname -r`.config". At least my vanilla 2.6.27 didn't.
unSpawn,
On reflection, did you miss the fact that there is a space in front of ".config" (two actually, for emphasis), making ".config" the target name of the copy command?
 
Old 12-18-2008, 06:44 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,534
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
No aggrevation here. I just posted a comment hoping to clear up if that's vanilla slash custom slash distro-specific.
 
Old 12-18-2008, 06:57 PM   #11
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 129Reputation: 129
Here is the Ubuntu way; a few minor edits may be required to bring it up to date with the most recent kernel:
http://www.howtoforge.com/kernel_compilation_ubuntu
 
Old 12-18-2008, 07:00 PM   #12
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,192

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by unSpawn View Post
No aggrevation here. I just posted a comment hoping to clear up if that's vanilla slash custom slash distro-specific.
OK, here's the command again. Notice that it is first of all a copy command. It copies the file "/boot/config-`uname -r`". NOTE that this translates to the actual running config fileid; from my listed distro this would be: "/boot/config-2.6.27.2-smp". If I were running the kernel from Debian, it would be that. It copies this file to a file named ".config" in the current directory. I had specified that the OP go into the unzipped/untarred kernel source, before running the command. So, this command makes a copy of the config file for the running kernel as ".config" in the current working directory.
Code:
cp /boot/config-`uname -r` .config

Last edited by Quakeboy02; 12-18-2008 at 07:06 PM.
 
Old 12-20-2008, 07:56 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,534
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
Yeah, you're right: I missed the space. Kinda stupid. Point still remains though its not a command from vanilla linux-2.6.27.tar.bz2 Makefile or README.
 
  


Reply

Tags
kernel


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
kernel includes at /usr/src/linux/include do not match current kernel. blanny Red Hat 1 03-09-2006 07:53 AM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM


All times are GMT -5. The time now is 07:00 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