Linked by Thom Holwerda on Wed 8th Nov 2006 11:22 UTC, submitted by falko
Ubuntu, Kubuntu, Xubuntu "Each distribution has some specific tools to build a custom kernel from the sources. This article is about compiling a kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org (vanilla kernel) so that you are independent from the kernels supplied by your distribution. It also shows how to patch the kernel sources if you need features that are not in there."
Thread beginning with comment 179941
To read all comments associated with this story, please click here.
The way I do it
by usr0 on Wed 8th Nov 2006 14:13 UTC
usr0
Member since:
2006-10-27

I have implemented the kernel compilation as a function in my admin.sh script as followed:

k() {
cd /usr/src/linux
make menuconfig
make
sudo cp arch/x86_64/boot/bzImage /boot/linux
sudo make modules_install

# additional modules you need for your system
#cd /usr/src/modules/et131x
# sudo make
# sudo make modules_install

#cd /usr/src/modules/rt2500
# sudo make
# sudo make install

#sudo vmware-config.pl default
}

Reply Score: 3

RE: The way I do it
by netpython on Wed 8th Nov 2006 15:07 in reply to "The way I do it"
netpython Member since:
2005-07-06

mind if i borrow the script?:-)

Reply Parent Score: 1

RE: The way I do it
by skx2 on Wed 8th Nov 2006 16:41 in reply to "The way I do it"
skx2 Member since:
2005-07-06

I notice that your script copies bzImage into /boot/linux literally - rather than giving it a version number.

I'm sure that would simplify updating lilo/grub, but it does mean there is a fair chance of overwriting a working kernel with a broken one if the options were incorrect.

Reply Parent Score: 3

KISS
by usr0 on Wed 8th Nov 2006 17:17 in reply to "RE: The way I do it"
usr0 Member since:
2006-10-27

I've already thought about the option of versioning the images...

If you compile the kernel for the first time and do not know which parts must be included statically and not just as a module, the kernel may not boot. But the linux/.config files adapt to a higher kernel version. So if you once compiled a working kernel, you can keep the .config and be sure that a higher kernel version will also compile and boot without any problems. I am using these way for more than 2 years and had never trouble.

And as you have mentioned, you do not need to update the menu.lst file in grub (not sure with lilo...) - that is one of the reasons I use these way:

Another reason - I like KISS! ;) Not the band... ;) Keep It Small and Simple.

Reply Parent Score: 1

RE[2]: The way I do it
by usr0 on Wed 8th Nov 2006 17:19 in reply to "RE: The way I do it"
usr0 Member since:
2006-10-27

I've already thought about the option of versioning the images...

If you compile the kernel for the first time and do not know which parts must be included statically and not just as a module, the kernel may not boot. But the linux/.config files adapt to a higher kernel version. So if you once compiled a working kernel, you can keep the .config and be sure that a higher kernel version will also compile and boot without any problems. I am using these way for more than 2 years and had never trouble.

And as you have mentioned, you do not need to update the menu.lst file in grub (not sure with lilo...) - that is one of the reasons I use these way:

Another reason - I like KISS! ;) Not the band... ;) Keep It Small and Simple.

Reply Parent Score: 1