LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Updating kernel what could be going wrong (https://www.linuxquestions.org/questions/linux-newbie-8/updating-kernel-what-could-be-going-wrong-261779/)

colly 12-02-2004 11:49 AM

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.

trickykid 12-02-2004 11:52 AM

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.

abisko00 12-02-2004 11:59 AM

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 ?!

colly 12-02-2004 12:16 PM

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

comprookie2000 12-02-2004 02:15 PM

Try make and then make modules_install what happens?

colly 12-03-2004 07:22 AM

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

Andrew Benton 12-03-2004 08:24 AM

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.

colly 12-03-2004 08:35 AM

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?

Andrew Benton 12-03-2004 08:55 AM

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

abisko00 12-03-2004 09:04 AM

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

colly 12-03-2004 09:23 AM

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.

abisko00 12-03-2004 09:52 AM

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.

Andrew Benton 12-03-2004 10:30 AM

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?

colly 12-03-2004 10:35 AM

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?

abisko00 12-03-2004 10:46 AM

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.


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