LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-08-2008, 05:34 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Question Maintaining a Kernel With both New and Old Computers


What kind of check list or notes do I need to maintain different kernels between old and new computers with respect to compiling the kernel?

I have two old computers. One uses a 400 MHz K6-III+ CPU with a maximum of 256 MB RAM, 4MB Diamond Stealth video card, 40GB hard drive, 100Mbit NIC. The other uses a 350 MHz PII Deschutes CPU with 448 MB RAM, 16 MB AGI Banshee video card, 40 GB hard drive, 100 Mbit NIC. I ran both of these boxes until recently, running Slackware 12.0. (The other day I booted my old 486 with 16MB RAM just to verify the box still runs --- possibly a candidate for an LTSP terminal.).

I don't have to, but I like keeping Slackware up to date, at least to the latest official release. Since I bought my new box I have not been doing so on these old boxes. They still run fine, but the primary reason I have not updated them is compiling the kernel. All of my recent work with respect to compiling my kernel is focused toward my new dual core CPU, not these old i586/i686 CPUs.

I could take my old 2.6.21.x kernel from Slackware 12, use make oldconfig to try to get closer with the newer 2.6.24.5 kernel. These old boxes do not support any of the new hardware and they don't even support USB 2.0 (only 1.1). I would just answer 'no' to all the oldconfig questions (is there a way to answer 'no' globally?). But I thought I'd post the question for advice on things to watch for and avoid while maintaining kernels for two very different environments.

I appreciate any tricks and tips. Thanks.
 
Old 08-08-2008, 06:38 PM   #2
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
Why not just use the generic kernel? That's what I am now doing. I used to compile kernels for different boxen, but when I bought this new laptop, I was having trouble with the wireless nic & installed both the huge & generic kernels, just to see if my mods were causing problems. They weren't & I didn't notice any difference in performance, so am now using the generic kernel on all five computers on my network. I'm not using identical kernels, as my old laptop will not handle the -smp variation, but at least I don't have to compile kernels every time I want to upgrade.
Regards,
Bill
 
Old 08-08-2008, 07:08 PM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
If you want to use those old kernel configs, follow my guide here.

After you untar the new kernel source, if you're compiling on the
box where you will run the kernel, issue "zcat /proc/config.gz > .config"
in the directory of your new kernel source (i.e. ~/kernel/linux-2.6.26/)
and that will put a .config file of your running kernel in there. Then you
can issue "make silentoldconfig" and it will only ask questions of
new options. Or if you don't want to change anything, just keep the
options you selected before, issue "make" without any config options,
and you'll build with your old config. If you don't have /proc/config.gz,
issue "cp /path/to/old/.config /path/to/new/kernel/source/.config"

Most of that is covered in my guide, and you should also read the
README file in the new kernel source directory.

Check the Slack-12.1 docs, but iirc, you can use your 2.6.21.x kernel
from Slackware 12 with 12.1 -- I think it requires => 2.6.16.
 
Old 08-10-2008, 10:55 AM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Thanks. The make silentoldconfig option will help convert the 2.6.21.5 kernels to 2.6.24.5. I'm not worried about performance, only ensuring I don't create a kernel customized for my new box with parameters that won't run on the old boxes.
 
Old 08-10-2008, 07:17 PM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by Woodsman View Post
Thanks. The make silentoldconfig option will help convert the 2.6.21.5 kernels to 2.6.24.5. I'm not worried about performance, only ensuring I don't create a kernel customized for my new box with parameters that won't run on the old boxes.
Please forgive me - I did not read your original post properly. And did you
read my Kernel Rebuild Guide? Don't use the .config file from your new box
for a kernel build on your old box. That will ensure you "don't create a kernel
customized for my new box with parameters that won't run on the old boxes."

Save your kernel's .config file before updating, and use it with the new system.

The "make silentoldconfig" option gives you only the kernel options that are
new since the old .config file you're using. If you don't even want to see the
changes (but why not?), just copy the old .config to the new source directory
and run "make" and you won't have to answer any questions. I assume you know
it's not necessary to run "make <option>config" when you already have a .config
file in place. Because you don't have to "make" a config file.

Quote:
Originally Posted by Woodsman View Post
What kind of check list or notes do I need to maintain different kernels between old and new computers with respect to compiling the kernel?
You need to maintain a checklist for each individual computer, with hardware
different from your other computers, on each respective box. For example:

To make this simple on my LAN, where there are 6 local computers, and guest
computers when in for repairs (or new builds), I do this on each box:

First, I build my kernels in ~/kernel/linux-$VERSION/
Code:
mingdao@silas:~/kernel$ ls -l
total 6644
-rw-r--r--  1 mingdao users    9652 2008-08-10 09:10 2.6-kernel-build.txt
-rw-r--r--  1 mingdao users  205303 2005-09-17 17:10 Compiling_2.6.x_kernel_tutorial.pdf
-rw-r--r--  1 mingdao users    2082 2005-09-19 07:35 Kernel_upgrade_advice
-rw-r--r--  1 mingdao users 6558921 2008-01-26 00:13 Linux_Kernel_Nutshell.pdf
drwxr-xr-x 22 mingdao users    4096 2008-07-25 09:08 linux-2.6.26/
drwxr-xr-x 22 mingdao users    4096 2008-08-10 18:49 linux-2.6.26.2/
That directory houses my present running kernel, the last previous kernel, my
Kernel Rebuild Guide (which I copy and paste from, and update), and a couple
of files on my local machine with good advice. That would be a good place to
document anything that you need special for that particular box.

I know you like to keep things neat and orderly. Here are other boxen:
Code:
anna@peter:~/kernel$ uname -a
Linux peter 2.6.24.5-smp #1 SMP Wed Apr 30 13:18:13 CDT 2008 i686 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
anna@peter:~/kernel$ ls -l
total 12
-rw-r--r-- 1 anna users 9651 2008-07-28 11:28 2.6-kernel-build.txt
My wife and daughter's PC has no special kernel needs, now that Pat has those
huge kernels with "everything but the kitchen sink."
Code:
Linux james 2.6.26 #3 Fri Jul 25 09:55:43 CST 2008 i686 AMD Athlon(TM) XP 2200+ AuthenticAMD GNU/Linux
mingdao@james:~/kernel$ ls -l
total 40
-rw-r--r--  1 mingdao users 10118 2008-07-26 09:09 2.6-kernel-build.txt
-rw-r--r--  1 mingdao users    75 2008-07-02 21:16 China-kernel-link
-rw-r--r--  1 mingdao users   575 2008-07-12 16:41 compile-times
-rw-r--r--  1 mingdao users  1821 2008-05-11 06:44 hdparm-results
drwxr-xr-x 22 mingdao users  4096 2008-05-30 22:59 linux-2.6.25.4/
drwxr-xr-x 22 mingdao users  4096 2008-07-25 16:35 linux-2.6.26/
My test box, which usually runs Slackware-current. It will get a 2.6.26.2 probably
later today, time permitting.
Code:
mingdao@titus:~/kernel$ uname -a
Linux titus 2.6.24.5-smp #1 SMP Wed Apr 30 13:18:13 CDT 2008 i686 Intel(R) Celeron(R) CPU 2.80GHz GenuineIntel GNU/Linux
mingdao@titus:~/kernel$ ls -l
total 172
-rwxr-xr-x 1 mingdao users  7689 2008-03-27 08:15 2.6-kernel-build.txt*
-rw-r--r-- 1 mingdao users   674 2008-05-11 09:22 compile-times
-rw-r--r-- 1 mingdao users 50637 2008-05-10 08:00 ide-config
-rw-r--r-- 1 mingdao users 51274 2008-05-11 07:18 libata-config
-rw-r--r-- 1 mingdao users 47748 2008-05-09 17:24 libata-config.old
-rw-r--r-- 1 mingdao users  5477 2008-05-08 09:59 lspci-2.6.24.5-smp
My laptop. Since updating it to Slack-12.1, I've been studying Chinese at the
university, haven't made road trips, and have not used it - so the kernel has
not been updated using my custom 2.6 config file. Did some small amount
of testing of the new libata driver for performance.

Quote:
Originally Posted by Woodsman View Post
I like keeping Slackware up to date, at least to the latest official release. Since I bought my new box I have not been doing so on these old boxes. They still run fine, but the primary reason I have not updated them is compiling the kernel.
IMO that is not a reason to fail to update Slackware to the latest stable release,
since, as TSquaredF mentioned, these new kernels that Pat's building have just
about every module available:
Code:
mingdao@silas:~$ ls -lh /boot/vmlinuz*
lrwxrwxrwx 1 root root   32 2008-07-04 00:57 /boot/vmlinuz -> vmlinuz-generic-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 1.8M 2008-07-03 20:13 /boot/vmlinuz-2.6.25.9
-rw-r--r-- 1 root root 1.8M 2008-07-16 08:54 /boot/vmlinuz-2.6.26
-rw-r--r-- 1 root root 2.0M 2008-08-10 18:49 /boot/vmlinuz-2.6.26.2
-rw-r--r-- 1 root root 2.0M 2008-05-01 03:02 /boot/vmlinuz-generic-2.6.24.5
-rw-r--r-- 1 root root 2.1M 2008-05-01 02:19 /boot/vmlinuz-generic-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 4.1M 2008-05-01 03:15 /boot/vmlinuz-huge-2.6.24.5
-rw-r--r-- 1 root root 4.2M 2008-05-01 02:42 /boot/vmlinuz-huge-smp-2.6.24.5-smp
Those are the Slackware-12.1 kernels, and three custom kernels I've built for
this box. Mine are larger than normal, because this new box has a lot of hardware
I've not used before. Also, the kernel has some new options that I want to try
on new hardware. But look at the Slackware kernels. They're more than twice as
large as my biggest experimental custom kernel.

You can probably run your old boxen on the generic-smp-2.6.24.5-smp until you
rebuild your custom kernel. If so, it won't hurt anything; just take more memory
to load the kernel, and way longer to boot the machine.

Compare to my server:
Code:
mingdao@paul:~$ uname -a
Linux paul 2.4.31 #5 Sat Mar 11 20:06:20 CST 2006 i686 unknown unknown GNU/Linux

mingdao@paul:~$ ls -lh /boot/
total 5.0M
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  512 2006-03-11 20:09 boot.1600
-rw-r--r--  1 root root 1.3M 2006-03-11 20:08 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 2006-03-11 20:09 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  40K 2006-03-11 20: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
At that time the default Slackware kernel(s) didn't support all the hardware
on even my old boxen. It required a custom rebuild just after installation of
Slackware -- every time.
 
Old 08-10-2008, 08:34 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
did you read my Kernel Rebuild Guide?
I only had a chance to browse thus far. Eventually I'll read!

Quote:
Don't use the .config file from your new box for a kernel build on your old box.
Yup, that was the basic reason for my original post.

Quote:
just copy the old .config to the new source directory and run "make" and you won't have to answer any questions.
Never tried that before but seems sensible. Thanks.

Quote:
IMO that is not a reason to fail to update Slackware to the latest stable release
I did not mean to imply I would not update, only that with such radically new hardware I had not yet traversed the challenge of maintaining different kernels for radically different boxes.

Although the generic kernel is an option, my original kernels for my old boxes were stripped down quite a bit. There is no fancy hardware on those boxes. So the generic kernel likely would add unnecessary features.
 
Old 08-11-2008, 09:36 AM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by Woodsman View Post
I only had a chance to browse thus far. Eventually I'll read!
That is a heavily modified guide Jesper Juhl gave me perhaps in 2004? Since
then I've mainly modified it when I built a kernel or gave it to someone else.
As you can see, it's not technical writing -- just a simple guide to rebuild
a kernel for Slackware.

Quote:
Originally Posted by Woodsman View Post
Never tried that before but seems sensible. Thanks.
The kernel's options have changed, and the README file explains the different
"make config" options. Once you have a .config file, the next step is make; so
if you use the old one and don't want the new options, just run make. NB: If
something significant has changed to the point that you're missing something,
most of the time "make" will output that error message.

Quote:
Originally Posted by Woodsman View Post
I did not mean to imply I would not update, only that with such radically new hardware I had not yet traversed the challenge of maintaining different kernels for radically different boxes.
That confused me, because IMO if you're getting proficient at building custom
kernels for your new box, and you had one for the old boxen, then just install
Slack-12.1 on the old boxen, and use the previous .config file to build a new
kernel. You can use the kernel source included with Slackware, or get new
kernel source. I've used up to 2.6.26 with no problems.

Quote:
Originally Posted by Woodsman View Post
Although the generic kernel is an option, my original kernels for my old boxes were stripped down quite a bit. There is no fancy hardware on those boxes. So the generic kernel likely would add unnecessary features.
I only meant the generic one should install and boot your old boxen; then
you'd have a running system to compile a new custom kernel.

No doubt about it. Reminds me of Windoze, where you have drivers for every
CD/DVD drive you can imagine, but your box only has one drive. I never thought
I'd see the day a Linux kernel would be over 4 MB.

Last edited by Bruce Hill; 08-11-2008 at 09:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: FSF works with Los Alamos Computers to provide free computers LXer Syndicated Linux News 0 07-29-2008 10:12 PM
LXer: Linux: Maintaining the 2.4 Kernel LXer Syndicated Linux News 0 12-05-2006 10:33 AM
Computers Will Not Run Kernel BeauSanders Linux - General 1 09-22-2005 04:44 PM
Maintaining Updates ltsai Linux - Software 0 10-02-2003 12:37 AM
Looks like 2.5 kernel is almost here - and AC won't be maintaining 2.4! jeremy Linux - General 0 11-02-2001 09:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration