LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2004, 12:49 PM   #1
colly
Member
 
Registered: Feb 2004
Posts: 41

Rep: Reputation: 15
Updating kernel what could be going wrong


I have made many attempts in the past to update the linux kernel and read plenty on it but I always fail. What could be going wrong.
Right now I have 2.4.9-e.3 and want to update to 2.6.9
Does the source of the old kernel have to be installed before updating to the new Kernel.
 
Old 12-02-2004, 12:52 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
If you provide errors that you encounter, it helps us know what is going on. Provide hardware type, the steps you take to compile your new kernel, etc.
 
Old 12-02-2004, 12:59 PM   #3
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
This seems to be a huge step. A lot of packages will need to be updated. A lot of things can go wrong. Have a look at /usr/src/linux-2.6.9/Documentation/Changes for the requirements:
Code:
Current Minimal Requirements
============================

Upgrade to at *least* these software revisions before thinking you've
encountered a bug!  If you're unsure what version you're currently
running, the suggested command should tell you.

Again, keep in mind that this list assumes you are already
functionally running a Linux 2.4 kernel.  Also, not all tools are
necessary on all systems; obviously, if you don't have any PCMCIA (PC
Card) hardware, for example, you probably needn't concern yourself
with pcmcia-cs.

o  Gnu C                  2.95.3                  # gcc --version
o  Gnu make               3.79.1                  # make --version
o  binutils               2.12                    # ld -v
o  util-linux             2.10o                   # fdformat --version
o  module-init-tools      0.9.10                  # depmod -V
o  e2fsprogs              1.29                    # tune2fs
o  jfsutils               1.1.3                   # fsck.jfs -V
o  reiserfsprogs          3.6.3                   # reiserfsck -V 2>&1|grep reiserfsprogs
o  xfsprogs               2.6.0                   # xfs_db -V
o  pcmcia-cs              3.1.21                  # cardmgr -V
o  quota-tools            3.09                    # quota -V
o  PPP                    2.4.0                   # pppd --version
o  isdn4k-utils           3.1pre1                 # isdnctrl 2>&1|grep version
o  nfs-utils              1.0.5                   # showmount --version
o  procps                 3.2.0                   # ps --version
o  oprofile               0.5.3                   # oprofiled --version
You may want to consider to renew the complete system ?!
 
Old 12-02-2004, 01:16 PM   #4
colly
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
I have extracted the file to /usr/src/linux-2.6.9 and entered that directory. SU to root.
Then I use make menuconfig and set up the options, saved my configuration file on exit.
Then make dep. It tells me that its not required at this time.
I then type make bzImage. I recieve an error message saying:

/tmp/ccjeo2mh.s:3: Error: unknown psudo-op: '.incbin'
make[1]: *** [usr/initramfs_data.o] Error 1
make : *** [usr] Error2
 
Old 12-02-2004, 03:15 PM   #5
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Try make and then make modules_install what happens?
 
Old 12-03-2004, 08:22 AM   #6
colly
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
Ok now im trying kernel 2.4.12 and everything has worked so far except make install. I feel that this error message has something to do with the fact that I use grub instead of lilo.

The error message im getting is:
/etc/lilo.conf: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory '/usr/src/linux/arch/i386/boot'
make: *** [install] Error 2
 
Old 12-03-2004, 09:24 AM   #7
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
You don't need to run grub after you've installed a new kernel, just edit /boot/grub/menu.lst (or whatever it's config file is called on your system) so that it points to your new kernel. If you try a 2.6 kernel make sure you update your version of module init tools as the module handling is completely different in 2.6 kernels.
 
Old 12-03-2004, 09:35 AM   #8
colly
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Andrew Benton
You don't need to run grub after you've installed a new kernel, just edit /boot/grub/menu.lst (or whatever it's config file is called on your system) so that it points to your new kernel. If you try a 2.6 kernel make sure you update your version of module init tools as the module handling is completely different in 2.6 kernels.
Thanks for your help, I am trying to edit the grub.conf file to include /boot/initrd-2.4.12 but the file is not there. Do I have to move that file form somewhere else or does this mean that installation failed?
 
Old 12-03-2004, 09:55 AM   #9
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I don't know about that, that whole ramdisk thing looks to complicated to me. Why don't you see what man mkinitrd says? http://www.linux-universe.com/HOWTO/...te_initrd.html
 
Old 12-03-2004, 10:04 AM   #10
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
colly:

Instead of make install you could install the kernel manually:

Code:
$> cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.4.12
$> cp ./System.map /boot/System.map-2.4.12
$> cd /boot
$> mkinitrd -k vmlinuz-2.4.12 -i inittrd-2.4.12 -m <modules to include> -d /dev/<your rootdevice>
Then add the new kernel to your menu.lst of grub.conf
 
Old 12-03-2004, 10:23 AM   #11
colly
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by abisko00
colly:

Instead of make install you could install the kernel manually:

Code:
$> cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.4.12
$> cp ./System.map /boot/System.map-2.4.12
$> cd /boot
$> mkinitrd -k vmlinuz-2.4.12 -i inittrd-2.4.12 -m <modules to include> -d /dev/<your rootdevice>
Then add the new kernel to your menu.lst of grub.conf
Thanks for the help, its all working grand down to the last line, how do I know what modules to include, where do I find out and how can I find out my root device? Sorry, im new to all this stuff.
 
Old 12-03-2004, 10:52 AM   #12
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
What modules you need/want to include depends on your kernel configuration.

If you didn't include the filesystem driver into the kernel for example, you'll need to include the module into initrd.

If the filesystem of / (root) is reiserfs, and CONFIG_REISERFS_FS=m you need to add reiserfs to the -m option. Same for ext2 etc.

The same applies to all modules that need to be present at an early stage of the boot process (e.g. HDD controller driver, framebuffer devices etc.). If they are included into the kernel and not confugured as modules, you may leave this empty.

Your rootdevice should be obvious: it's the device that is mounted to / in /etc/fstab.

Have a look in man mkinitrd for all these options.
 
Old 12-03-2004, 11:30 AM   #13
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
That looks good to me, but the thing I have a problem with is this - why would you build support for your root filesystem as a module? Are you not expecting to reboot? In fact, why would you make anything as a module? If you need support for something, complie it into the kernel. If you don't need a particular feature, why waste time compiling it?
 
Old 12-03-2004, 11:35 AM   #14
colly
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Andrew Benton
That looks good to me, but the thing I have a problem with is this - why would you build support for your root filesystem as a module? Are you not expecting to reboot? In fact, why would you make anything as a module? If you need support for something, complie it into the kernel. If you don't need a particular feature, why waste time compiling it?
Does this mean that the line:
Code:
mkinitrd -k vmlinuz-2.4.12 -i inittrd-2.4.12 -d /dev/hda1
should work?
 
Old 12-03-2004, 11:46 AM   #15
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
Only if you did what Andrew said: if you've compiled everything you need at boottime into the kernel and not as modules.

Andrew: I fully agree with what you've said! But it's not impossible to have your root filesystem as module. It is simply not necessary if you compile the kernel for yourself. But some people clone the kernel configuration from the standard kernel of their distribution and these are often compiled with these things as modules to have a small but flexible kernel.

Last edited by abisko00; 12-03-2004 at 11:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
updating Kernel? Greenman Linux - Newbie 2 10-07-2004 10:26 AM
rpm -qa | grep kernel gives wrong kernel version markelo Red Hat 3 07-18-2004 10:35 AM
Updating Kernel HoosTrax Linux - Newbie 14 02-21-2004 11:28 PM
updating kernel!?? FreakboY Linux - Newbie 1 12-29-2003 10:38 PM
Kernel updating DAChristen29 Linux - Software 1 12-06-2002 12:45 PM


All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration