I don't "do" Mandrake, so I've no idea what urpmi is doing with the
kernel source, but the steps for building a kernel from source are
pretty simple. Ignore all this "don't install into /usr/src/linux
stuff... it's just advice. I tend to trust signed kernels, and am
willing to take the risk involved in building as root. This advice
1. Download and unpack your kernel source.
You've done that.
# cd /usr/src
# wget -c
# tar -jxvf linux-2.6.10.tar.bz2
At this point, you have a fresh, unconfigured, uncompiled kernel source
tree in /usr/src/linux-2.6.10 - feel free to link this to /usr/src/linux
ln -s /usr/src/linux-2.6.10 /usr/src/linux
Now /usr/src/linux is a "shortcut" to the full kernel path. This is
handy as it saves typing time, and also shows which version you're
2. Configure your kernel.
This is where you set up your kernel so that it supports your hardware.
If you don't understand an option, just leave it at its default setting.
# cd /usr/src/linux
# make menuconfig
<choose all your options and save>
3. Build your kernel - this is where you make your system compile the
kernel source into a binary kernel.
Assuming you're still in /usr/src/linux:
# make && make modules && make modules_install
Hopefully, you'll not get any errors during compilation. If you do, you
may have enabled an experimental feature, or driver which will not build
on your system. go back to step 2, and try again...
4. Install your kernel
This is where you copy the compiled kernel to the /boot directory, and
setup your boot loader to use it.
Again, I'm assuming you're still in /usr/src/linux:
# mv arch/i386/boot/bzImage /boot/bzImage-2.6.10
# mv System.map /boot/System.map-2.6.10
As for updating your bootloader, that depends on whether you're using
grub or lilo, but you should be able to figure it out by looking at the
existing config file for either and adding a new block to use your new
kernel. Use common sense, and don't REPLACE the existing block, as if
your new kernel won't boot, you'll want to be able to select your old
kernel from the bootloader menu.
Hope that helps.
On Thu, 2005-01-06 at 11:15 +1300, SnapafunFrank wrote:
Finding it difficult to find someone with the patience
to help with this
so thought I would try local talent:
In the past, whenever I wanted to compile a `new` kernel, I would first
# urpmi kernel-source-2.6-n
# urpmi kernel
The kernels were not the latest release and of course rpm's were available.
Because of my usb concerns I thought I would `install` kernel-2.6-10 -
knowing I would have to compile from linux-2.6.10.tar.bz2.
So first thing, read the README at least, and straight off I'm lost,
though later it looks like my usual one step at a time approach will get
Here's were I'm lost:
"- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
OK - no prob with that.
"Do NOT use the /usr/src/linux area! "
Again, no prob, sort of covered that, I thought.
"- Make sure you have no stale .o files and dependencies lying around:
You should now have the sources correctly installed."
Huh! But I've only unpacked the bz2 file into my home directory - how
can anything be installed at this point?
Just in case I'm having a braindead week :
"BUILD directory for the kernel:
When compiling the kernel all output files will per default be
stored together with the kernel source code.
**[ Fair enough ]**
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
kernel source code: /usr/src/linux-2.6.N
build directory: /home/name/build/kernel
** [ Possibly not something I might require but better remember, just in
case ] **
To configure and build the kernel use:
** WOAH - WAIT UP- where in blue blazes did the directory
/usr/src/linux-2.6.N come from - yes. I have directories for previous
versions here but certainly not this one yet.
So right now I have the bz2 file in my /home/frank/src/ directory, have
it unpacked and I thought ready to go?????
So I go back and re-read things and find:
" If you install the full sources..... "
Right back at the beginning. The only file I have found is the bz2 file,
how can I have already installed the full sources. I thought they were
part and parcel of the bz2 file and as yet had to be installed.
Lost - braindead - BOTH. Any one want to do the rear seat kicking here?