Unix Technical Forum

Recompile kernel 2.4.18 on Debian 3.0r1

This is a discussion on Recompile kernel 2.4.18 on Debian 3.0r1 within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi, I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version, but it didn't run. On ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 07:47 AM
jose_luis_fdez_diaz@yahoo.es
 
Posts: n/a
Default Recompile kernel 2.4.18 on Debian 3.0r1

Hi,

I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version, but
it didn't run. On Debian you can boot with the old kernel if things go
wrong with the new, so now I am booting with then old one:

lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
boot/vmlinuz-2.4.18
lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old ->
boot/vmlinuz-2.2.20-idepci


I believe that I configured wrong the new kernel, so I want recompile
it with a new configuration file ".configure" that I have downloaded
from Internet. I want to overlap the 2.18.4 kernel and keep up the
original kernel (vmlinuz.old -> boot/vmlinuz-2.2.20-idepci).

I am using a Debian package to compile and install the kernel:
kernel-package.

Any hint ?


Thanks in advance,
Jose Luis.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 07:47 AM
Andreas Janssen
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1

Hello

jose_luis_fdez_diaz@yahoo.es (<jose_luis_fdez_diaz@yahoo.es>) wrote:

> I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version, but
> it didn't run.


What did not run? You did tell lilo to use the initrd image for the
2.4.18 kernel didn't you? Without it the kernel cannot access your root
device.

> On Debian you can boot with the old kernel if things go
> wrong with the new, so now I am booting with then old one:
>
> lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
> boot/vmlinuz-2.4.18
> lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old ->
> boot/vmlinuz-2.2.20-idepci
>
>
> I believe that I configured wrong the new kernel


There are precompiled packages, and there is nothing you need to
configure, except for the initrd in your /etc/lilo.conf.

> so I want recompile it with a new configuration file ".configure" that
> I have downloaded from Internet. I want to overlap the 2.18.4 kernel
> and keep up the original kernel (vmlinuz.old ->
> boot/vmlinuz-2.2.20-idepci).
>
> I am using a Debian package to compile and install the kernel:
> kernel-package.


Remove the current installed 2.4.18 kernel, and install the new one.
After that, vmlinuz should point to 2.4.18, and vmlinuz.old should
point to 2.2.20.

best regards
Andreas Janssen

--
Andreas Janssen <andreas.janssen@bigfoot.com>
PGP-Key-ID: 0xDC801674 ICQ #17079270
Registered Linux User #267976
http://www.andreas-janssen.de/debian-tipps-sarge.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 07:47 AM
jose_luis_fdez_diaz@yahoo.es
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1


Andreas Janssen wrote:
> Hello
>
> jose_luis_fdez_diaz@yahoo.es (<jose_luis_fdez_diaz@yahoo.es>) wrote:
>
> > I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version,

but
> > it didn't run.

>
> What did not run? You did tell lilo to use the initrd image for the
> 2.4.18 kernel didn't you? Without it the kernel cannot access your

root
> device.
>


I have followed the "Debian Reference Manual" steps:

# apt-get install debhelper modutils kernel-package libncurses5-dev
# apt-get install kernel-source-2.4.18 # use latest version
# apt-get install fakeroot
# vi /etc/kernel-pkg.conf # input name and email
$ cd /usr/src # build directory
$ tar --bzip2 -xvf kernel-source-2.4.18.tar.bz2
$ cd kernel-source-2.4.18 # if this is your kernel source
$ cp /boot/config-2.4.18-386 .config # get current config as default
$ make menuconfig # customize as one wishes
$ make-kpkg clean # must run (per: man make-kpkg)
$ fakeroot make-kpkg --append_to_version -486 --initrd \
--revision=rev.01 kernel_image \
modules_image # modules_image is for pcmcia-cs* etc.
$ cd ..
# dpkg -i kernel-image*.deb pcmcia-cs*.deb # install



I suppressed the "--initrd" opcion because on Srivastava Document I
read:


% $Get_Root make-kpkg --initrd --revision=custom.1.0 kernel_image
Personally, I prefer non initrd images for my personal machines,
since then adding third party modules to the machine has fewere
gotchas

But in other section he says:

NOTE: if you have
instructed your boot loader to expect initrd kernels (which is
the norm for recent official kernel image packages) you need to
addd --initrd to the line above

So I am confused about if this option is needed.


> > On Debian you can boot with the old kernel if things go
> > wrong with the new, so now I am booting with then old one:
> >
> > lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
> > boot/vmlinuz-2.4.18
> > lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old

->
> > boot/vmlinuz-2.2.20-idepci
> >
> >
> > I believe that I configured wrong the new kernel

>
> There are precompiled packages, and there is nothing you need to
> configure, except for the initrd in your /etc/lilo.conf.
>


I don't understand this. If the kernel is compiled you can't configure
it to your needs. Where can I get the precompiled packages ?

> > so I want recompile it with a new configuration file ".configure"

that
> > I have downloaded from Internet. I want to overlap the 2.18.4

kernel
> > and keep up the original kernel (vmlinuz.old ->
> > boot/vmlinuz-2.2.20-idepci).
> >
> > I am using a Debian package to compile and install the kernel:
> > kernel-package.

>
> Remove the current installed 2.4.18 kernel, and install the new one.


How must I do it?:

rm vmlinuz-2.4.18 ?

Must I remove link too ? :

jdiaz@narcea:/$ ll vmlinuz
lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
boot/vmlinuz-2.4.18
jdiaz@narcea:/$ rm vmlinuz ?






> After that, vmlinuz should point to 2.4.18, and vmlinuz.old should
> point to 2.2.20.
>
> best regards
> Andreas Janssen
>
> --
> Andreas Janssen <andreas.janssen@bigfoot.com>
> PGP-Key-ID: 0xDC801674 ICQ #17079270
> Registered Linux User #267976
> http://www.andreas-janssen.de/debian-tipps-sarge.html


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 07:47 AM
jayachandran kamaraj
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1

i think you forgot to edit your bootloader.
needing initrd depends on the persons' requirement.
if you need initrd create it using make-kpkg and add it in the bootloader.
it is no harm if you create initrd and don't use it in the bootloader.
but if you didn't create initrd, but add a line for it in the boot
loader, then it will stop scratching its head, looking for the non
existent file.

otherwise i don't find it confusing at all.

and then about configuring your new kernel, always use the default
configuration provided by the disturbution such as config-2.4.18xxx in
the /boot folder and then customize it to your need. it is always a
trial and error process in the beginning. don't download the .config
file from the internet. most people keep it online(for their computer)
as a safe, so that if they screw up theirs, they will know where to get it.
jc

jose_luis_fdez_diaz@yahoo.es wrote:
> Andreas Janssen wrote:
>
>>Hello
>>
>>jose_luis_fdez_diaz@yahoo.es (<jose_luis_fdez_diaz@yahoo.es>) wrote:
>>
>>
>>>I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version,

>
> but
>
>>>it didn't run.

>>
>>What did not run? You did tell lilo to use the initrd image for the
>>2.4.18 kernel didn't you? Without it the kernel cannot access your

>
> root
>
>>device.
>>

>
>
> I have followed the "Debian Reference Manual" steps:
>
> # apt-get install debhelper modutils kernel-package libncurses5-dev
> # apt-get install kernel-source-2.4.18 # use latest version
> # apt-get install fakeroot
> # vi /etc/kernel-pkg.conf # input name and email
> $ cd /usr/src # build directory
> $ tar --bzip2 -xvf kernel-source-2.4.18.tar.bz2
> $ cd kernel-source-2.4.18 # if this is your kernel source
> $ cp /boot/config-2.4.18-386 .config # get current config as default
> $ make menuconfig # customize as one wishes
> $ make-kpkg clean # must run (per: man make-kpkg)
> $ fakeroot make-kpkg --append_to_version -486 --initrd \
> --revision=rev.01 kernel_image \
> modules_image # modules_image is for pcmcia-cs* etc.
> $ cd ..
> # dpkg -i kernel-image*.deb pcmcia-cs*.deb # install
>
>
>
> I suppressed the "--initrd" opcion because on Srivastava Document I
> read:
>
>
> % $Get_Root make-kpkg --initrd --revision=custom.1.0 kernel_image
> Personally, I prefer non initrd images for my personal machines,
> since then adding third party modules to the machine has fewere
> gotchas
>
> But in other section he says:
>
> NOTE: if you have
> instructed your boot loader to expect initrd kernels (which is
> the norm for recent official kernel image packages) you need to
> addd --initrd to the line above
>
> So I am confused about if this option is needed.
>
>
>
>>>On Debian you can boot with the old kernel if things go
>>>wrong with the new, so now I am booting with then old one:
>>>
>>>lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
>>>boot/vmlinuz-2.4.18
>>>lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old

>
> ->
>
>>>boot/vmlinuz-2.2.20-idepci
>>>
>>>
>>>I believe that I configured wrong the new kernel

>>
>>There are precompiled packages, and there is nothing you need to
>>configure, except for the initrd in your /etc/lilo.conf.
>>

>
>
> I don't understand this. If the kernel is compiled you can't configure
> it to your needs. Where can I get the precompiled packages ?
>
>
>>>so I want recompile it with a new configuration file ".configure"

>
> that
>
>>>I have downloaded from Internet. I want to overlap the 2.18.4

>
> kernel
>
>>>and keep up the original kernel (vmlinuz.old ->
>>>boot/vmlinuz-2.2.20-idepci).
>>>
>>>I am using a Debian package to compile and install the kernel:
>>>kernel-package.

>>
>>Remove the current installed 2.4.18 kernel, and install the new one.

>
>
> How must I do it?:
>
> rm vmlinuz-2.4.18 ?
>
> Must I remove link too ? :
>
> jdiaz@narcea:/$ ll vmlinuz
> lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
> boot/vmlinuz-2.4.18
> jdiaz@narcea:/$ rm vmlinuz ?
>
>
>
>
>
>
>
>>After that, vmlinuz should point to 2.4.18, and vmlinuz.old should
>>point to 2.2.20.
>>
>>best regards
>> Andreas Janssen
>>
>>--
>>Andreas Janssen <andreas.janssen@bigfoot.com>
>>PGP-Key-ID: 0xDC801674 ICQ #17079270
>>Registered Linux User #267976
>>http://www.andreas-janssen.de/debian-tipps-sarge.html

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 07:47 AM
mjt
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1

jayachandran kamaraj wrote:

> i think you forgot


.... please dont top-post
--
<< http://michaeljtobler.homelinux.com/ >>
> I'm an idiot.. At least this [bug] took about 5 minutes to find..

Disquieting ... - Gonzalo Tornaria in response to Linus Torvalds's
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 07:47 AM
Bill Marcum
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1

["Followup-To:" header set to comp.os.linux.misc.]
On 10 Feb 2005 03:09:03 -0800, jose_luis_fdez_diaz@yahoo.es
<jose_luis_fdez_diaz@yahoo.es> wrote:
>
> I suppressed the "--initrd" opcion because on Srivastava Document I
> read:
>
>
> % $Get_Root make-kpkg --initrd --revision=custom.1.0 kernel_image
> Personally, I prefer non initrd images for my personal machines,
> since then adding third party modules to the machine has fewere
> gotchas
>
> But in other section he says:
>
> NOTE: if you have
> instructed your boot loader to expect initrd kernels (which is
> the norm for recent official kernel image packages) you need to
> addd --initrd to the line above
>
> So I am confused about if this option is needed.
>

You need an initrd if you compiled the kernel to use modules for the
root filesystem and the device it is on, instead of building those
drivers into the kernel.

>>

>
> I don't understand this. If the kernel is compiled you can't configure
> it to your needs. Where can I get the precompiled packages ?
>

apt-get install kernel-image-<version>

>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 07:49 AM
Nico Kadel-Garcia
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1


<jose_luis_fdez_diaz@yahoo.es> wrote in message
news:1108029993.039788.72930@z14g2000cwz.googlegro ups.com...
> Hi,
>
> I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version, but
> it didn't run. On Debian you can boot with the old kernel if things go
> wrong with the new, so now I am booting with then old one:
>
> lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
> boot/vmlinuz-2.4.18
> lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old ->
> boot/vmlinuz-2.2.20-idepci


You're switching from a 2.2 kernel to a 2.4 kernel. Switching major kernel
versions is usually a bad idea without a complete forklift update, because
items ranging from mkfs to initrd to glibc to gcc will not interoperate well
with the new kernel without updates, and picking out all the dependencies is
nightmarish.

It's like switching a car from gasloline to diesel: rather than trying to
replace the engine one bit at a time, it's usually easier to get a new car,
and if you have cupholders or chairs or steering wheels you liked from the
old car, transfer those.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 07:49 AM
Tauno Voipio
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1

Nico Kadel-Garcia wrote:
> <jose_luis_fdez_diaz@yahoo.es> wrote in message
> news:1108029993.039788.72930@z14g2000cwz.googlegro ups.com...
>
>>Hi,
>>
>>I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version, but
>>it didn't run. On Debian you can boot with the old kernel if things go
>>wrong with the new, so now I am booting with then old one:
>>
>>lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
>>boot/vmlinuz-2.4.18
>>lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old ->
>>boot/vmlinuz-2.2.20-idepci

>
>
> You're switching from a 2.2 kernel to a 2.4 kernel. Switching major kernel
> versions is usually a bad idea without a complete forklift update, because
> items ranging from mkfs to initrd to glibc to gcc will not interoperate well
> with the new kernel without updates, and picking out all the dependencies is
> nightmarish.
>
> It's like switching a car from gasloline to diesel: rather than trying to
> replace the engine one bit at a time, it's usually easier to get a new car,
> and if you have cupholders or chairs or steering wheels you liked from the
> old car, transfer those.
>


2.2 to 2.4 is not too bad. The steep step is from 2.4 to 2.6.

Been there - done that (Woody with 2.4.27 kernel now).

--

Tauno Voipio
tauno voipio (at) iki fi


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 07:50 AM
jose_luis_fdez_diaz@yahoo.es
 
Posts: n/a
Default Re: Recompile kernel 2.4.18 on Debian 3.0r1



I think you are right. I will try with other Linux distribution,
perhaps Fedora or Mandrake. With Debian I have had a lot of problems.
It has a old kernel and libraries versions. When you have a problem
you need a lot of Linux knowledges to fix it. Debian is far away in
"easy-to-use" of other operanting systems. This is the advantage of
Windows. With it you don't need to bother about a lot of technical
details. It is like a plug-and-play.


Regards,
Jose Luis.

Nico Kadel-Garcia wrote:
> <jose_luis_fdez_diaz@yahoo.es> wrote in message
> news:1108029993.039788.72930@z14g2000cwz.googlegro ups.com...
> > Hi,
> >
> > I had Kernel 2.2.20 on my Debian. I updated it to 2.4.18 version,

but
> > it didn't run. On Debian you can boot with the old kernel if things

go
> > wrong with the new, so now I am booting with then old one:
> >
> > lrwxrwxrwx 1 root root 19 Feb 9 14:22 vmlinuz ->
> > boot/vmlinuz-2.4.18
> > lrwxrwxrwx 1 root root 26 Jan 31 23:48 vmlinuz.old

->
> > boot/vmlinuz-2.2.20-idepci

>
> You're switching from a 2.2 kernel to a 2.4 kernel. Switching major

kernel
> versions is usually a bad idea without a complete forklift update,

because
> items ranging from mkfs to initrd to glibc to gcc will not

interoperate well
> with the new kernel without updates, and picking out all the

dependencies is
> nightmarish.
>
> It's like switching a car from gasloline to diesel: rather than

trying to
> replace the engine one bit at a time, it's usually easier to get a

new car,
> and if you have cupholders or chairs or steering wheels you liked

from the
> old car, transfer those.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com