PDA

View Full Version : kernel upgrade/rebuilt WTF



fingers99
04-14-2003, 12:01 AM
I'm desperately trying to rebuild the kernel (which looks to be the only way I can get some kind of dialup without a re-install). As far as I know I have all the tools necessary to do just that, but using the old symlink to the linux-2.4.20-xfs sources I get:

make xconfig make no rule to make xconfig (I get the same with make menuconfig but I've not checked that I have all the ncurses stuff). OK, I think, lets use the linux-2.4.20 sources. I pop them on, untar them, remove the old symlink, create a new one and try to cd into /usr/src/linux:

root@rom-box:/usr/src# cd /usr/src/linux
bash: cd: /usr/src/linux: No such file or directory

I check and, as you'll see, although the linux-2.4.20 directory is owned by root, the symlink is owned by knoppix! (This isn't, it would seem, the dear old user knoppix as suing to knoppix doesn't get me in either!). I'm completely stumped by this: chown has no effect, and isn't the rule of Linux that root rules all?

(BTW, why is the makefile outside of the source directory?).


root@rom-box:/usr/src# ls -l
total 33228
-rw-r--r-- 1 knoppix knoppix 80 Oct 5 2002 Makefile
-rw-r--r-- 1 knoppix knoppix 541 Dec 3 21:06 knoppix-kernel.patch
lrwxrwxrwx 1 root knoppix 11 Apr 13 23:34 linux -> linux2.4.20
drwxr-xr-x 14 root root 4096 Nov 29 00:53 linux-2.4.20
drwxr-xr-x 4 knoppix knoppix 4096 Jan 12 23:51 linux-2.4.20-xfs
-rw-r--r-- 1 knoppix knoppix 33963814 Feb 21 21:50 linux-2.4.20.tar.gz
drwxr-xr-x 2 knoppix knoppix 4096 Jan 18 2002 modules

I'm completely baffled by this: I'm trying to follow the Debian rules for rebuilding kernels and this installation just doesn't seem to want to know.

gandalf
05-02-2003, 06:45 PM
First of all i found knoppix 3.2 a very nice distribution...

...i've got the same identical problem...

someone...cane tell me what shuld i've to do?

I can't recompile the kernel...i can't mostly do anything!...:(

Maybe installing changin user like this howto explain?

http://www.knoppix.net/docs/index.php/HdInstallUserChangeHowTo

:)

garyng
05-02-2003, 06:59 PM
you can always remove the link and recreate it or just cd linux-2.4.20 is also fine.

You can put the kernel tree wherever you like. The steps involved(at least that is what I do)

1. cd linux
2. make mrproper(clean up stuff)
3. cp /boot/config-2.4.20-xfs ./.config
4. patch -p1 -N < ../any patch files which I put at the parent directory
5. make menuconfig
6. make-dkpg kernel_image
7. cd ..;dpkg -i the_generated_kernel.deb

gandalf
05-02-2003, 07:04 PM
I know...kernel 2.4.20 its ok...but...i can't recompile it!...sob

I give make config

***no rule to make 'config'

so im trying to do different operations...

but the answer is always the same

***no rule to make 'config'

moreover if i try to open uder KDE the kernel manager...it opens and say that the kernel cant be read...because it as no the rught options or i discovered a KDE bug...:)

garyng
05-02-2003, 07:20 PM
you need to be at the top linux source tree to issue the make. That is if you put the tarball at /usr/src/linux-2.4.20, you would need "cd /usr/src/linux-2.4.20"

dmallery
05-03-2003, 03:05 AM
when i had to make a kernel, i found that there was no kernel tree in linux-2.4.20-xfs, just the headers, etc.

i downloaded a fresh copy from kernel.org and started cutting down the zillions of modules, and unneeded stuff.

you are trying to compile what isn't there.

dave

Viro
05-03-2003, 12:17 PM
Knoppix comes with only the kernel headers, no sources. Get the latest kernel (2.4.21) from kernel.org and mirrors, and have fun building.

gandalf
05-03-2003, 01:58 PM
tnx guys...slowly im finding out the problem.

The headers...these are the key words :wink:, there's not kernel source in knoppix..!!

tnx all

ok...and know...i wolu like to make of this quite debian installation a normal debian installation...

How can I install the source ad rebulid complitely the kernel?
Cleaning dep and modules?

henryz
05-05-2003, 08:18 PM
I had no problems with a kernel build (4-28-03 release)

1. d/l the kernel source (linux-2.4.20.tar.gz)
2. Extracted it into my home dir.
3. Logged out and then logged in as root.
4. Copied src tree to /usr/src, i.e. (/usr/src/linux-2.4.20)
5. Deleted old symlink to /usr/src/linux
6. Made new one ln -s /usr/src/linux-2.4.20 /usr/src/linux
7. Applied patches (I was trying the preemptible kernel patch)
8. Renamed ../../linux.2.4.20 ../../linux-2.4.20pre
9. cd /usr/src/linux; cp ../linux-2.4.20-xfs/.config .config
10. make xconfig - I enabled kernel preemption and included ReiserFS in
kernel (these are just examples)
11. edit Makefile and change EXTRAVERSION= to EXTRAVERSION=pre
11. make dep; make clean
12. make bzImage
13. make modules
14. make modules_install
15. mv /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-2.4.20pre
16. mv /usr/src/linux/System.map /boot/System.map-2.4.20
17. ln -sf /boot/System.map-2.4.20 /boot/System.map
18. add image to lilo.conf
19. Reboot