Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: How many times did you compile your kernel?
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.
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
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="
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.
*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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.