LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


View Poll Results: How many times did you compile your kernel?
Never, I always use the distro's initial kernel 31 16.76%
1-20 65 35.14%
20-100 47 25.41%
I don't remember how many times! 42 22.70%
Voters: 185. You may not vote on this poll

Reply
  Search this Thread
Old 05-08-2006, 03:17 PM   #91
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15

Quote:
Originally Posted by Chinaman
Wrong. You have a commercial distribution listed as your Linux distro, and someone may have hacked "make_install" to do so, but normally it does not. And most distros don't even use grub -- they use LiLO.
No you are wrong! I did it with kernel source from kernel.org.
If you don't believe me, just try it yourself.
 
Old 05-08-2006, 03:21 PM   #92
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15
Quote:
Originally Posted by Chinaman
A "debian-based distributions" is not the same as Debian, nor did anyone but you in this thread mention Debian and commercial distro in the same post.

In the source of linux-2.6.16.14 I see absolutely nothing about GrUB. What I do see in README is this:
Code:
 - Do a "make" to create a compressed kernel image. It is also
   possible to do "make install" if you have lilo installed to suit the
   kernel makefiles, but you may want to check your particular lilo setup first.
And in that Makefile I see nothing to adjust any bootloader on it's own.

IMO you have to edit files to make that happen, no matter which bootloader you have. It is not possible with Kernel.org sources to

-- unless someone has edited the bootloader to suit the Makefile.

The reason I'm even carrying on this silly argument is because newbies who don't know any better will read this thread, follow erroneous advice, and then wonder what happened.

Slackware doesn't have any hacked scripts included in the distro -- everything is pristine. Therefore, if you follow what was posted by debasish_5849 you will reboot with the same kernel(s) you had before. Just trying to keep a little sanity in the process we're discussing here.
You better do some practical work before making a statement!
I have done it and it worked with grub. And I did it with kernel source from kernel.org
 
Old 05-08-2006, 03:33 PM   #93
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15
Quote:
Originally Posted by mimithebrain

make install overwrites the current kernel, and only works with lilo as far as I know.
No, make install does not overwrite anything if you are upgrading to a new version. Just don't recompile your old kernel source if are a newbie.

And it works also with grub, at least it did for me!

Last edited by debasish_5849; 05-08-2006 at 03:37 PM.
 
Old 05-08-2006, 03:44 PM   #94
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15
Quote:
Originally Posted by Chinaman
nor did anyone but you in this thread mention Debian and commercial distro in the same post.
English tip: "Don't tell me" means "Everybody would agree its not that".
It does not need anybody to say that before

Last edited by debasish_5849; 05-08-2006 at 03:46 PM.
 
Old 05-08-2006, 11:33 PM   #95
mimithebrain
Member
 
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843

Original Poster
Blog Entries: 1

Rep: Reputation: 30
debasish_5849:
Works with grub? nice! that's good, I must not have looked up that part of the documentation properly.

And it doesn't overwrite? cool, how does it install it then?
 
Old 05-09-2006, 03:28 AM   #96
milanc
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
Chinaman, i meant that when you do "make install", the kernel image, system.map and config file are copied to /boot or wherever your distro puts its kernel images, and that you must then edit your bottloader's config file... I never said that "make install" somehow updated lilo or grub, though /sbin/install seems to do it... and when i talked of debian and debian based distros, i didn't mix them up: the "-based" was because of:
- ubuntu
- xandros (commercial distro)

PS: i just use "update-grub" in debian and ubuntu to use my new kernel at next boot (of course, this works only for grub)...


mimithebrain, it doesn't overwrite the current kernel image, it copies the new one to /boot with the others, and changes the symlink /vmlinuz so it points to your new kernel (link to old kernel = /vmlinuz.old)


My way to compile a kernel:

Code:
(Login as root)

Before first compile:
$ apt-get install libncurses-dev

Then:
$ cd /usr/src
$ wget ftp://ftp.kernel.org/pub/linux/kerne...-2.6.X.tar.bz2
$ tar xjf linux-2.6.X.tar.bz2
$ cd linux-2.6.X
$ make menuconfig

(Configure the kernel)
$ make

$ make install
$ nano /boot/grub/menu.lst

Or instead of the last 2 steps, if you have dpkg (used by apt-get, in debian, ubuntu & co.):
$ make deb-pkg # so that i have a .deb package if i need to reinstall the whole distro
$ cd ../
$ dpkg -i linux-2.6.X_2.6.X_i386.deb
$ update-grub # after having adjusted the default options on the line that starts with "# kopt="

Last edited by milanc; 05-11-2006 at 03:24 PM.
 
Old 05-10-2006, 06:01 AM   #97
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15
Quote:
Originally Posted by mimithebrain
debasish_5849:
Works with grub? nice! that's good, I must not have looked up that part of the documentation properly.

And it doesn't overwrite? cool, how does it install it then?
The kernels version string is added automatically to the kernel image's filename. So if you are upgrading to a new version, you don't need to worry about overwriting.
I did it myself and it works just fine.
 
Old 05-10-2006, 06:06 AM   #98
debasish_5849
Member
 
Registered: Jan 2006
Location: India
Distribution: fedora core 5
Posts: 42

Rep: Reputation: 15
Quote:
Originally Posted by milanc
PS: i just use "update-grub" in debian and ubuntu to use my new kernel at next boot (of course, this works only for grub)...
Cool tip I'm gonna try that
 
Old 05-10-2006, 10:35 AM   #99
mimithebrain
Member
 
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843

Original Poster
Blog Entries: 1

Rep: Reputation: 30
*The kernels version string is added automatically to the kernel image's filename.*

Then if your version string is the same, then it will get overwritten from what I read.
So my method of installing kernel is better for those who make many kernel of the same version with different configs. Those upgrading can use make install.
 
Old 05-10-2006, 12:53 PM   #100
milanc
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
The older kernel image is moved to (original name).old, initrd -> initrd.old, etc... (in debian and probably in other distribs too). But I think that if you compile three times the same version you do lose the oldest one...
When you configure your kernel sources, there's an option "append to version string:", so you don't have to fuss about kernel image names and overwriting later on.
 
Old 05-10-2006, 01:02 PM   #101
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
I didn't know what "append to version string" did. Thanks for the tip!
 
Old 05-11-2006, 08:38 PM   #102
MasterChief1234
LQ Newbie
 
Registered: Mar 2006
Distribution: Archlinux
Posts: 18

Rep: Reputation: 0
I has compilied about 18 kernels, and about 11 were custom compilied by me. I even wrote a tutorial on how to compile Linux Kernels on the Ubuntu Forums.
 
  


Reply

Tags
build, compilation, kernel, poll, reference



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
Kernel Panic after trying to update Kernel to 2.6 several times LearningToLive Slackware 10 01-19-2006 08:57 AM
System hangs; Atheros Madwifi-ping times out every 15/16 times james 456 Linux - Networking 0 01-12-2006 06:55 PM
I've compiled my 2.6.12.3 kernel 3 times!!! CPUFreak91 Linux - General 11 08-04-2005 03:33 PM
New kernel = font problem at times! Slovak Slackware 2 12-20-2004 03:55 PM
kernel compile times danchan Linux - General 2 04-11-2004 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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