LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-02-2002, 04:53 PM   #1
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Rep: Reputation: 15
moving kernel binaries??


I am attempting to upgrade my kernel to 2.4.18 (currently 2.4.2-2). I have downloaded the kernel file (from kernel.org), ran the tar, run "make menuconfig", and have ran the "make dep, make clean, make bzImage, make modules, and make maodules_install".

I am following a HOW-TO and its now telling me that that after I have compiled the kernel, I now need to:

-move the kernel binary
-update the bootloader (I use LILO)
-and then reboot.

However, it doesn't go into detail about to how to move this kernel binary.

Question #1: Where is kernel binary its refering to? Is it the file called "vmlinux" that seemed to have been created after I compiled. Suspecting this is it, I do a locate for other "vmlinux" filename on the system and find that "vmlinux2.4.2-2" located in /boot with a soft-link called "vmlinuz" (in the same directory) pointing to it. Is this where I am suppose to move this file? Is this the only file I need to move (vmlinux, the new one)..because there are other files in /boot that seem to refer to my current kernel (2.4.2-2)

Question #2: How exactly do I update my bootloader (in this case LILO)?

Thanks in advance...
 
Old 03-02-2002, 05:19 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
usually its something along the lines like this :

mv /usr/src/linux/arch/i386/bzImage /boot/vmlinuz-new

but totally unsure as I have not compiled a kernel in redhat in a long time and its totally different using slack. but if you compiled and you used the make bzImage, you should be moving a bzImage to your boot... etc..

and you would want to edit lilo to configure to boot into the new kernel using the new vmlinuz-new ( you can usually name it anything you want. good to name it something other than your vmlinuz as this is your old kernel and you might want to keep it )
after updates to lilo.conf, just run lilo from command, reboot and test...

check out the kernel howto for more info if you haven't done so already at www.linuxdoc.org

-trickykid
 
Old 03-02-2002, 11:23 PM   #3
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Original Poster
Rep: Reputation: 15
I have gone to the HOW TO (kernel) and have found what it meant by "moving the kernel binary".

Basically, it (the compiling of the new kernel) created a bzImage file in .../linux/arch/i386/boot which I needed to move/cp to my /boot directory. I moved it there and gave a name of vmlinuz-2.4.18. There is a vmlinux (soft-link) pointing to vmlinux-2.4.2-2 (which I assume is my previous kernel's binary). So I re-created the soft link and pointed to my new one (vmlinuz-2.4.18).


However, the HOWTO doesn't seem to tell all the files that need to be moved other than the kernel binary (bzImage) because I notice the following files in the /boot directory:
(they were designated with my previous kernels version#, for example: System.map-2.4.2-2)

-kernel.h (soft-link) pointing to kernel.h-2.4.2-2. So, I dug around my new kernel's directories for a file called kernel.h and finally I did inside the include directory. So, I cp that to /boot and named it kernel.h-2.4.18 and pointed kernel.h to that.

-System.map ( soft-link) pointing to System.map-2.4.2-2. I went to look for one in my new kernel's directories again and again found a file called System.map also. So I copied to /boot, re pointed the soft-link.

-module-info (soft-link) pointing to module-info-2.4.2-2.
?????But this time, I couldn't find a module-info file in my new kernel's directory.

Am I doing this right? Again, the HOWTO does not mention these other files? Was I suppose to copy these other files to /boot?

And what about the module-info file that I can't find? I do a "find -d <my_kernel_directory_path> module-info" and finds nothing. Am I doing this right?

Anyhow, I proceed with the upgrade even with these question. I do the editing of lilo.conf, doing a /sbin/lilo, etc...

At reboot, everything seems to boot fine, but during the Interactive startup, one item failed:
"Turning on process accounting accton: Function not implemented [FAILED]"

What does this mean and how can I fix it? My previous kernel doesn't fail this item at startup.

woooshhhhhh: Thanks in advance...
 
Old 03-03-2002, 05:18 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232

Hi,
In Interactive Setup is when loading srripts are started. Kernel is already running. Your problem probably is that there is one more module needed, but you haven't compiled it. If I remember correctly there is "process accounting" option in kernel configuration. Run make menuconfig again and look if you can find it.
And you don't need any other files than bzImage. Modules are copied at make modules_install. It's all that's neccessary.
 
Old 03-03-2002, 02:31 PM   #5
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
A lot of this extra stuff seems quite like RedHat super-goop. You might want to try their site as to why all of the extra hoops in just a straightforward kernel compile.

The "accton" failed message may be something you left out of the kernel compile, or some other diddly little daemon that needs one of those symlinks to be pointed at the right daemon. Regardless, that is part of xinet, so the kernel has long since loaded fine by then.

All I've ever had to do to get Slack or Debian running right was to update the bootloader, get the bzImage somewhere like /boot; although I tend to name them: DamnitIwantSound-1, or IHopeThisWorks, or ILikeDoughnuts, and then copy over the system map.

Honestly, unless something goes kazoo shortly, ignore it.

Cheers,

Finegan
 
Old 03-03-2002, 07:51 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I have found it better to use up2date with redhat or use their rpm files

I guess you want a kernel that's not available for redhat yet but to keep it working correctly you should probably stay with the redhat kernel because of all the patches. If you want to recompile the kernel provided by redhat then you should backup the original and just replace the old one with the new one and run lilo.

the links in /boot are automatically updated for the kernel you boot.
 
Old 03-04-2002, 09:08 PM   #7
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Original Poster
Rep: Reputation: 15
I'll go in again and try to find that option (process accounting) in the make menuconfig window and see if it is something I did miss. Would anyone know what catagory this falls under?

(if MARA is right) then all I need to deal with when moving the "kernel binaries" (after the compiliation) is the bzImage file. All these other files in the /boot that seem to be related to the kernel (ex: kernel.h-2.4.2-2, System.map-2.4.2-2, module-info-2.4.2-2) are just Red Hat specific stuff that's unrelated to kernel upgrading/compiliation.

If nothing fixes...and if everyone agrees...I might take dave's advise in that I just stick with red hat's up2date (although I haven't heard of it or looked into it).

I'm a newbie and I thought upgrading my kernel (even though I probably didn't need to) thru normal avenue (like downloading a stable kernel from kernel.org) might have made for good practice/endeavor. At least now I have a good idea of all that goes on and what files are related.

Let me ask this question:

Let say I have been using this kernel for quite some time...and thru the xconfig/menuconfig I've tweaked it out to work just the way I need it to...

Does this mean that when I upgrade my kernel, I would loose all of those settings and configuration?

If so, does anyone have an idea how to carry over previous kernel configurations? OR, does this boil down to just good'ole documentatons of what I've done in the past and just applying those settings again to the new kernel?

Thanks again...
 
Old 03-04-2002, 11:09 PM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
building a kernel in slack is about as simple as it gets

you normally need to know your settings so you can go through the xconfig or menuconfig without missing anything.

you could load the old .config but it might be different depending on the kernel.

i usually follow these steps


unpack new kernel from kernel.org
make menuconfig

go through everything and set it up

save to /some/folder/.config for later use of same kernel if necessary

make dep
make clean "for used kernels" I just do it anyway
make bzImage
make modules
make modules_install

cat ./arch/i386/boot/bzImage > /vmlinuz

cp /System.map /boot


If it's not a new kernel or if you just like to you should run make mrproper first

with redhat if you copy the System.map it should be System.map-2.xx-x
and they put their kernel in /boot/vmlinuz-2.xx-x


process accounting is in general setup > BSD process accounting



oh

redhat has a new kernal out, you should probably use it.


to keep Linus happy you should do this..

ln -s /usr/src/linux-2.4.2-2 /usr/src/linux

this will make a link to your old kernel that came with the distro
it should never change unless you rebuild your libs.
when you build something that needs the kernel headers, if you ever do it will be built with the same headers that the libs were built with.

Last edited by DavidPhillips; 03-04-2002 at 11:30 PM.
 
Old 03-04-2002, 11:25 PM   #9
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DavidPhillips

...save to .config for later use of same kernel if necessary...
...If it's not a new kernel or if you just like to you should run make mrproper first ...
When you refer to "same" or "not a new kernel" what exactly do you mean?

Is it that 2.4.18 is "newer" than 2.4.2, but are the "same"?

I am asking because, if you can indeed save your configuration (thru menuconfig/xconfig), can you apply that to the same, but newer kernel? (if my understanding of same and newer is correct)

OR,

Do you mean you can only reapply those configuration settings to the very same kernel (meaning that same version kernel)? Basically, here's what I am asking: if I had made some configuration in 2.4.2 and saved them, can I apply those configuration to kernel 2.4.18?

I now noticed that in xconfig, there is a save config button. When you press that button, where does it save the file?

Quote:
Originally posted by DavidPhillips

process accounting is in general setup > BSD process accounting
What do you mean by this? Where's general setup? OH! is this the forum catagory?

Also, what do you refer to when you say "slack"?

Last edited by desbyleo; 03-04-2002 at 11:27 PM.
 
Old 03-04-2002, 11:40 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I added to the post above...


I guess you are considering the 2.4.2-18 kernel?

when I said new I meant never built before as in fresh kernel, as opposed to one that's been built already.
the first time you unpack it and build it it's new.

I would only use the config file again on the same kernel. If you unpack the same kernel again then you could use the same config because the kernel is identical but it would be a fresh kernel.


Process accounting is in the menuconfig under General Setup listed as BSD Process Accounting


Slack is Slackware, another distro that is more suitable for people who like to do their own system management, instead of doing everything with rpms. It supports rpm but I never saw a reason to use rpms with slack.

redhat is more or less a good system to use with the rpm database and up2date features, but if you start installing sources into it you will eventually undermine the rpm concept and then things will probably go down hill from there.

Last edited by DavidPhillips; 03-04-2002 at 11:49 PM.
 
Old 03-05-2002, 12:15 AM   #11
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Original Poster
Rep: Reputation: 15
Got it...

So just to confirm what you do when you install/configure your kernel:

After you unpack and configure a kernel, or re configure an existing kernel, you do the following:

make dep
make clean "for used kernels" I just do it anyway
make bzImage
make modules
make modules_install

cat ./arch/i386/boot/bzImage > /vmlinuz

cp /System.map /boot

So the only files concerned here is the "bzImage" and "System.map".

Then after that I make the proper edits to lilo.conf and then run /sbin/lilo.

If I didn't overwrite my existing vmlinux and System.map file, I can always revert back to that kernel if my new one doesn't work. I do this by simple editing lilo.conf and indicating a different value for: image=/boot/vmlinux-x.x.x

right?

I am asking because I am having to do this because when I compiled my kernel with added configs (i am trying to add support for my 3com card). But, both of my eth now fails along with something to do with my usb's...erroring something about insmod....

Anyhow, I am trying to boot off my previous kernel binary, but at reboot it's still failing.

Before I compiled the kernel, it wasn't failing. What do now? All I did was go to Network Device Support (xconfig) and added (M) the support for 3com (3c900 series...).
 
Old 03-05-2002, 01:51 AM   #12
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
right,

currently the System.map and vmlinuz files in /boot are just links to the current kernel

you should send the bzImage to /boot/vmlinuz-2.4.2-18

and the System/map /boot/System.map-2.4.2-18 or whatever kernel version you use


if you run ls -l /boot you will see the links targets


Last edited by DavidPhillips; 03-05-2002 at 01:52 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem when moving from kernel 2.4.* to 2.6.* super.da Debian 33 12-16-2005 06:37 PM
Mandriva - Not Booting After Moving Hd, kernel panic Quaxo Linux - General 3 12-03-2005 06:13 PM
3D performance issues after moving to 2.4.20-27.9 kernel! niverson Red Hat 2 01-05-2004 10:53 PM
moving a compiled kernel? e1000 Linux - General 5 12-23-2003 03:57 PM
help moving boot kernel from floppy to harddisk matix Linux - Newbie 3 01-14-2003 05:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:19 AM.

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
Open Source Consulting | Domain Registration