There is some entropy that you can remove from previous compiles.
This is what you had when you installed Slackware:
Code:
mingdao@james:~$ ls -alh /usr/src/
total 1.0K
drwxr-xr-x 5 root root 160 2005-03-31 02:05 ./
drwxr-xr-x 18 root root 520 2004-10-11 07:55 ../
lrwxrwxrwx 1 root root 12 2005-03-31 02:05 linux -> linux-2.4.29/
drwxr-xr-x 15 root root 584 2005-01-21 03:41 linux-2.4.29/
drwxr-xr-x 7 root root 168 2003-10-29 14:08 rpm/
drwxr-xr-x 2 root root 176 2005-01-21 06:31 speakup-2.4.29/
Now I've compiled at least 10 kernel versions, and some more than
once since I installed Slackware, and haven't added anything to my
/usr/src/ directory.
If you didn't restore the linux -> linux-2.4.29/ symlink as I told you
earlier, you should do that.
You can safely get rid of rpm/ and speakup-2.4.29/ by issuing
"rm -rf /usr/src/rpm/"
"rm -rf /usr/src/speakup-2.4.29/"
Looking at "ls -al /usr/src/" from your earlier post you can also
"rm -rf /usr/src/linux-2.6.12.3"
Next let's look at your /boot/ directory. You only need the default kernel
and the one you're running, but may keep others if you want them. I am
not saying I do everything correctly, but here is what my /boot/ looks like:
Code:
mingdao@james:~/build$ ls -alh /boot/
total 16M
drwxr-xr-x 3 root root 808 2005-08-07 07:33 ./
drwxr-xr-x 22 root root 568 2005-08-08 08:22 ../
lrwxrwxrwx 1 root root 37 2005-03-31 02:03 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx 1 root root 25 2005-08-07 07:17 System.map -> /boot/System.map-2.6.12.4
-rw-r--r-- 1 root root 795K 2005-05-30 21:43 System.map-2.6.11.11
-rw-r--r-- 1 root root 802K 2005-04-09 17:38 System.map-2.6.11.6
-rw-r--r-- 1 root root 829K 2005-06-19 08:56 System.map-2.6.12
-rw-r--r-- 1 root root 796K 2005-07-22 18:23 System.map-2.6.12.1
-rw-r--r-- 1 root root 785K 2005-07-05 19:32 System.map-2.6.12.2
-rw-r--r-- 1 root root 730K 2005-08-07 05:35 System.map-2.6.12.3
-rw-r--r-- 1 root root 730K 2005-08-07 07:17 System.map-2.6.12.4
-rw-r--r-- 1 root root 512 2005-03-30 18:39 boot.0300
-rw-r--r-- 1 root root 30K 2005-05-30 21:56 config-2.6.11.11
-rw-r--r-- 1 root root 30K 2005-04-09 17:38 config-2.6.11.6
-rw-r--r-- 1 root root 5.0K 2004-05-21 15:19 diag1.img
-rw------- 1 root root 138K 2005-08-07 07:33 map
-rw-r--r-- 1 root root 11K 2005-08-07 07:28 slack.bmp
-rw-r--r-- 1 root root 1.5M 2005-05-30 21:43 vmlinuz-2.6.11.11
-rw-r--r-- 1 root root 1.5M 2005-04-09 17:38 vmlinuz-2.6.11.6
-rw-r--r-- 1 root root 1.6M 2005-06-19 08:57 vmlinuz-2.6.12
-rw-r--r-- 1 root root 1.5M 2005-07-22 18:24 vmlinuz-2.6.12.1
-rw-r--r-- 1 root root 1.4M 2005-07-05 19:33 vmlinuz-2.6.12.2
-rw-r--r-- 1 root root 1.4M 2005-08-07 05:35 vmlinuz-2.6.12.3
-rw-r--r-- 1 root root 1.4M 2005-08-07 07:18 vmlinuz-2.6.12.4
I certainly don't need all those kernels, but I keep them anyway. The main
reason is when somebody says, "I'm running Slackware with kernel <blah>
and my <hardware> isn't recognized / doesn't work, etc. I can sometimes
boot into one of those old kernels and see what happens on my box. I am
not concerned about space, as this computer has a 60GB IDE drive and an
80GB SATA drive; and it's backed up to my server's 250GB SATA drive. So for
me to keep a few extra kernel images and module directories around isn't a
concern at this point. Also, whenever I read that something works for another
person in kernel-blah and it doesn't work as well in my present kernel, I can
go check.
That is my workstation, and I don't have a 2.4.x kernel because I nuked it
during a Slackware -current update and didn't bother restoring it because
I don't use 2.4.x on here anymore.
On my server, which I recently upgraded, there is only the default 2.4.29
and a custom 2.4.31 kernel:
Code:
mingdao@paul:/backup/ISO$ ls -alh /boot/
total 4.9M
drwxr-xr-x 2 root root 504 2005-07-31 08:09 ./
drwxrwxr-x 19 root root 432 2005-08-06 18:47 ../
lrwxrwxrwx 1 root root 37 2005-07-30 03:07 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx 1 root root 23 2005-07-31 08:06 System.map -> /boot/System.map-2.4.31
-rw-r--r-- 1 root root 572K 2005-07-31 07:54 System.map-2.4.31
-rw-r--r-- 1 root root 594K 2005-01-21 12:24 System.map-ide-2.4.29
-rw-r--r-- 1 root root 512 2005-07-30 06:08 boot.0300
-rw-r--r-- 1 root root 512 2005-07-30 06:08 boot.0810
-rw-r--r-- 1 root root 1.2M 2005-07-31 07:53 bzImage-2.4.31
lrwxrwxrwx 1 root root 19 2005-07-31 08:07 config -> /boot/config-2.4.31
-rw-r--r-- 1 root root 24K 2005-07-31 07:54 config-2.4.31
-rw-r--r-- 1 root root 41K 2005-01-21 12:24 config-ide-2.4.29
-rw-r--r-- 1 root root 5.0K 2004-05-21 15:19 diag1.img
-rw------- 1 root root 39K 2005-07-31 08:09 map
-r-------- 1 root root 1.3M 2005-07-30 03:23 vmlinuz
-rw-r--r-- 1 root root 1.2M 2005-01-21 12:24 vmlinuz-ide-2.4.29
He boots and runs on bzImage-2.4.31, and I might add, there is not one
error message in his log after booting. I also run him without any modules
by preference. He has some hardware, such as IEEE 1394, which I haven't
configured by design.
As for module directories, you can issue and look at "ls -alh /lib/modules/"
Code:
mingdao@paul:/backup/ISO$ ls -alh /lib/modules/
total 5.0K
drwxr-xr-x 4 root root 96 2005-07-31 07:52 ./
drwxr-xr-x 4 root root 3.2K 2005-07-30 03:11 ../
drwxr-xr-x 4 root root 416 2005-01-21 12:47 2.4.29/
drwxr-xr-x 4 root root 416 2005-07-31 07:52 2.4.31/
That's where all the modules go when you compile a kernel. If you remember
that /lib/modules/2.6.12.3test/ directory you referenced earlier, I'll imagine it
is still there. You should also have a new /lib/modules/2.6.12.3/ that is from
your latest kernel. You can safely remove any that correspond to a kernel you
will not run by issuing, for instance:
"rm -rf /lib/modules/2.6.12.3test/"
NB: You must not remove a module directory for a kernel that you still use.
And for patching, Linus wrote instructions for that, too. From ./linux-2.6.12.3/README
Quote:
- You can also upgrade between 2.6.xx releases by patching. Patches are
distributed in the traditional gzip and the new bzip2 format. To
install by patching, get all the newer patch files, enter the
top level directory of the kernel source (linux-2.6.xx) and execute:
gzip -cd ../patch-2.6.xx.gz | patch -p1
or
bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1
(repeat xx for all versions bigger than the version of your current
source tree, _in_order_) and you should be ok. You may want to remove
the backup files (xxx~ or xxx.orig), and make sure that there are no
failed patches (xxx# or xxx.rej). If there are, either you or me has
made a mistake.
Alternatively, the script patch-kernel can be used to automate this
process. It determines the current kernel version and applies any
patches found.
linux/scripts/patch-kernel linux
The first argument in the command above is the location of the
kernel source. Patches are applied from the current directory, but
an alternative directory can be specified as the second argument
|
I've never patched a kernel, so I'll make no other comments except to say
that the patch file should be placed in the same directory as the kernel
source that you're patching. For your present kernel I presume that it's
under /home somewhere named ./linux-2.6.12.3/
As for posting a Kernel Build HOW-TO, I'll do that later on my website so
that I don't have to be bothered with all the guys like glussier there who
want to disagree with me, but don't have any technical information or even
some data for discussion. As far as I'm concerned, the instructions by Linus
are good enough, and the other things we need to do are obtained from
sources on the internet. I'd just like to tie them all together, give some good
references, and leave it there.
I'm glad you got your kernel compiled, and hope you soon get your Slackware
OS configured and tweaked to your desire.
If you have any more questions about these things, post the output of "ls -al"
on the directory and we'll help.