Mailinglist Archive: opensuse (3863 mails)
| < Previous | Next > |
Re: [SLE] Error Compiling kernel-source 2.6.2
- From: Anders Johansson <andjoh@xxxxxxxxxx>
- Date: Sat, 21 Feb 2004 03:17:13 +0100
- Message-id: <1077329833.24777.24.camel@xxxxxxxxxxxxxxxxx>
On Fri, 2004-02-20 at 20:55 -0500, Trey Sizemore wrote:
> I too want to try the 2.6 kernel on my SUSE 9.0 installation. Having
> never compiled a kernel before, would it be possible for someone to post
> a 'walk through' as to the steps as to how to best do this in SUSE?
By far the simplest would be to get one of the precompiled kernels from
the suse ftp site (or, preferably, one of the mirrors), from the people/
kraxel/ directory. Note that the current 2.6.3-0 has a few bugs. Make
sure you check out the various readmes in his directory, and make use of
his gpg key that he's put there (thank you)
> For
> example, let's say I download a kernel from kernel.org (my machine is a
> P4 2.8MHz). Which kernel (preferably 2.6.3 variety) should I grab and
> what commands should I use to compile it for my box?
Step 1: Unpack it in some directory (*not* /usr/src/linux). Let's say /
home/trey/linux-2.6.3/
Let's just refer to that directory as /src/ in future
Step 2: cd /src/
make xconfig
This will get you a nice qt interface for the kernel config. If you
prefer gtk, do
make gconfig
instead.
Step 3: select all the options you need in a kernel.
This is really the tricky step, and varies depending on what hardware
you use. It's difficult to give any general guidelines on this, just go
through the options and see what you need.
It's worth taking the time to do this properly the first time. When a
new kernel is published and you want to compile that, you won't have to
do it again. Or, I should say, you won't have to do the options you've
already done, only the ones that are new for the new kernel. So take
your time
Step 4: save and exit
At this point you may want to edit Makefile, and set
EXTRAVERSION=-trey1
or something. This will make your new 2.6.3 kernel be called 2.6.3-
trey1. The next you compile you can call -trey2, and so forth. That way,
the kernels won't overwrite each other. It can be good to be able to get
back to a previous kernel, if you experiment with the kernel options and
produce a kernel that won't boot. Then you can move on to
Step 5: run
make bzImage
assuming the compile finishes cleanly, go to
Step 6: If you selected anything to be compiled as modules, run
make modules
make modules install
Note that all the steps above can be run as your regular user, you don't
have to be root until you get to
Step 7: copy (or move) /src/arch/i386/boot/bzImage to /boot/vmlinuz-
2.6.3-trey1
In case you compiled reiserfs or other important features that you need
to mount your root partition as modules, you will need to do
Step 7a: run mk_initrd -k vmlinuz-2.6.3-trey1 -i initrd-2.6.3-trey1
That's pretty much it, except that you need to tell grub that there's a
new kernel, so
Step 8: edit /boot/grub/menu.lst
You can copy the default "Linux" entry, change the title and the name of
the kernel (the default is vmlinuz, change that to vmlinuz-2.6.3-trey1).
If you used an initrd, change that name too, otherwise you can simply
delete that line
Now, a few things have changed in the system since 2.4. The first step
is to run
generate-modprobe.conf
This will produce something that looks like a config file (/etc/
modprobe.conf and /etc/modprobe.conf.local), but it's not complete.
Look in /etc/modules.conf and see which module you use for a network
card, it'll be a line like
alias eth0 foo
copy that line to /etc/modprobe.conf
If you use a graphics driver like nvidia, you'll probably want to copy
that alias too, and the one for snd-card-0 couldn't hurt if you want to
listen to music
Also, the new kernel requires alsa >= 1.0, so if you haven't already
upgraded from http://packman.links2linux.org, now would be a good time
to do it
This should be all you need to get you up and running, and on the net.
You may see other problems based on modules that aren't properly
configured in modprobe.conf, but if you're online you can google or ask
about it.
and you'll always have the 2.4 kernel as a working fallback in case it
doesn't work, if you follow the above
DISCLAIMER: the above worked well for me. YMMV and all that, but it
should work. If I made a mistake there I'm sure they'll be corrected
viciously :)
> I too want to try the 2.6 kernel on my SUSE 9.0 installation. Having
> never compiled a kernel before, would it be possible for someone to post
> a 'walk through' as to the steps as to how to best do this in SUSE?
By far the simplest would be to get one of the precompiled kernels from
the suse ftp site (or, preferably, one of the mirrors), from the people/
kraxel/ directory. Note that the current 2.6.3-0 has a few bugs. Make
sure you check out the various readmes in his directory, and make use of
his gpg key that he's put there (thank you)
> For
> example, let's say I download a kernel from kernel.org (my machine is a
> P4 2.8MHz). Which kernel (preferably 2.6.3 variety) should I grab and
> what commands should I use to compile it for my box?
Step 1: Unpack it in some directory (*not* /usr/src/linux). Let's say /
home/trey/linux-2.6.3/
Let's just refer to that directory as /src/ in future
Step 2: cd /src/
make xconfig
This will get you a nice qt interface for the kernel config. If you
prefer gtk, do
make gconfig
instead.
Step 3: select all the options you need in a kernel.
This is really the tricky step, and varies depending on what hardware
you use. It's difficult to give any general guidelines on this, just go
through the options and see what you need.
It's worth taking the time to do this properly the first time. When a
new kernel is published and you want to compile that, you won't have to
do it again. Or, I should say, you won't have to do the options you've
already done, only the ones that are new for the new kernel. So take
your time
Step 4: save and exit
At this point you may want to edit Makefile, and set
EXTRAVERSION=-trey1
or something. This will make your new 2.6.3 kernel be called 2.6.3-
trey1. The next you compile you can call -trey2, and so forth. That way,
the kernels won't overwrite each other. It can be good to be able to get
back to a previous kernel, if you experiment with the kernel options and
produce a kernel that won't boot. Then you can move on to
Step 5: run
make bzImage
assuming the compile finishes cleanly, go to
Step 6: If you selected anything to be compiled as modules, run
make modules
make modules install
Note that all the steps above can be run as your regular user, you don't
have to be root until you get to
Step 7: copy (or move) /src/arch/i386/boot/bzImage to /boot/vmlinuz-
2.6.3-trey1
In case you compiled reiserfs or other important features that you need
to mount your root partition as modules, you will need to do
Step 7a: run mk_initrd -k vmlinuz-2.6.3-trey1 -i initrd-2.6.3-trey1
That's pretty much it, except that you need to tell grub that there's a
new kernel, so
Step 8: edit /boot/grub/menu.lst
You can copy the default "Linux" entry, change the title and the name of
the kernel (the default is vmlinuz, change that to vmlinuz-2.6.3-trey1).
If you used an initrd, change that name too, otherwise you can simply
delete that line
Now, a few things have changed in the system since 2.4. The first step
is to run
generate-modprobe.conf
This will produce something that looks like a config file (/etc/
modprobe.conf and /etc/modprobe.conf.local), but it's not complete.
Look in /etc/modules.conf and see which module you use for a network
card, it'll be a line like
alias eth0 foo
copy that line to /etc/modprobe.conf
If you use a graphics driver like nvidia, you'll probably want to copy
that alias too, and the one for snd-card-0 couldn't hurt if you want to
listen to music
Also, the new kernel requires alsa >= 1.0, so if you haven't already
upgraded from http://packman.links2linux.org, now would be a good time
to do it
This should be all you need to get you up and running, and on the net.
You may see other problems based on modules that aren't properly
configured in modprobe.conf, but if you're online you can google or ask
about it.
and you'll always have the 2.4 kernel as a working fallback in case it
doesn't work, if you follow the above
DISCLAIMER: the above worked well for me. YMMV and all that, but it
should work. If I made a mistake there I'm sure they'll be corrected
viciously :)
| < Previous | Next > |