[Techtalk] LOST in Kernel space

Conor Daly conor.daly at oceanfree.net
Wed Jun 12 07:48:10 EST 2002


On Mon, Jun 10, 2002 at 10:06:00PM -0700 or so it is rumoured hereabouts, 
Jeannette thought:
> 
> 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? :)
> 
> > 	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.
> 
> 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

I'd like to add two suggestions here...

I'd go with Jeanette's "Start over" suggestion.  You have probably
unzipped the new kernel source over your current source so any attempt to
rebuild your current kernel will result in trouble.  

# rm -r /usr/src/linux-2.3.x
# rm /usr/src/linux
# cd /usr/src
# tar xzvf linux.2.4.x.tar.gz
# mv /usr/src/linux /usr/src/linux-2.4.x

Then reinstall your _original_ kernel source also (typically in an RPM
called "kernel-source" with Mandrake).

The second thing to do (again as per jeanette's suggestion) is to make
EXTRAVERSION something meaningful in the source Makefile.  My current
/usr/src/linux-2.4.7-10/Makefile contains:

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 7
EXTRAVERSION = -10custom

So, the kernel I build there will be version "2.4.7-10custom" (uname -a
will give you that).  The modules for _this_ kernel will be in
/lib/modules/2.4.7-10 .  I then copy bzImage to
/boot/vmlinuz-2.4.7-10custom and system.map to
/boot/System.map-2.4.7-10custom

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  7:28am  up 19 days, 16:46,  0 users,  load average: 0.00, 0.00, 0.00
Hobbiton.cod.ie
  7:33am  up 19 days, 16:54,  2 users,  load average: 0.00, 0.02, 0.00



More information about the Techtalk mailing list