[Techtalk] LOST in Kernel space

Jeannette jcv at hise.org
Mon Jun 10 22:06:00 EST 2002


On Mon, 10 Jun 2002, Andrew wrote:

> Thanks I almost got it.
Good!

>
> 	I'm Guessing that all did compile well, I have a file named
> in/usr/src "linux -> linux-2.4.3" with an old, old date  Also there

Did you forget to type the name of the file? Or are you talking about your
directory?

> is a "linux-2.4.3" that has the same date/time on it as when I
> compiled the kernel. My guess is "linux 2.4.3" without the "->" in
> front of it is the new one?

OK. I am a very hands-on, visual person, and I am getting confused.
/usr/src/linux-2.4.3 is a directory, POSSIBLY (originally!) containing the
source for your 2.4.3 kernel.

/usr/src/linux is a symbolic link pointing
to /usr/src/linux-2.4.3

A symbolic link is just a second name for an object (file or directory).
In this case, /usr/src/linux is a generic name that we all use to point to
our (current) kernel source. Then any program or person looking for kernel
source doesn't need to figure out which directory contains your actual
source, in case you have several versions.

I don't think the dates you found mean much. The symlink linux is dated
from when it was created (install date?). When you unzipped your new
kernel and it followed the linux link and decrompressed, the date of
linux-2.4.3 would be changed.

I think your kernel building instructions may have started in a
different place than I always do. I "rm /usr/src/linux" (taking out the
generic pointer to the current (soon to be old) source directory, but
leaving the actual source and compiled kernel there in case I ever need it
again.

Then, I "cd /usr/src" and "tar xvfz (path to new
kernel/)linux-2.x.x.tar.gz". This will unzip the new kernel source to a
directory linux (in my current working directory, /usr/src). If linux
doesn't exist, it will be created. Then, I "mv linux linux-2.x.x" and "ln
-s linux-2.x.x linux", renaming the generic linux to
linux-my-kernel-version, and then restoring the pointer to my (new)
current source.

If you didn't remove the symbolic link before you unzipped
your new kernel, it probably put the new kernel source in the same
directory as your old kernel source. This seems to me to be messy, but is
probably only bad if you want your old kernel source back someday, or ever
mess around with the kernel in /boot and lose the working kernel and the
ability to boot. Have you made a boot floppy yet? :)


> 	Is this a simlink "linux -> linux-2.4.3"?
Yes, that is a symbolic link. linux-2.4.3 is the directory's real name,
and linux is a pointer to it.

>
> 	Naturally I am up-dating to 2.4.18-19.  Is 2.4.19 sane/safe/stable?
>
I didn't think 2.4.19 was available yet. Where did you find it? I have
used 2.4.18 a lot, and found it stable. I don't do security, so I don't
know if it is considered "safe".

> 	Maybe it would be better to just start again?? What needs to
> be done? Anything removed?

It might be good to start again, if only because _I_ am confused. Kidding.
Do you really know where you are and what is done? If you have a file
called /usr/src/linux/arch/i386/boot/bzImage, that is your compiled (and
compressed) kernel. From your description, though, I can't tell for sure
if that will be the original or the one you just compiled. If you check
the date on it, you can probably find out.

If it and /usr/src/linux/System.map have the date you compiled your
kernel, and /lib/modules/2.4.18/kernel/modules/drivers contains lots of
driver modules (*.o), then you are probably in good shape. Copy bzImage
and System.map to /boot ("cp /usr/src/linux/arch/i386/boot/bzImage
/boot/vmlinuz-2.4.18; cp /usr/src/linux/System.map
/boot/System.map-2.4.18"), edit /etc/lilo.conf to reflect the new kernel
(leave the old kernel there as a back up! add the new kernel), run lilo
"lilo -v", verify that it completed successfully (last line is something
positive. I don't have lilo on this system so I can't check.) Cross your
fingers and reboot.

If you don't have a new bzImage and System.map, start over.

Remove the symlink, unzip, mv, relink. cd /usr/src/linux. Until you have
done this enough times to recognize the failures, run the following as
separate commands so that you know which, if any, fails:

make mrproper
make xconfig (make menuconfig if you don't have X configured)
make dep
make clean
make bzImage
make modules
make modules_install

Cp bzImage and System.map to /boot
Edit lilo.conf
lilo -v


Good luck!!!!


Jeannette




More information about the Techtalk mailing list