Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rebuilt kernel; machine won't boot 2

Status
Not open for further replies.

verland

MIS
Apr 24, 2002
138
US
I'm trying to compile a kernel for firewall support and when I try to boot the new kernel the box reboots, and I have to boot the old kernel. Here's what I'm doing:

(pent 166, 64m, ide everything, Debian 3.0 stable, going from 2.2.20 to 2.4.19)



-Do a very lean 3.0 install, no options

-Apt-get libc6-dev, libncurses5-dev, make, gcc, lynx, sudo, less. NOTE-when I install binutils, it gives a big error which I enclosed below.

-unpack source in ~/

-cd linux*

-make mrproper

-make menuconfig. I get rid of scsi, agp, usb and other abrieviations i don't need, but leave the ide stuff alone

-make dep; make bzImage; make modules

-sudo make install (it runs lilo for me, and looks ok)

-sudo make modules_install

-reboot

I think it says Uncompressing Linux, but it blinks by and reboots so fast it's hard to tell. This is a needle in a haystack I know, but if anyone can help that'd be great. Also the problem happens on other machines as well. I've done kernels before I just don't know what I'm missing here.

Here is the binutils error, I did try the workaround but it didn't help:
Kernel link failure info

you may experience problems linking older (and some newer) kernels with this version of binutils. This is not becasue of a bug in the linker, but reather a bug in the kernel source. This is being worked out and fixed by the upstream kernel group in newer kernels, but not all of the problems may have been fixed at this time. Older kernel versions will almost always exhibit the problem, however, and no attempts are being made to fix those that we know of.

There are a few work-arounds, but the most reliable is to edit the linker script for your architecture (e.g. arch/i386/vmlinux.lds) and remove the '*(.text.exit)' entry from the 'DISCARD' line. It will bloat the kernel somewhat, but it should link properly.

Thanks again all
 
Did you copy the new kernel to /boot and edit the /etc/lilo.conf file? I don't use the 'make install' command. Maybe that does it for you, I don't know, but I do it manually. Its much safer. Did you overwrite the old kernel with the new one?


ChrisP
 
I recompiled and copied it to /boot. Made another entry in lilo.conf for it, ran lilo and rebooted. It didn't seem to make a difference, I also copied the kernel to / and lilo'd but same thing.



It just says something like :

Loading third........

S



you see the "S" appear then it's gone.

Let me know what you think, I'll try anything...

BTW, all make install does is copy the kern? I thought it did other stuff but never knew. Thanks
 
Hi verland.

With your situation I'm hard pressed to give you an answer that will work.
I don't see that you isued the command make modules_install.
I'm with fluid on manually copying kernel and System.map to
/boot and /. The make install command I'm not familiar with
kernel installations.
Your binutils issue is nasty and could be the culprit..
A workaround would be to do the compile on another machine
and then copy kernel, System.map and the modules directory
to your new machine, edit lilo, and ldconfig -v.
This method is often used in production environments when
for security reasons compilers aren't installed on critical
servers, and for convenience for a slower machine.

Good Luck.
 
I'll try moving that again on the next recompile, until then how can i tell a machine running woody stable from woody not stable?
Once upon a time, i did get kernel 2.4.19 to boot, but don't know if I loaded the machine on un/stable. It's still alive but I can't tell the difference. If it's running unstable but can make kernels I'll just do all kernel work on it.
 
You mean kernel version?
uname -r.
Check out man uname , there are many bits of interest.
 
Ok, someone's going to smack me for this but I got it to work. I think it had to do with the processor selection, by default it picks "Coppermine", which I thought was backwards compatible. But the help says it's only sort of backwards compatible. I compiled with MMX and did get it to boot.



Had some other q's tho. I usually do make install and make modules_install but I want to copy them by hand (I need to update some slow machines). I'm a bit lost on some of the copy details-

Where do the modules copy from/to?

What is the System.map?

Where do I get a copy of the config?

Thanks all!
 
*smack* :)

The modules copy from /usr/src/linux-x.x.x/modules to /lib/modules/linux-x.x.x. The x.x.x is whatever kernel you are compiling (something like 2.4.19)

A copy of what config? The custom config that you created? In 'menuconfig', or whatever you used, there is an option to save the config to a file.


ChrisP

 
Thanks, I needed that. :) "You have to pick a processor? really???"



I don't seem to have a ~/linux-2.4.19/modules
directory. BUT, I'm pretty sure I didn't compile any either (unless an <M> was hidden somewhere)


Another 'duh' on the save option. I just figured it'd be nice to keep those configs



Also what is the System.map? In earlier kernel builds I never knew to copy it. Make install does, but the system works either way. ???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top