Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



Linux kernel installation

Mictlantecuhtli
02-06-2004, 02:47 PM
Ok.. here's how I installed kernel 2.6.2 to new Mandrake 9.2 installation.

Download the kernel source from www.kernel.org (http://www.kernel.org).

http://cc.joensuu.fi/~mlevanen/linuks/start_src.png

Uncompress it to somewhere you want. You might want to use GUI tools for uncompressing, I use tar:

tar jxf ~/Documents/linux-2.6.2.tar.bz2

Of course you need to replace ~/Documents with the appropriate directory if the package is elsewhere.

Now, from the kernel source directory, read Documentation/Changes, especially chapter "Current Minimal Requirements".

If you don't have the necessary tools for compiling, you need to install them (doh). Usually they come with "development" packages. Check with the suggested commands in console.

Next step is to configure the kernel.

make xconfig will give you a graphical screen to choose options from:

http://cc.joensuu.fi/~mlevanen/linuks/kernel-xconfig.png

make menuconfig will do the same in textmode.

When you're done, save and exit.

make will then compile the kernel.

This will take a while, depending on your computer's speed.

Then follows the installation:

sudo make modules_install install

Or if you're already logged in as root, omit sudo.

http://cc.joensuu.fi/~mlevanen/linuks/make_blah.png

Once that is done, it's time to check that bootloader configuration was successful. "make install" adds the new kernel automatically to /etc/lilo.conf and/or /boot/grub/menu.lst if those exist.

You should see something like this in /etc/lilo.conf:


image=/boot/vmlinuz-2.6.2
label=262
root=/dev/hda1
read-only
optional
vga=normal
append=" devfs=mount hdc=ide-scsi acpi=ht splash=silent"


The installer doesn't (always) update symlinks in /boot, so you might want to update them manually:

cd /boot
ln -sf config-2.6.2 config
ln -sf kernel.h-2.6.2 kernel.h
ln -sf System-map-2.6.2 System.map


initrd.img and vmlinuz symlinks should be correct already.

Then, if using LILO, run /sbin/lilo.

Reboot and enjoy.

Phantasm66
02-06-2004, 03:34 PM
Nice!

I read somewhere that you needed to upgrade certain XF86 components to work properly with 2.6..... is this true?

How is performance ? (I've only compiled development versions of the kernel, and never booted with them often.)

Ad
02-06-2004, 03:34 PM
  

Mictlantecuhtli
02-06-2004, 06:31 PM
At least in Mandrake 9.2, I didn't need to upgrade any components of XFree86. Performance is poor in my opinion, there are strange slowdowns every now and then (I compiled the kernel with 'pre-emptive' option). I don't think it's because of CPU power, I have two ~1.5 GHz Pentium IIIs. For now, I'll rather use 2.4.22.

Installing 2.6.2 in Red Hat 9.0 was trickier and I'm still having some problems with modules. First of all, procps and module-init-tools need updating:

Download procps from http://procps.sourceforge.net/ , compile & install with make && make install.

Download module-init-tools from ftp://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools (I used 3.0-pre9).

./configure
make
./generate-modprobe.conf /etc/modprobe.conf

If you're using devfs, copy modprobe.devfs to /etc.

depmod 2.6.2


In /sbin,
mv depmod depmod.old
mv insmod insmod.old
mv insmod.static insmod.static.old
mv lsmod lsmod.old
mv modprobe modprobe.old
mv rmmod rmmod.old


Now, from module-init-tools source directory, copy depmod, insmod, insmod.static, lsmod, modprobe and rmmod to /sbin.

Make the kernel as previously instructed.

This way kernel installs fine and boots without error messages, but some modules still won't install with insmod. For example, I compiled ALSA with emu10k1 module, but cat /proc/modules didn't show it.

If anyone of you know why, I'd like to know.

Phantasm66
02-06-2004, 07:32 PM
I am sure that I have tried installing 2.6 on Fedora Core 1 and it was fine. It got a couple of things failing on boot but I assume that these could be fixed or are probably things that you don't use anyway.

I will be putting another motherboard in my machine soon (its machine two's turn to be the server for a while) and I will be reinstalling Linux on that so I will try this then.... Probably next weekend.

Spike
02-06-2004, 07:56 PM
very nice! Thanks!

I jst downloaded the kernel from your link. I had a download speed of over 400 KB's per second, with a 512 KB connection! I've never had that before! I think I might get to like this linux lark. lol:grinthumb

Phantasm66
02-06-2004, 08:08 PM
Hehehhe well... yes... its fun.

Phantasm66
02-07-2004, 12:59 PM
Important article on linux 2.6 kernel compiling here:

http://www.linuxdevices.com/articles/AT3855888078.html

The following whitepaper is the first in a series by William von Hagen on using the new Linux 2.6 kernel, with a special emphasis on the primary issues in migrating existing drivers, applications, and embedded Linux deployments to a Linux distribution based on the 2.6 kernel. Material presented is largely vendor-neutral.

The full series will include:
Customizing a 2.6-Based Kernel

Migrating Device Drivers to 2.6

Using the 2.6 Kernel with Your Current System

Migrating Custom Linux Installations to 2.6

Migrating Applications to the 2.6 Kernel and NPTL
Enjoy! . . .

Spike
02-07-2004, 02:44 PM
OK. I tried earlier to do this by the method posted. Right at the end of the install, after it had added to lilo, I got an error message. something about there being no "dep" file.

I tried to run the command it then suggested where apon I got the same message again, and on further inspection I found that had no image file for 2.6.2 in the boot folder!

From what I've read, there's no need to "make dep" with 2.6.2, and so I ask the question, whats going on here? lol

Hopefully, if I can understand whats going on (or if I'm told what to do to stop it happening again!) I can get it right next time, and I won't have to reinstall linux. lol

Incidentally, now that I've reinstalled linux, I have my sound working. I guess I've either gained a little in experience, or I fiddled with the sound system on the last installation to destruction!

I have more information to post here in the form of URL's to other sites (namely, in a thread where I sought immediate help last night desperately trying to avoid killing the installation. ah well! :) which I will edit into this post later.

I really wish I knew what happened and how to avoid it.

Edit: http://justlinux.com/forum/showthread.php?threadid=121973

I also tried thi next thread and followed installation instructions there. I think I might have done something wrong where he wrote "type "sbin/lilo"", because when I rebooted, all I got from it was a series of dots at the top of a black screen with a flashing cursor next to them...

http://www.linuxquestions.org/questions/showthread.php?s=&threadid=73436

Mictlantecuhtli
02-07-2004, 03:18 PM
Originally posted by Spike
I think I might have done something wrong where he wrote "type "sbin/lilo"", because when I rebooted, all I got from it was a series of dots at the top of a black screen with a flashing cursor next to them...

The command is /sbin/lilo, it should output the options it adds to boot menu.

Didou
02-07-2004, 10:59 PM
Nodsu pointed to quite a few good guides on upgrading to the 2.6 kernel.

Mainly this one -> How To Upgrade To The 2.6 Kernel @ Kernel trap (http://kerneltrap.org/node/view/799) which itself links to that one ( for RedHat 9.0 users ) -> Migrating to Linux Kernel 2.6 @ thomer.com (http://thomer.com/linux/migrate-to-2.6.html)

I'll do like Mic & stick with 2.4.24 for now.

I've patched that kernel version with the Video4Linux2 libraries I need for my internship so I'll just play it safe from now.:)

Ad
02-07-2004, 10:59 PM
  

Nodsu
02-08-2004, 07:37 AM
I recommend 2.6 kernel for anyone who is having problems with responsivness under 2.4 kernel.

I can do heavy compression and play mp3s at the same time and still have instant keyboard input and smooth mouse cursor.

Module autoloading does not work properly for me under 2.6. I have to manually load NIC and sound modules in rc.local to make them work.

Phantasm66
02-08-2004, 07:40 AM
Oh there's no doubt that its a much better kernel than 2.4. But you have to make it work with your Linux, and that might mean (in some cases) upgrading some other components as well.

Or you could always wait until Fedora Core 2 or something comes out, or Suse Linux 9.1.

If you are a beginner, its probably not best, unless you are prepared to reinstall your Linux if it goes wrong. If you have Drive Image or Norton Ghost, make an image first before trying to upgrade.

However, compiling a kernel by hand isn't THAT BAD and you can have several kernels installed at one time, each pickable from LILO or GRUB or whatever, so that you can try out 2.6 but not overwrite your 2.4 kernel.

Spike
02-08-2004, 11:05 AM
ok. I tried again. No joy. Everything went pretty much by the book this time, but it still somehow went pearshaped!

I rebooted, lilo started, booted to the new kernel, and nothing but a black screen where linux should be booting.

I restarted the computer, nothing but a black screen where the original kernel should have booted.

Once more, reinstalled. I think I'll wait for Mandrake 10. This is getting rediculous.

This is a little too much for one (ie. ME) so new to linux.

Phantasm66
02-26-2004, 12:18 PM
Here's very important article to read first before you upgrade to 2.6:

http://linuxdevices.com/articles/AT5793467888.html

Mictlantecuhtli
02-28-2004, 06:13 PM
Well, 2.6.3 is working fine here with my self-made Linux, but it didn't like Red Hat 9.0 much. Or maybe Red Hat didn't like it. Maybe the latter.

/root>uname -a
Linux micslinux 2.6.3 #13 Tue Feb 24 05:21:37 EET 2004 i686 unknown unknown GNU/Linux
/root>w
00:18:05 up 4 days, 18:34, 2 users, load average: 1.33, 1.12, 1.07
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
root tty1 Tue05 4days 4days 0.00s /bin/sh ./setiscript
root tty2 22:53 1:24m 0.00s 0.00s /bin/sh /usr/X11R6/bin/startx -- -nolisten tcp

Phantasm66
07-09-2004, 04:36 PM
Get Fedora Core 2 and you get 2.6 no problem.

2.6 is great. Things are much faster in general and Linux handles so much well in Xwindows, etc.

me(who else?)
10-01-2004, 09:48 PM
Help! I compiled the 2.6.8.1 kernel, and followed all the directions from the guides, but when I boot the new kernel it says that the bzImage cannot be found, despite the fact that it's in the boot folder. Here's my config file:

Didou
10-01-2004, 10:36 PM
It is easier if you tell us what distribution you're using.

me(who else?)
10-01-2004, 10:48 PM
SOrry, I'm running Red Hat 9.

Nodsu
10-02-2004, 07:24 AM
Well.. Go and see if that bzImage is actually in boot directory and that you haven't typoed anything.

Also, what guide did you follow?

me(who else?)
10-02-2004, 09:05 AM
I followed the guide at
http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html#WHY-REBUILD

I'm pretty sure it's not typoed, since I got further than this into the boot sequence before. Could it have something to do with permisions?

Phantasm66
10-02-2004, 09:34 AM
Originally posted by me(who else?)
SOrry, I'm running Red Hat 9.

AFAIK, the 2.4 kernel comes with RH9, not the 2.6 kernel. I think RH9 will not boot with a 2.6 kernel without errors, even if the kernel build was fine. If you want a new kernel, you will have to build from 2.4 source.

If you want to use 2.6 source code to build a 2.6 kernel and boot from that, download Fedora Core 2 and upgrade your RH9 to that.


However, if you are getting an error loading bzImage, then you have incorrectly install the kernel. Please take us through what you did. And use 2.4 source for RH9. Maybe try again, and if you still get problems post back here with each step you did.

Installing a new kernel is easy so just let us know the steps you took (post commands if possible.) But if you following everything in that guide, then most like you have a mistake in your grub or lilo config.

me(who else?)
10-02-2004, 09:52 AM
So I should d/l the 2.4 kernel and patch it to 2.6, or is it going to be utterly impossible to do? Oh well, I guess I'll stick with 2.4. I was going to compile ACPI into the kernel for my laptop, I guess I'll see if it's available in 2.4

Phantasm66
10-02-2004, 10:08 AM
If its RH9, I would stick with 2.4.

Mictlantecuhtli
10-02-2004, 12:21 PM
So you have two partitions of RH9?

That grub.conf file shows 2.6.8.1 installation being in the second partition, is that correct?

In addition, having kernel parameter "root=LABEL=/" can cause problems too if you have two Linux partitions with the same name (it'd try to boot from the first one).

Phantasm66
10-02-2004, 12:34 PM
He may simply have the grub config wrong, and be pointing at the wrong partition.

My dedicated Linux box is currently running 2.6.8.1. I downloaded the source code from www.kernel.org and built it.

Mictlantecuhtli
10-02-2004, 12:47 PM
I'd recommend testing these boot settings from GRUB's own command line. It tells right away if partition type isn't correct or kernel image not found. You can get to "edit" mode by pressing 'e' when selecting the boot kernel.

me(who else?)
10-02-2004, 03:22 PM
Sorry, I didn't realize that was the partition number, it was set correctly before. I actually only have 1 RH9 partition.

me(who else?)
10-02-2004, 03:58 PM
I changed the partition number, but now I get in the boot a little whiles before I get a series of errors about RAMDISKS and bad blocks (which doesn't happen under 2.4).

Nodsu
10-03-2004, 07:04 AM
RH9 will need a huge amount of tweaking to get 2.6 kernel running on it. As you can see from this thread it is pretty tricky to do it even in FC1.

Mictlantecuhtli
10-03-2004, 07:36 AM
Originally posted by me(who else?)
I changed the partition number, but now I get in the boot a little whiles before I get a series of errors about RAMDISKS and bad blocks (which doesn't happen under 2.4).
Did you compile the kernel with appropriate filesystem and ramdisk support?

me(who else?)
10-03-2004, 09:35 AM
I honestly don't know, I'll make sure I compile them in tonight when I retry it.

edit: How do I identify what ramdisk support I need to add? I know my partition is ext3, but it would probably be safer to add ext2 as well, wouldn't it?

Phantasm66
10-03-2004, 10:00 AM
you should try to load in a config file from the samples given in the kernel source code included with the OS (under /usr/src/kernelname/configs/) when you run make xconfig. it will have a proper selection configuration already there, which can be used to build a kernel that will do everything need it to.

Phantasm66
10-03-2004, 10:03 AM
Here is an example file attached. To use it, you would rename to .config instead of .txt.

me(who else?)
10-03-2004, 10:35 AM
Thanks Phant! I didn't even think of using the old config file!:blackeye: Hopefully that will fix a couple of my problems.

Phantasm66
10-03-2004, 10:50 AM
You could always tweak the file as well a little, here and there. You should also save your config before compiling, so if it works well you can build from it again.

me(who else?)
10-03-2004, 03:20 PM
I tried just that and lo and behold, it works! I don't have any WLAN support though, so I'm compiling that in right now.

Phantasm66
10-03-2004, 04:02 PM
Nice one!

me(who else?)
10-03-2004, 05:53 PM
To soon to celebrate yet! My mouse is gone now, and I still can't get WLAN, but it can't be THAT hard to fix.

me(who else?)
10-04-2004, 08:13 AM
Mouse works now, and the 2.6 kernel is noticably more responsive!:grinthumb However, it's giving me errors upon booting about iptables not working. I've installed the latest version, but still no dice. Any thoughts?

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

Sony working on digital store for music, movies, books

Details of Intel's 32nm Atom emerge, on track for 2011

More Tech News

  
 Software Downloads

Norton Virus Definitions 2003-07 November 20, 2009

AVG Anti-Virus Updates November 20, 2009

Norton Virus Definitions 2008-09 November 20, 2009

avast! Virus Definitions November 20, 2009

McAfee SuperDAT Update 5808

Kaspersky Anti-Virus Update November 20, 2009

Google SketchUp 7.1.6087

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.