PDA

View Full Version : kernel 2.6.0



dobell
02-07-2004, 01:19 PM
Hi:

I have downloaded oficcial packages of kernel 2.6.0 and installed them with apt-get.

I think it is all ok. I did the configuration changes in lilo.conf (including vga=normal) but when I try to enter the new kernel (selected in lilo) it loads the kernel into memory, but then, it stops and doesn't do anything.

Where is the problem? What have I to do?

If I have to conpile the kernel sources, have I to install any required program?

Finally, if the kernel works, can i remove the kernel 2.4.22-xfs packages?

Thanks in advance

moosemaple
02-07-2004, 01:52 PM
I have the exact same experience with Knoppix 3.3 when I attempt to upgrade the kernel. The reports are that the bios is ok and it is uncompressing the kernel and then nothing happens. I've tried it on two machines and the same happens on each. Would appreciate any advice.

Stephen
02-07-2004, 03:03 PM
Hi:

I have downloaded oficcial packages of kernel 2.6.0 and installed them with apt-get.

I think it is all ok. I did the configuration changes in lilo.conf (including vga=normal) but when I try to enter the new kernel (selected in lilo) it loads the kernel into memory, but then, it stops and doesn't do anything.

Where is the problem? What have I to do?

If I have to conpile the kernel sources, have I to install any required program?

Finally, if the kernel works, can i remove the kernel 2.4.22-xfs packages?

Thanks in advance

Well I see no mention of you installing the module-init-tools or the linux-kernel-headers packages. Perhaps you could explain in more detail the steps you took in the compile as well. You could remove the 2.4.22-xfs kernel if you get the new to boot but it is always nice to have the working install kernel leftover in case you have any problems down the line this way you know that it should be bootable and when booted it should work as it did before.

shadowhand
02-07-2004, 05:55 PM
your configuration isn't right. i had the same problem... you have to enable the framebuffer console option, the VESA and VGA16 options. after you do that, it should work.... mine (kernel 2.6.2) boots, i just can't get my USB working yet.

(although i couldn't get it working before i installed 2.6.2... i highly recommend using the newer version.)

dobell
02-08-2004, 02:17 AM
Ok:

I downloaded all the 2.6.0 packages i found in a debian repository. Then installed them (dpkg...) and finally did apt-get check in order to correct dependences.

I modified my lilo.conf file, and it run until bios check is ok.

So i think I installed all the needed packages.


shadowhand:

how can i enable framebuffer console and VESA, VGA16 you say?

thanks

shadowhand
02-10-2004, 04:23 AM
Mini Guide to Compiling the 2.6.x Kernel for Knoppix
--------------------------

pre-setting up:
run "apt-get install mod-init-tools gcc" to get the newest compiled tools required for building the new kernel...

1. make sure you are using the newest kernel source (download 2.6.x latest stable from kernel.org)
2. untar/gzip/bzip the package into /usr/src/linux-[kernel version]
3. create a symlink linux > linux-[kernel version]
(ln -s /usr/src/linux-[kernel version] /usr/src/linux)
4. open the console and cd to /usr/src/linux
5. type "make xconfig" (without quotes) (this will create a graphical kernel configuration editor)
6. go through the options and select the ones that pertain to you (here is where you will find the options i was talking about)
7. when finished and you are sure that you have everything you need (or fairly sure, you can always recompile it) type these commands (without quotes):
"make-kpkg clean"
"make-kpkg kernel_image"
this will make a .deb package in the /usr/src directory that you can install (it will add the kernel to Lilo, set up the modules, and configure it for you).
8. install the package, run "lilo" in the console just to make sure it updated, then reboot and enjoy.

--------------------------
note: i had to compile about 5 times before i finally got all the correct options. if you aren't sure about your hardware, boot the Knoppix kernel (2.4.2-xfs probably) and run "lspci -v" and look over the modules that are running for your hardware. i found this very useful...

dimkal
02-12-2004, 08:31 PM
has anybody tried this? does it work?

garyng
02-12-2004, 09:38 PM
I don't see anything special about the KNOPPIX kernel so standard kernel building procedure should work(didn't it a number of times).

The easiest is just drop the .config of KNOPPIX into the 2.6.2(whatever) tree and start from there.

The gotchas as far as I know(which is unrelated to KNOPPIX but simply 2.4->2.6) is :

1. the input/console config seems to have changed which needs to be enabled(as mentioned above) when building. Otherwise, it boots but there is no way to control it(not a bad thing for headless server).

2. the kernel modules has been renamed to .ko which may cause some scripting error(I use discover which hardcoded to .o, don't know about knoppix)

3. the mod-init tools are all new and needs to be seperately installed. This may cause some issue in the initrd as Klaus compiled in the insmod/rmmod functions into the shell to load cloop etc. But if it is hd installation, I believe it is not needed in initrd(no idea).

4. it is better to have a /sys which is mounted to sysfs, though even without that, I haven't experienced critical problems using 2.6 but some said it is needed for some application.

totothehero
02-18-2004, 11:41 PM
Hi all

I'm running knoppix 2004-02-09EN, and am trying to upgrade to a 2.6 kernel (2.6.2 or 4, I just want a 2.6.X...). I've downloaded the kernel-source .debs (via apt) for 2.6.2, untar'd the kernel-source tar in /usr/src, symlinked the new directory with /usr/src/linux, cd'd to /usr/src/linux and tried make menuconfig. i also tried make xconfig, but no matter which config I try to make, I get the same error output:


root@castalia:/usr/src/linux# make xconfig
HOSTCC scripts/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/fixdep] Error 1
make: *** [scripts/fixdep] Error 2

The same occurs with the 2.6.0 kernel-source (I can't patch the 2.6.0 kernel, either, by the way). I dunno what to do. Any ideas? Thanks
toto

Stephen
02-19-2004, 12:51 AM
Hi all

I'm running knoppix 2004-02-09EN, and am trying to upgrade to a 2.6 kernel (2.6.2 or 4, I just want a 2.6.X...). I've downloaded the kernel-source .debs (via apt) for 2.6.2, untar'd the kernel-source tar in /usr/src, symlinked the new directory with /usr/src/linux, cd'd to /usr/src/linux and tried make menuconfig. i also tried make xconfig, but no matter which config I try to make, I get the same error output:


root@castalia:/usr/src/linux# make xconfig
HOSTCC scripts/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/fixdep] Error 1
make: *** [scripts/fixdep] Error 2

The same occurs with the 2.6.0 kernel-source (I can't patch the 2.6.0 kernel, either, by the way). I dunno what to do. Any ideas? Thanks
toto

http://www.knoppix.net/forum/viewtopic.php?t=6582&highlight=

gowator
02-19-2004, 10:28 AM
OK, I was curious about trying out a 2.6 kernel...
I apt-get'd the kernel-source and kernel-image-2.6-k7
(figuring I could miss out on the config and compile)

I said no to all the mods to lilo and edited it by hand.
The kernel-image includes an initrd image which it puts in /boot although its not compressed to a .gz.

I set this in lilo as the initrd... etc. ran lilo and no errors

Is this just to simplistic, do I need to compile my own kernel or should this work ??? does the initrd image need to be gz'd with makeinitrd OR can I just use the uncompressed one.

Ive yet to try it since I was locked into a bittorrent for the Knoppix34 all last night.

w.nelson
02-19-2004, 10:44 AM
This may help with compiling a kernel for you system.
Use lspci to identify your hardware.
For the fbconsole problems use vga=773

http://www.desktop-linux.net/debkernel.htm

Walt

m_yates
02-20-2004, 02:30 AM
I tried upgrade to the 2.6.3 kernel, but failed. I followed the the steps shadowhand posted, including selecting vga16 and vesa. However, when I tried booting, I was left with a blank screen after the bios check and the message about uncompressing the kernel.

I downloaded kernel-image-2.6.2-1-686.deb from debian unstable and used its config file as a starting point. I unpacked the 2.6.3 source in /usr/src and created a symlink to linux. I did the following steps:


dpkg -x kernel-image-2.6.2-1-686.deb /tmp
cp /tmp/boot/config-2.6.2-1-686 /usr/src/linux/.config
make oldconfig
I selected defaults for every question, then:


make menuconfig
I selected ext3 to be compiled into the kernel so I wouldn't need initrd. I selected my processor (pentium III). I selected vesa and vga16 as suggested here. I disabled isdn subsystem because it gave me compile errors for some drivers. Then I did:


make-kpkg clean
make-kpkg kernel_image
cd ..
dpkg -i kernel-image-2.6.3*.deb


Any idea what could be missing?

Stephen
02-20-2004, 03:53 AM
You do not want the vga16 only the vesa if you want to take a look at my config for 2.6.2 you can see it here (http://www3.ns.sympatico.ca/scormier/config-2.6.2) it may give you a few more ideas of what you need. Oh and the commands should be fakeroot make-kpkg clean and the same for building the kernel image you should not build kernels as root only with the fakeroot package as normal user. BTW setting vga=normal in the /etc/lilo.conf should still allow you to see the messages when you boot or if you at the lilo boot screen type Linux vga=normal and enter you should have the same effect or does the system not boot the 2.6 at all.


http://newbiedoc.sourceforge.net/system/kernel-pkg.html

m_yates
02-20-2004, 01:35 PM
Thanks,

I saved your config file. I'll have to try recompiling later. It is a pretty long process on my 900 mHz. I did try switching to vga=normal in lilo.conf, but it still wouldn't boot. My 2.4.25 kernel was upgraded and installed the same way and it works fine.

gowator
02-20-2004, 04:38 PM
Is there any absolute need to use the source kernel....
Does the initrd image need to be gz'd or not???

garyng
02-20-2004, 05:26 PM
Is there any absolute need to use the source kernel....
Does the initrd image need to be gz'd or not???

If the binary kernel you are booting doesn't have the modules you want, yes.

gzip the initrd image is always a good idea as it saves a lot of space especially for booting media which may subject to the 1.44M or 2.88M limit.

dobell
02-21-2004, 10:49 AM
Hi:

but I think, i downloaded the kernel image, so it is compilled, not the source code, so if this kernel is compilled and installed,

how can i make it run?

I don't have to do this makes, haven't I? only configure something to run it?

Hayabusa
02-26-2004, 07:59 AM
download the latest FULL source from www.kernel.org (I don't mess with the debs personally, I want the latest that kernel.org has to offer). save the source .tar.bz2 (or tar.gz) to /usr/src.

decompress and untar the image in /usr/src. For example if you downloaded linux-2.6.3.tar.bz2 when uncompressed you should have a folder for /usr/src/linux/linux-2.6.3

there's a few packages we'll need to install before compiling the kernelt:


apt-get install kernel-package libncurses5-dev

(and if building a 2.6.x kernel for the first time you'll want to add module-init-tools to this list as well)

in /usr/src/linux-2.6.3/ run the following commands


make mrproper
make menuconfig


mrproper will insure a clean build and import some settings from your current working kernel. make menuconfig is an ncurses menu where you can go through and unselect/select support for various hardware and such relating to your computer. Once inside menuconfig the commands for adding/removing support are as follows: Y=yes (built-in support) N=no (no support) M=compiles support as a module. When you exit menuconfig say "yes" to saving the changes.

{*] now that you've trimmed the fat from the kernel we're ready to build it as a package. in /usr/src/linux-2.6.3 run the following commands (as root):



su
Password:
make-kpkg clean
make-kpkg kernel_image


go make lunch, have a cup of coffee, pop in a movie, whatever, the compiling of the kernel into an installable .deb ipackage will take a while. Assuming the .deb was created with no fatal errors you'll now have a kernel package in /usr/src . now we need to install it, in /usr/src/ run the follwing command (still as root)



dpkg -i kernel-image-2.6.3_10.00.Custom_i386.deb


for some reason /etc/lilo.conf is never updated correctly to add an entry for the new kernel, so we must edit it manually (still as root). Add the following entry to the very bottom of /etc/lilo.conf:



image=/boot/vmlinuz-2.6.3
label=2.6.3
initrd=/boot/linux-2.6.1.gz
read-only
# restricted


basically you want to clone the existing entry in lilo.conf for your working kernel, and replace the image= line with the vmlinuz image created in /boot when you installed the kernel_image.deb. your initrd image you want to keep the same as your working kernel (or comment it out if you disabled intial ramdisk support in the kernel you compiled). label= iyou can set to say whatever you want to indicate on the lilo boot menu what kernel you'll be booting into (you will want to make sure the prompt line in /etc/lilo conf is not commented out)

all we need to do now is update lilo.


/sbin/lilo -v


reboot your computer, and in your lilo menu you should now have an entry at the bottom for this new kernel, select it, and if all went well you'll be up and running with your new custom kernel, nto bogged down by all the modules loaded by defualt in a typical knoppix install.

As a footnote if you're compiling ALSA into your kernel for the first time you'll also want to install the following packages:



apt-get install alsa-base alsa-utils gnome-alsamixer

upon installation fo these you'll be asked which soundcard(s) you want to install sound support for.. gnome-alsamixer is a nice gui tool for the inital umuting you need to do once ALSA is installed.

Stephen
02-26-2004, 08:39 AM
decompress and untar the image in /usr/src. For example if you downloaded linux-2.6.3.tar.bz2 when uncompressed you should have a folder for /usr/src/linux/linux-2.6.3


The directory would be /usr/src/linux-2.6.3 after the extraction (tar -xjvf linux-2.6.3.tar.bz) and once done while still in the /usr/src directory.



ln -s /usr/src/linux-2.6.3 linux






apt-get install kernel-package libncurses5-dev

(and if building a 2.6.x kernel for the first time you'll want to add module-init-tools to this list as well)


Add to the list the package fakeroot.




in /usr/src/linux-2.6.3/ run the following commands


make mrproper
make menuconfig


mrproper will insure a clean build and import some settings from your current working kernel. make menuconfig is an ncurses menu where you can go through and unselect/select support for various hardware and such relating to your computer. Once inside menuconfig the commands for adding/removing support are as follows: Y=yes (built-in support) N=no (no support) M=compiles support as a module. When you exit menuconfig say "yes" to saving the changes.


The mrproper is not necessary and you should.



cd /usr/src/linux
make menuconfig




{*] now that you've trimmed the fat from the kernel we're ready to build it as a package. in /usr/src/linux-2.6.3 run the following commands (as root):



su
Password:
make-kpkg clean
make-kpkg kernel_image


Never compile a kernel as root that is why the fakeroot package exists and should always be used for that purpose the commands would be in the /usr/src/linux directory.



fakeroot make-kpkg clean
fakeroot make-kpkg kernel_image
cd ..
su
Password:
dpkg -i kernel-image-2.6.3_10.00.Custom_i386.deb






for some reason /etc/lilo.conf is never updated correctly to add an entry for the new kernel, so we must edit it manually (still as root). Add the following entry to the very bottom of /etc/lilo.conf:


Never happened to me before but I had a strange one last week on my firewall box where depmod would not run on the new kernel and caused an error during the installation I had to run it after booting into the new kernel.



As a footnote if you're compiling ALSA into your kernel for the first time you'll also want to install the following packages:



apt-get install alsa-base alsa-utils gnome-alsamixer

upon installation fo these you'll be asked which soundcard(s) you want to install sound support for.. gnome-alsamixer is a nice gui tool for the inital umuting you need to do once ALSA is installed.
[/list]

Also do not forget to remove the knx-alsa package to get it out of the way and prevent problems in the future.

Stephen
02-26-2004, 08:45 AM
Hi:

but I think, i downloaded the kernel image, so it is compilled, not the source code, so if this kernel is compilled and installed,

how can i make it run?

I don't have to do this makes, haven't I? only configure something to run it?

If it is a kernel image from Debian then you use the dpkg program as root to install there are examples of the command in the posts above and this is one case where you will have to edit lilo as in Hayabusa's post above and you would want to add the initrd line to the new kernel stanza that was created when you installed and then run lilo again as posted above.

dobell
04-13-2004, 06:46 PM
Hi everybody:

I've been off many time, but work is work.

I'm wondering what have I done wrong. I have compiled and installed the kernel packages lots of times but always is the same result. It loads the kernel, then says Bios data check successfull and then, nothing. i think I have to specify something to start runing, do you agree? what is it?

m_yates
04-13-2004, 07:54 PM
dobell:

I have tried multiple times and always get the same result you describe. Most recently, I tried this on a system running Debian installed with the official Debian installer, so it is not a Knoppix problem. I followed the steps above, extracted the kernel source, copied a working config file, did "make menuconfig". The only changes I made to the configuration was switch processor from "386" to "K7" and switching Reiserfs support from "M" to "*" so that I wouldn't need an initrd. Still no luck. BIOS check OK, then nothing.... :cry: